mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:45:43 +00:00
{NTOSKRNL]
Handle int 0x2c (assertion failure) in KDBG by breaking into the debugger instead of ignoring it and pretending it was handled. Now NT_ASSERT works on GCC builds as well. (As good as things work in KDBG...) svn path=/trunk/; revision=64770
This commit is contained in:
parent
6b2a5b98f0
commit
08a4791b4a
2 changed files with 27 additions and 27 deletions
|
@ -189,13 +189,8 @@ KdpEnterDebuggerException(IN PKTRAP_FRAME TrapFrame,
|
||||||
/* Check if this is an assertion failure */
|
/* Check if this is an assertion failure */
|
||||||
if (ExceptionRecord->ExceptionCode == STATUS_ASSERTION_FAILURE)
|
if (ExceptionRecord->ExceptionCode == STATUS_ASSERTION_FAILURE)
|
||||||
{
|
{
|
||||||
/* Warn about it */
|
/* Bump EIP to the instruction following the int 2C */
|
||||||
DbgPrint("\n!!! Assertion Failure at Address 0x%p !!!\n\n",
|
|
||||||
(PVOID)Context->Eip);
|
|
||||||
|
|
||||||
/* Bump EIP to the instruction following the int 2C and return */
|
|
||||||
Context->Eip += 2;
|
Context->Eip += 2;
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -57,26 +57,27 @@ extern BOOLEAN KdbpBugCheckRequested;
|
||||||
static KDB_ENTER_CONDITION KdbEnterConditions[][2] =
|
static KDB_ENTER_CONDITION KdbEnterConditions[][2] =
|
||||||
{
|
{
|
||||||
/* First chance Last chance */
|
/* First chance Last chance */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode }, /* Zero devide */
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 0: Zero divide */
|
||||||
{ KdbEnterFromKmode, KdbDoNotEnter }, /* Debug trap */
|
{ KdbEnterFromKmode, KdbDoNotEnter }, /* 1: Debug trap */
|
||||||
{ KdbDoNotEnter, KdbEnterAlways }, /* NMI */
|
{ KdbDoNotEnter, KdbEnterAlways }, /* 2: NMI */
|
||||||
{ KdbEnterFromKmode, KdbDoNotEnter }, /* INT3 */
|
{ KdbEnterFromKmode, KdbDoNotEnter }, /* 3: INT3 */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode }, /* Overflow */
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 4: Overflow */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode },
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 5: BOUND range exceeded */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode }, /* Invalid opcode */
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 6: Invalid opcode */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode }, /* No math coprocessor fault */
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 7: No math coprocessor fault */
|
||||||
{ KdbEnterAlways, KdbEnterAlways },
|
{ KdbEnterAlways, KdbEnterAlways }, /* 8: Double Fault */
|
||||||
{ KdbEnterAlways, KdbEnterAlways },
|
{ KdbEnterAlways, KdbEnterAlways }, /* 9: Unknown(9) */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode },
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 10: Invalid TSS */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode },
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 11: Segment Not Present */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode }, /* Stack fault */
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 12: Stack fault */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode }, /* General protection fault */
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 13: General protection fault */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode }, /* Page fault */
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 14: Page fault */
|
||||||
{ KdbEnterAlways, KdbEnterAlways }, /* Reserved (15) */
|
{ KdbEnterAlways, KdbEnterAlways }, /* 15: Reserved (15) */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode }, /* FPU fault */
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 16: FPU fault */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode },
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 17: Alignment Check */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode },
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 18: Machine Check */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode }, /* SIMD fault */
|
{ KdbDoNotEnter, KdbEnterFromKmode }, /* 19: SIMD fault */
|
||||||
|
{ KdbEnterAlways, KdbEnterAlways }, /* 20: Assertion failure */
|
||||||
{ KdbDoNotEnter, KdbEnterFromKmode } /* Last entry: used for unknown exceptions */
|
{ KdbDoNotEnter, KdbEnterFromKmode } /* Last entry: used for unknown exceptions */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,7 +103,8 @@ static const CHAR *ExceptionNrToString[] =
|
||||||
"Math Fault",
|
"Math Fault",
|
||||||
"Alignment Check",
|
"Alignment Check",
|
||||||
"Machine Check",
|
"Machine Check",
|
||||||
"SIMD Fault"
|
"SIMD Fault",
|
||||||
|
"Assertion Failure"
|
||||||
};
|
};
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
|
@ -1320,6 +1322,9 @@ KdbpGetExceptionNumberFromStatus(
|
||||||
case STATUS_FLOAT_MULTIPLE_TRAPS:
|
case STATUS_FLOAT_MULTIPLE_TRAPS:
|
||||||
Ret = 18;
|
Ret = 18;
|
||||||
break;
|
break;
|
||||||
|
case STATUS_ASSERTION_FAILURE:
|
||||||
|
Ret = 20;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Ret = RTL_NUMBER_OF(KdbEnterConditions) - 1;
|
Ret = RTL_NUMBER_OF(KdbEnterConditions) - 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue