* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bug.c,v 1.41 2003/12/30 18:52:04 fireball Exp $
+/* $Id: bug.c,v 1.42 2004/03/06 22:24:13 dwelch Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/bug.c
{
#if defined(__GNUC__)
__asm__("sti\n\t");
- DbgBreakPoint();
+ DbgBreakPointNoBugCheck();
__asm__("cli\n\t");
#elif defined(_MSC_VER)
__asm sti
- DbgBreakPoint();
+ DbgBreakPointNoBugCheck();
__asm cli
#else
#error Unknown compiler for inline assembler
{
#if defined(__GNUC__)
__asm__("sti\n\t");
- DbgBreakPoint();
+ DbgBreakPointNoBugCheck();
__asm__("cli\n\t");
#elif defined(_MSC_VER)
__asm sti
- DbgBreakPoint();
+ DbgBreakPointNoBugCheck();
__asm cli
#else
#error Unknown compiler for inline assembler
* 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.39 2003/12/30 18:52:04 fireball Exp $
+/* $Id: catch.c,v 1.40 2004/03/06 22:24:13 dwelch Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/catch.c
if (Value != ExceptionContinueExecution ||
0 != (ExceptionRecord->ExceptionFlags & EXCEPTION_NONCONTINUABLE))
{
- DbgPrint("ExceptionRecord->ExceptionAddress = 0x%x\n",
- ExceptionRecord->ExceptionAddress );
- KEBUGCHECKWITHTF(KMODE_EXCEPTION_NOT_HANDLED, 0, 0, 0, 0, Tf);
+ DPRINT("ExceptionRecord->ExceptionAddress = 0x%x\n",
+ ExceptionRecord->ExceptionAddress );
+ KeBugCheckWithTf(KMODE_EXCEPTION_NOT_HANDLED, 0, 0, 0, 0, Tf);
}
}
}
OldTss->Fs, OldTss->Gs);
DbgPrint("EAX: %.8x EBX: %.8x ECX: %.8x\n", OldTss->Eax, OldTss->Ebx,
OldTss->Ecx);
- DbgPrint("EDX: %.8x EBP: %.8x ESI: %.8x\n", OldTss->Edx, OldTss->Ebp,
- OldTss->Esi);
+ DbgPrint("EDX: %.8x EBP: %.8x ESI: %.8x\n ESP: %.8x", OldTss->Edx,
+ OldTss->Ebp, OldTss->Esi, Esp0);
DbgPrint("EDI: %.8x EFLAGS: %.8x ", OldTss->Edi, OldTss->Eflags);
if (OldTss->Cs == KERNEL_CS)
{
}
if ((OldTss->Cs & 0xffff) == KERNEL_CS)
{
- DbgPrint("ESP %x\n", Esp0);
if (PsGetCurrentThread() != NULL)
{
StackLimit = (ULONG)PsGetCurrentThread()->Tcb.StackBase;
DbgPrint("DS %x ES %x FS %x GS %x\n", Tf->Ds&0xffff, Tf->Es&0xffff,
Tf->Fs&0xffff, Tf->Gs&0xfff);
DbgPrint("EAX: %.8x EBX: %.8x ECX: %.8x\n", Tf->Eax, Tf->Ebx, Tf->Ecx);
- DbgPrint("EDX: %.8x EBP: %.8x ESI: %.8x\n", Tf->Edx, Tf->Ebp, Tf->Esi);
+ DbgPrint("EDX: %.8x EBP: %.8x ESI: %.8x ESP: %.8x\n", Tf->Edx,
+ Tf->Ebp, Tf->Esi, Esp0);
DbgPrint("EDI: %.8x EFLAGS: %.8x ", Tf->Edi, Tf->Eflags);
if ((Tf->Cs&0xffff) == KERNEL_CS)
{
}
}
- DbgPrint("ESP %x\n", Esp0);
-
if (PsGetCurrentThread() != NULL)
{
StackLimit = (ULONG)PsGetCurrentThread()->Tcb.StackBase;
}
}
+ /*
+ * Check for a breakpoint that was only for the attention of the debugger.
+ */
+ if (ExceptionNr == 3 && Tf->Eip == ((ULONG)DbgBreakPointNoBugCheck) + 1)
+ {
+ /*
+ EIP is already adjusted by the processor to point to the instruction
+ after the breakpoint.
+ */
+ return(0);
+ }
+
/*
* Handle user exceptions differently
*/