mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 12:40:33 +00:00
[XDK]: Do not always redefine the ASSERT(MSG) macros with the NT_xxx ones, especially for the FreeLdr/... bootloader (where we don't use WinDbg for debugging, yet), because in this case the int 0x2c is hardly informative. We fall back to the good old RtlAssert which displays an assertion failure string in the default debug output port (e.g. serial), and then does an int 0x03.
[FREELDR] - "static"-ify some printing helper functions; - hide the textmode cursor before blue-screening; - disable interrupts before hanging forever. svn path=/trunk/; revision=73596
This commit is contained in:
parent
9ec5efa4f7
commit
bf571b10a0
2 changed files with 10 additions and 6 deletions
|
@ -35,7 +35,7 @@ char *i386ExceptionDescriptionText[] =
|
||||||
|
|
||||||
#define SCREEN_ATTR 0x1F // Bright white on blue background
|
#define SCREEN_ATTR 0x1F // Bright white on blue background
|
||||||
|
|
||||||
void
|
static void
|
||||||
i386PrintChar(char chr, ULONG x, ULONG y)
|
i386PrintChar(char chr, ULONG x, ULONG y)
|
||||||
{
|
{
|
||||||
MachVideoPutChar(chr, SCREEN_ATTR, x, y);
|
MachVideoPutChar(chr, SCREEN_ATTR, x, y);
|
||||||
|
@ -45,7 +45,7 @@ i386PrintChar(char chr, ULONG x, ULONG y)
|
||||||
ULONG i386_ScreenPosX = 0;
|
ULONG i386_ScreenPosX = 0;
|
||||||
ULONG i386_ScreenPosY = 0;
|
ULONG i386_ScreenPosY = 0;
|
||||||
|
|
||||||
void
|
static void
|
||||||
i386PrintText(char *pszText)
|
i386PrintText(char *pszText)
|
||||||
{
|
{
|
||||||
char chr;
|
char chr;
|
||||||
|
@ -66,7 +66,7 @@ i386PrintText(char *pszText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
PrintText(const char *format, ...)
|
PrintText(const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
|
@ -79,7 +79,7 @@ PrintText(const char *format, ...)
|
||||||
i386PrintText(buffer);
|
i386PrintText(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
i386PrintFrames(PKTRAP_FRAME TrapFrame)
|
i386PrintFrames(PKTRAP_FRAME TrapFrame)
|
||||||
{
|
{
|
||||||
FRAME *Frame;
|
FRAME *Frame;
|
||||||
|
@ -105,6 +105,7 @@ i386PrintExceptionText(ULONG TrapIndex, PKTRAP_FRAME TrapFrame, PKSPECIAL_REGIST
|
||||||
{
|
{
|
||||||
PUCHAR InstructionPointer;
|
PUCHAR InstructionPointer;
|
||||||
|
|
||||||
|
MachVideoHideShowTextCursor(FALSE);
|
||||||
MachVideoClearScreen(SCREEN_ATTR);
|
MachVideoClearScreen(SCREEN_ATTR);
|
||||||
i386_ScreenPosX = 0;
|
i386_ScreenPosX = 0;
|
||||||
i386_ScreenPosY = 0;
|
i386_ScreenPosY = 0;
|
||||||
|
@ -182,7 +183,7 @@ FrLdrBugCheckWithMessage(
|
||||||
CHAR Buffer[1024];
|
CHAR Buffer[1024];
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
|
|
||||||
/* Blue screen for the win */
|
MachVideoHideShowTextCursor(FALSE);
|
||||||
MachVideoClearScreen(SCREEN_ATTR);
|
MachVideoClearScreen(SCREEN_ATTR);
|
||||||
i386_ScreenPosX = 0;
|
i386_ScreenPosX = 0;
|
||||||
i386_ScreenPosY = 0;
|
i386_ScreenPosY = 0;
|
||||||
|
@ -215,6 +216,7 @@ FrLdrBugCheckEx(
|
||||||
PCHAR File,
|
PCHAR File,
|
||||||
ULONG Line)
|
ULONG Line)
|
||||||
{
|
{
|
||||||
|
MachVideoHideShowTextCursor(FALSE);
|
||||||
MachVideoClearScreen(SCREEN_ATTR);
|
MachVideoClearScreen(SCREEN_ATTR);
|
||||||
i386_ScreenPosX = 0;
|
i386_ScreenPosX = 0;
|
||||||
i386_ScreenPosY = 0;
|
i386_ScreenPosY = 0;
|
||||||
|
@ -231,6 +233,8 @@ FrLdrBugCheckEx(
|
||||||
PrintText("Bug Information:\n %p\n %p\n %p\n %p\n %p\n\n",
|
PrintText("Bug Information:\n %p\n %p\n %p\n %p\n %p\n\n",
|
||||||
BugCheckInfo[0], BugCheckInfo[1], BugCheckInfo[2], BugCheckInfo[3], BugCheckInfo[4]);
|
BugCheckInfo[0], BugCheckInfo[1], BugCheckInfo[2], BugCheckInfo[3], BugCheckInfo[4]);
|
||||||
|
|
||||||
|
_disable();
|
||||||
|
__halt();
|
||||||
for (;;);
|
for (;;);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3314,7 +3314,7 @@ RtlCheckBit(
|
||||||
# define NT_ASSERTMSGW NT_ASSERTMSGW_NOASSUME
|
# define NT_ASSERTMSGW NT_ASSERTMSGW_NOASSUME
|
||||||
#endif /* NT_ASSERT_ALWAYS_ASSUMES */
|
#endif /* NT_ASSERT_ALWAYS_ASSUMES */
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (defined(__REACTOS__) || defined(ASSERT_ALWAYS_NT_ASSERT))
|
#if defined(_MSC_VER) && (defined(__REACTOS__) || defined(ASSERT_ALWAYS_NT_ASSERT)) && !defined(_BLDR_)
|
||||||
#undef ASSERT
|
#undef ASSERT
|
||||||
#define ASSERT NT_ASSERT
|
#define ASSERT NT_ASSERT
|
||||||
#undef ASSERTMSG
|
#undef ASSERTMSG
|
||||||
|
|
Loading…
Reference in a new issue