diff --git a/programs/winedbg/dbg.y b/programs/winedbg/dbg.y index 6b080a55bbd..126eef22393 100644 --- a/programs/winedbg/dbg.y +++ b/programs/winedbg/dbg.y @@ -137,7 +137,7 @@ command: | tSYMBOLFILE pathname { symbol_read_symtable($2, 0); } | tSYMBOLFILE pathname expr_rvalue { symbol_read_symtable($2, $3); } | tWHATIS expr_lvalue { dbg_printf("type = "); types_print_type(&$2.type, FALSE); dbg_printf("\n"); } - | tATTACH tNUM { dbg_attach_debuggee($2, FALSE); dbg_active_wait_for_first_exception(); } + | tATTACH tNUM { dbg_attach_debuggee($2); dbg_active_wait_for_first_exception(); } | tDETACH { dbg_curr_process->process_io->close_process(dbg_curr_process, FALSE); } | tKILL { dbg_curr_process->process_io->close_process(dbg_curr_process, TRUE); } | tMINIDUMP pathname { minidump_write($2, (dbg_curr_thread && dbg_curr_thread->in_exception) ? &dbg_curr_thread->excpt_record : NULL);} diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h index 490bd06a0cf..ee33ca08994 100644 --- a/programs/winedbg/debugger.h +++ b/programs/winedbg/debugger.h @@ -431,7 +431,7 @@ extern enum dbg_start dbg_active_launch(int argc, char* argv[]); extern enum dbg_start dbg_active_auto(int argc, char* argv[]); extern enum dbg_start dbg_active_minidump(int argc, char* argv[]); extern void dbg_active_wait_for_first_exception(void); -extern BOOL dbg_attach_debuggee(DWORD pid, BOOL cofe); +extern BOOL dbg_attach_debuggee(DWORD pid); /* tgt_minidump.c */ extern void minidump_write(const char*, const EXCEPTION_RECORD*); diff --git a/programs/winedbg/stack.c b/programs/winedbg/stack.c index ed02c33d3d9..f76996d11b7 100644 --- a/programs/winedbg/stack.c +++ b/programs/winedbg/stack.c @@ -412,7 +412,7 @@ static void backtrace_all(void) } else if (entry.th32OwnerProcessID != dbg_curr_pid) { - if (!dbg_attach_debuggee(entry.th32OwnerProcessID, FALSE)) + if (!dbg_attach_debuggee(entry.th32OwnerProcessID)) { dbg_printf("\nwarning: could not attach to %04x\n", entry.th32OwnerProcessID); diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c index 5385d0effa0..f2ea75341db 100644 --- a/programs/winedbg/tgt_active.c +++ b/programs/winedbg/tgt_active.c @@ -71,7 +71,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de); * wfe is set to TRUE if dbg_attach_debuggee should also proceed with all debug events * until the first exception is received (aka: attach to an already running process) */ -BOOL dbg_attach_debuggee(DWORD pid, BOOL cofe) +BOOL dbg_attach_debuggee(DWORD pid) { if (!(dbg_curr_process = dbg_add_process(&be_process_active_io, pid, 0))) return FALSE; @@ -81,7 +81,6 @@ BOOL dbg_attach_debuggee(DWORD pid, BOOL cofe) dbg_del_process(dbg_curr_process); return FALSE; } - dbg_curr_process->continue_on_first_exception = cofe; SetEnvironmentVariableA("DBGHELP_NOLIVE", NULL); @@ -776,19 +775,20 @@ enum dbg_start dbg_active_attach(int argc, char* argv[]) /* try the form pid */ if (argc == 1 && str2int(argv[0], &pid) && pid != 0) { - if (!dbg_attach_debuggee(pid, FALSE)) + if (!dbg_attach_debuggee(pid)) return start_error_init; } /* try the form pid evt (Win32 JIT debugger) */ else if (argc == 2 && str2int(argv[0], &pid) && pid != 0 && str2int(argv[1], &evt) && evt != 0) { - if (!dbg_attach_debuggee(pid, TRUE)) + if (!dbg_attach_debuggee(pid)) { /* don't care about result */ SetEvent((HANDLE)evt); return start_error_init; } + dbg_curr_process->continue_on_first_exception = TRUE; if (!SetEvent((HANDLE)evt)) { WINE_ERR("Invalid event handle: %lx\n", evt);