mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
- Make Kdbg "bugcheck" command work -- Kdbg isn't re-entrant, so defer the bugcheck and exit the input loop
svn path=/trunk/; revision=37227
This commit is contained in:
parent
06566a1756
commit
0952af92ec
2 changed files with 12 additions and 3 deletions
|
@ -51,6 +51,7 @@ PKDB_KTRAP_FRAME KdbCurrentTrapFrame = NULL; /* Pointer to the current trapframe
|
|||
STATIC KDB_KTRAP_FRAME KdbTrapFrame = { { 0 } }; /* The trapframe which was passed to KdbEnterDebuggerException */
|
||||
STATIC KDB_KTRAP_FRAME KdbThreadTrapFrame = { { 0 } }; /* The trapframe of the current thread (KdbCurrentThread) */
|
||||
STATIC KAPC_STATE KdbApcState;
|
||||
extern BOOLEAN KdbpBugCheckRequested;
|
||||
|
||||
/* Array of conditions when to enter KDB */
|
||||
STATIC KDB_ENTER_CONDITION KdbEnterConditions[][2] =
|
||||
|
@ -1601,6 +1602,13 @@ KdbEnterDebuggerException(
|
|||
/* Leave critical section */
|
||||
Ke386RestoreFlags(OldEflags);
|
||||
|
||||
/* Check if user requested a bugcheck */
|
||||
if (KdbpBugCheckRequested)
|
||||
{
|
||||
/* Bugcheck the system */
|
||||
KeBugCheck(MANUALLY_INITIATED_CRASH);
|
||||
}
|
||||
|
||||
continue_execution:
|
||||
/* Clear debug status */
|
||||
if (ExceptionCode == STATUS_BREAKPOINT) /* FIXME: Why clear DR6 on INT3? */
|
||||
|
|
|
@ -99,6 +99,7 @@ STATIC LONG KdbNumberOfRowsTerminal = -1;
|
|||
STATIC LONG KdbNumberOfColsTerminal = -1;
|
||||
|
||||
PCHAR KdbInitFileBuffer = NULL; /* Buffer where KDBinit file is loaded into during initialization */
|
||||
BOOLEAN KdbpBugCheckRequested = FALSE;
|
||||
|
||||
STATIC CONST struct
|
||||
{
|
||||
|
@ -1689,9 +1690,9 @@ KdbpCmdTss(ULONG Argc, PCHAR Argv[])
|
|||
STATIC BOOLEAN
|
||||
KdbpCmdBugCheck(ULONG Argc, PCHAR Argv[])
|
||||
{
|
||||
/* Bugcheck the system */
|
||||
KeBugCheck(MANUALLY_INITIATED_CRASH);
|
||||
return TRUE;
|
||||
/* Set the flag and quit looping */
|
||||
KdbpBugCheckRequested = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*!\brief Sets or displays a config variables value.
|
||||
|
|
Loading…
Reference in a new issue