diff --git a/debugger/dbg.y b/debugger/dbg.y index 4d93ddaa688..7acfbcebe5c 100644 --- a/debugger/dbg.y +++ b/debugger/dbg.y @@ -397,12 +397,9 @@ BOOL DEBUG_Parser(void) do { __TRY { issue_prompt(); + ret_ok = TRUE; if ((ret = yyparse())) { DEBUG_FlushSymbols(); - - ret_ok = (DEBUG_CurrThread) ? DEBUG_ValidateRegisters() : TRUE; - } else { - ret_ok = TRUE; } } __EXCEPT(wine_dbg_cmd) { ret_ok = FALSE; diff --git a/debugger/intvar.h b/debugger/intvar.h index ac30a56ee36..d0a5ba53174 100644 --- a/debugger/intvar.h +++ b/debugger/intvar.h @@ -10,6 +10,7 @@ INTERNAL_VAR(BreakAllThreadsStartup, FALSE, NULL, DEBUG_TypeIntConst) INTERNAL_VAR(BreakOnCritSectTimeOut, FALSE, NULL, DEBUG_TypeIntConst) INTERNAL_VAR(BreakOnAttach, FALSE, NULL, DEBUG_TypeIntConst) INTERNAL_VAR(BreakOnFirstChance, TRUE, NULL, DEBUG_TypeIntConst) +INTERNAL_VAR(BreakOnDllLoad, FALSE, NULL, DEBUG_TypeIntConst) /* output handling */ INTERNAL_VAR(ConChannelMask, DBG_CHN_MESG, NULL, DEBUG_TypeIntConst) diff --git a/debugger/winedbg.c b/debugger/winedbg.c index 9966ecb1bab..a6018aa929a 100644 --- a/debugger/winedbg.c +++ b/debugger/winedbg.c @@ -441,11 +441,12 @@ static BOOL DEBUG_HandleException(EXCEPTION_RECORD *rec, BOOL first_chance, BOOL DEBUG_CurrThread->dbg_exec_mode, DEBUG_CurrThread->dbg_exec_count); if (DEBUG_ExceptionProlog(is_debug, force, rec->ExceptionCode)) { - for (;;) { - ret = DEBUG_Parser(); - if (!ret || DEBUG_CurrThread->dbg_exec_mode != EXEC_PASS || first_chance) - break; - DEBUG_Printf(DBG_CHN_MESG, "Cannot pass on last chance exception. You must use cont\n"); + while ((ret = DEBUG_Parser())) { + if (DEBUG_ValidateRegisters()) { + if (DEBUG_CurrThread->dbg_exec_mode != EXEC_PASS || first_chance) + break; + DEBUG_Printf(DBG_CHN_MESG, "Cannot pass on last chance exception. You must use cont\n"); + } } } *cont = DEBUG_ExceptionEpilog(); @@ -667,6 +668,7 @@ static BOOL DEBUG_HandleDebugEvent(DEBUG_EVENT* de, LPDWORD cont) de->u.LoadDll.nDebugInfoSize); CharUpper(buffer); DEBUG_LoadModule32(buffer, de->u.LoadDll.hFile, (DWORD)de->u.LoadDll.lpBaseOfDll); + if (DBG_IVAR(BreakOnDllLoad)) ret = DEBUG_Parser(); break; case UNLOAD_DLL_DEBUG_EVENT: diff --git a/documentation/winedbg b/documentation/winedbg index f77c6e87afa..60a0d3aa7f7 100644 --- a/documentation/winedbg +++ b/documentation/winedbg @@ -196,6 +196,9 @@ BreakOnAttach, set to TRUE if when WineDbg attaches to an context of an exception event (the next event which is the exception event is of course relevant), that option is likely to be FALSE. +BreakOnDllLoad When set to TRUE, allows the debugger to be + entered when a new DLL is loaded into the system. + FALSE by default. BreakOnFirstChance an exception can generate two debug events. The first one is passed to the debugger (known as a first chance) just after the @@ -466,7 +469,8 @@ V.3 Main differences between winedbg and regular Unix debuggers VI Limitations ============== -16 bit processes are not supported (but calls to 16 bit code in 32 bit -applications is). ++ 16 bit processes are not supported (but calls to 16 bit code in 32 + bit applications is). ++ there are reports of debugger's freeze when loading large PDB files Last updated: 6/14/2000 by ericP