Module: wine Branch: refs/heads/master Commit: db90e17d923b809d07f71540ab715dcfb239df22 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=db90e17d923b809d07f71540...
Author: Eric Pouech eric.pouech@wanadoo.fr Date: Sat Mar 18 10:32:33 2006 +0100
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
---
dlls/dbghelp/dbghelp.c | 4 ++-- programs/winedbg/tgt_active.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index f776190..bd75a60 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -170,8 +170,8 @@ static BOOL WINAPI process_invade_cb(cha static BOOL check_live_target(struct process* pcs) { if (!GetProcessId(pcs->handle)) return FALSE; - if (!elf_read_wine_loader_dbg_info(pcs)) return FALSE; - return getenv("DBGHELP_NOLIVE") == NULL; + if (GetEnvironmentVariableA("DBGHELP_NOLIVE", NULL, 0)) return FALSE; + return elf_read_wine_loader_dbg_info(pcs); }
/****************************************************************** diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c index d4eaade..a76f193 100644 --- a/programs/winedbg/tgt_active.c +++ b/programs/winedbg/tgt_active.c @@ -83,6 +83,8 @@ BOOL dbg_attach_debuggee(DWORD pid, BOOL } 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 ? */ { dbg_interactiveP = FALSE;