mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Fix handling of breakpoint exceptions in KDB.
svn path=/trunk/; revision=12194
This commit is contained in:
parent
fd0590d3cc
commit
35d320bd71
2 changed files with 24 additions and 10 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: kdb.c,v 1.35 2004/11/18 02:10:28 arty Exp $
|
||||
/* $Id: kdb.c,v 1.36 2004/12/18 19:22:10 blight Exp $
|
||||
*
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: ntoskrnl/dbg/kdb.c
|
||||
|
@ -1656,17 +1656,24 @@ KdbEnterDebuggerException(PEXCEPTION_RECORD ExceptionRecord,
|
|||
LONG BreakPointNr;
|
||||
ULONG ExpNr = (ULONG)TrapFrame->DebugArgMark;
|
||||
|
||||
DbgPrint( ":KDBG:Entered:%s:%s\n",
|
||||
PreviousMode==KernelMode ? "kmode" : "umode",
|
||||
AlwaysHandle ? "always" : "if-unhandled" );
|
||||
if (ExpNr != 1 && ExpNr != 3)
|
||||
{
|
||||
DbgPrint(":KDBG:Entered:%s:%s\n",
|
||||
PreviousMode==KernelMode ? "kmode" : "umode",
|
||||
AlwaysHandle ? "always" : "if-unhandled");
|
||||
}
|
||||
|
||||
/* If we aren't handling umode exceptions then return */
|
||||
if( PreviousMode == UserMode && !KdbHandleUmode && !AlwaysHandle )
|
||||
if (PreviousMode == UserMode && !KdbHandleUmode && !AlwaysHandle)
|
||||
{
|
||||
return kdContinue;
|
||||
}
|
||||
|
||||
/* If the exception would be unhandled (and we care) then handle it */
|
||||
if( PreviousMode == KernelMode && !KdbHandleHandled && !AlwaysHandle )
|
||||
if (PreviousMode == KernelMode && !KdbHandleHandled && !AlwaysHandle)
|
||||
{
|
||||
return kdContinue;
|
||||
}
|
||||
|
||||
/* Exception inside the debugger? Game over. */
|
||||
if (KdbEntryCount > 0)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: catch.c,v 1.55 2004/11/20 17:45:15 arty Exp $
|
||||
/* $Id: catch.c,v 1.56 2004/12/18 19:22:10 blight Exp $
|
||||
*
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: ntoskrnl/ke/catch.c
|
||||
|
@ -77,7 +77,10 @@ KiDispatchException(PEXCEPTION_RECORD ExceptionRecord,
|
|||
Action = KdEnterDebuggerException (ExceptionRecord, Context, Tf);
|
||||
}
|
||||
|
||||
if (Action == kdContinue) return;
|
||||
if (Action == kdContinue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Action != kdDoNotHandleException)
|
||||
{
|
||||
|
@ -167,8 +170,12 @@ KiDispatchException(PEXCEPTION_RECORD ExceptionRecord,
|
|||
DPRINT("ExceptionRecord->ExceptionAddress = 0x%x\n",
|
||||
ExceptionRecord->ExceptionAddress );
|
||||
#ifdef KDBG
|
||||
KdbEnterDebuggerException (ExceptionRecord, PreviousMode,
|
||||
Context, Tf, TRUE);
|
||||
Action = KdbEnterDebuggerException (ExceptionRecord, PreviousMode,
|
||||
Context, Tf, TRUE);
|
||||
if (Action == kdContinue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
KEBUGCHECKWITHTF(KMODE_EXCEPTION_NOT_HANDLED, 0, 0, 0, 0, Tf);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue