Author: tkreuzer
Date: Thu Oct 16 21:33:32 2014
New Revision: 64770
URL:
http://svn.reactos.org/svn/reactos?rev=64770&view=rev
Log:
{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...)
Modified:
trunk/reactos/ntoskrnl/kd/kdmain.c
trunk/reactos/ntoskrnl/kdbg/kdb.c
Modified: trunk/reactos/ntoskrnl/kd/kdmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=6…
==============================================================================
--- trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] Thu Oct 16 21:33:32 2014
@@ -189,13 +189,8 @@
/* Check if this is an assertion failure */
if (ExceptionRecord->ExceptionCode == STATUS_ASSERTION_FAILURE)
{
- /* Warn about it */
- DbgPrint("\n!!! Assertion Failure at Address 0x%p !!!\n\n",
- (PVOID)Context->Eip);
-
- /* Bump EIP to the instruction following the int 2C and return */
+ /* Bump EIP to the instruction following the int 2C */
Context->Eip += 2;
- return TRUE;
}
#endif
Modified: trunk/reactos/ntoskrnl/kdbg/kdb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb.c?rev=64…
==============================================================================
--- trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] Thu Oct 16 21:33:32 2014
@@ -57,26 +57,27 @@
static KDB_ENTER_CONDITION KdbEnterConditions[][2] =
{
/* First chance Last chance */
- { KdbDoNotEnter, KdbEnterFromKmode }, /* Zero devide */
- { KdbEnterFromKmode, KdbDoNotEnter }, /* Debug trap */
- { KdbDoNotEnter, KdbEnterAlways }, /* NMI */
- { KdbEnterFromKmode, KdbDoNotEnter }, /* INT3 */
- { KdbDoNotEnter, KdbEnterFromKmode }, /* Overflow */
- { KdbDoNotEnter, KdbEnterFromKmode },
- { KdbDoNotEnter, KdbEnterFromKmode }, /* Invalid opcode */
- { KdbDoNotEnter, KdbEnterFromKmode }, /* No math coprocessor fault */
- { KdbEnterAlways, KdbEnterAlways },
- { KdbEnterAlways, KdbEnterAlways },
- { KdbDoNotEnter, KdbEnterFromKmode },
- { KdbDoNotEnter, KdbEnterFromKmode },
- { KdbDoNotEnter, KdbEnterFromKmode }, /* Stack fault */
- { KdbDoNotEnter, KdbEnterFromKmode }, /* General protection fault */
- { KdbDoNotEnter, KdbEnterFromKmode }, /* Page fault */
- { KdbEnterAlways, KdbEnterAlways }, /* Reserved (15) */
- { KdbDoNotEnter, KdbEnterFromKmode }, /* FPU fault */
- { KdbDoNotEnter, KdbEnterFromKmode },
- { KdbDoNotEnter, KdbEnterFromKmode },
- { KdbDoNotEnter, KdbEnterFromKmode }, /* SIMD fault */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 0: Zero divide */
+ { KdbEnterFromKmode, KdbDoNotEnter }, /* 1: Debug trap */
+ { KdbDoNotEnter, KdbEnterAlways }, /* 2: NMI */
+ { KdbEnterFromKmode, KdbDoNotEnter }, /* 3: INT3 */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 4: Overflow */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 5: BOUND range exceeded */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 6: Invalid opcode */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 7: No math coprocessor fault */
+ { KdbEnterAlways, KdbEnterAlways }, /* 8: Double Fault */
+ { KdbEnterAlways, KdbEnterAlways }, /* 9: Unknown(9) */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 10: Invalid TSS */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 11: Segment Not Present */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 12: Stack fault */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 13: General protection fault */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 14: Page fault */
+ { KdbEnterAlways, KdbEnterAlways }, /* 15: Reserved (15) */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 16: FPU fault */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 17: Alignment Check */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 18: Machine Check */
+ { KdbDoNotEnter, KdbEnterFromKmode }, /* 19: SIMD fault */
+ { KdbEnterAlways, KdbEnterAlways }, /* 20: Assertion failure */
{ KdbDoNotEnter, KdbEnterFromKmode } /* Last entry: used for unknown
exceptions */
};
@@ -102,7 +103,8 @@
"Math Fault",
"Alignment Check",
"Machine Check",
- "SIMD Fault"
+ "SIMD Fault",
+ "Assertion Failure"
};
ULONG
@@ -1320,6 +1322,9 @@
case STATUS_FLOAT_MULTIPLE_TRAPS:
Ret = 18;
break;
+ case STATUS_ASSERTION_FAILURE:
+ Ret = 20;
+ break;
default:
Ret = RTL_NUMBER_OF(KdbEnterConditions) - 1;