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:
parent
d5816d2202
commit
db90e17d92
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue