mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +00:00
KeBugCheck() calls KeBugCheckEx().
KeBugCheckEx() displays additional bug message. svn path=/trunk/; revision=2498
This commit is contained in:
parent
1208d849d0
commit
25c85c7dfe
1 changed files with 75 additions and 70 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* ReactOS kernel
|
||||
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -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: bug.c,v 1.18 2001/04/17 04:11:00 dwelch Exp $
|
||||
/* $Id: bug.c,v 1.19 2002/01/10 00:59:32 ekohl Exp $
|
||||
*
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: ntoskrnl/ke/bug.c
|
||||
|
@ -88,11 +88,44 @@ KeBugCheckEx (ULONG BugCheckCode,
|
|||
* RETURNS: Doesn't
|
||||
*/
|
||||
{
|
||||
PRTL_MESSAGE_RESOURCE_ENTRY Message;
|
||||
NTSTATUS Status;
|
||||
|
||||
/* PJS: disable interrupts first, then do the rest */
|
||||
__asm__("cli\n\t");
|
||||
DbgPrint("Bug detected (code %x param %x %x %x %x)\n",BugCheckCode,
|
||||
BugCheckParameter1,BugCheckParameter2,BugCheckParameter3,
|
||||
DbgPrint("Bug detected (code %x param %x %x %x %x)\n",
|
||||
BugCheckCode,
|
||||
BugCheckParameter1,
|
||||
BugCheckParameter2,
|
||||
BugCheckParameter3,
|
||||
BugCheckParameter4);
|
||||
|
||||
Status = RtlFindMessage((PVOID)KERNEL_BASE, //0xC0000000,
|
||||
11, //RT_MESSAGETABLE,
|
||||
0x09, //0x409,
|
||||
BugCheckCode,
|
||||
&Message);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
if (Message->Flags == 0)
|
||||
DbgPrint(" %s\n", Message->Text);
|
||||
else
|
||||
DbgPrint(" %S\n", (PWSTR)Message->Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
DbgPrint(" No message text found!\n\n");
|
||||
}
|
||||
|
||||
if (InBugCheck == 1)
|
||||
{
|
||||
DbgPrint("Recursive bug check halting now\n");
|
||||
for (;;)
|
||||
{
|
||||
__asm__("hlt\n\t");
|
||||
}
|
||||
}
|
||||
InBugCheck = 1;
|
||||
if (PsGetCurrentProcess() != NULL)
|
||||
{
|
||||
DbgPrint("Pid: %x <", PsGetCurrentProcess()->UniqueProcessId);
|
||||
|
@ -128,35 +161,7 @@ KeBugCheck (ULONG BugCheckCode)
|
|||
* RETURNS: Doesn't
|
||||
*/
|
||||
{
|
||||
__asm__("cli\n\t");
|
||||
DbgPrint("Bug detected (code %x)\n", BugCheckCode);
|
||||
if (InBugCheck == 1)
|
||||
{
|
||||
DbgPrint("Recursive bug check halting now\n");
|
||||
for(;;);
|
||||
}
|
||||
InBugCheck = 1;
|
||||
if (PsGetCurrentProcess() != NULL)
|
||||
{
|
||||
DbgPrint("Pid: %x <", PsGetCurrentProcess()->UniqueProcessId);
|
||||
DbgPrint("%.8s> ", PsGetCurrentProcess()->ImageFileName);
|
||||
}
|
||||
if (PsGetCurrentThread() != NULL)
|
||||
{
|
||||
DbgPrint("Thrd: %x Tid: %x\n",
|
||||
PsGetCurrentThread(),
|
||||
PsGetCurrentThread()->Cid.UniqueThread);
|
||||
}
|
||||
// PsDumpThreads();
|
||||
KeDumpStackFrames((PULONG)__builtin_frame_address(0));
|
||||
#if 1
|
||||
for(;;)
|
||||
{
|
||||
__asm__("hlt\n\t");
|
||||
}
|
||||
#else
|
||||
for(;;);
|
||||
#endif
|
||||
KeBugCheckEx(BugCheckCode, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue