dbghelp: Live target detection.

- DBGHELP_NOLIVE env variable is tested earlier to avoid 
  some strange effects in live target detection
- in WineDbg, delete DBGHELP_NOLIVE before attaching to
  a process, because we know it must be a live target
This commit is contained in:
Eric Pouech 2006-03-18 10:32:33 +01:00 committed by Alexandre Julliard
parent d5816d2202
commit db90e17d92
2 changed files with 4 additions and 2 deletions

View File

@ -170,8 +170,8 @@ static BOOL WINAPI process_invade_cb(char* name, DWORD base, DWORD size, void* u
static BOOL check_live_target(struct process* pcs) static BOOL check_live_target(struct process* pcs)
{ {
if (!GetProcessId(pcs->handle)) return FALSE; if (!GetProcessId(pcs->handle)) return FALSE;
if (!elf_read_wine_loader_dbg_info(pcs)) return FALSE; if (GetEnvironmentVariableA("DBGHELP_NOLIVE", NULL, 0)) return FALSE;
return getenv("DBGHELP_NOLIVE") == NULL; return elf_read_wine_loader_dbg_info(pcs);
} }
/****************************************************************** /******************************************************************

View File

@ -83,6 +83,8 @@ BOOL dbg_attach_debuggee(DWORD pid, BOOL cofe, BOOL wfe)
} }
dbg_curr_process->continue_on_first_exception = cofe; dbg_curr_process->continue_on_first_exception = cofe;
SetEnvironmentVariableA("DBGHELP_NOLIVE", NULL);
if (wfe) /* shall we proceed all debug events until we get an exception ? */ if (wfe) /* shall we proceed all debug events until we get an exception ? */
{ {
dbg_interactiveP = FALSE; dbg_interactiveP = FALSE;