mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
winedbg: Move continue_on_first_exception handling out of dbg_attach_debuggee.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5252d76003
commit
136a0ac49b
4 changed files with 7 additions and 7 deletions
|
@ -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);}
|
||||
|
|
|
@ -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*);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 <myself> 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 <myself> 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);
|
||||
|
|
Loading…
Reference in a new issue