Author: hbelusca
Date: Wed Jan 25 22:43:04 2017
New Revision: 73596
URL:
http://svn.reactos.org/svn/reactos?rev=73596&view=rev
Log:
[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.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c
trunk/reactos/sdk/include/xdk/rtlfuncs.h
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c [iso-8859-1] Wed Jan 25
22:43:04 2017
@@ -35,7 +35,7 @@
#define SCREEN_ATTR 0x1F // Bright white on blue background
-void
+static void
i386PrintChar(char chr, ULONG x, ULONG y)
{
MachVideoPutChar(chr, SCREEN_ATTR, x, y);
@@ -45,7 +45,7 @@
ULONG i386_ScreenPosX = 0;
ULONG i386_ScreenPosY = 0;
-void
+static void
i386PrintText(char *pszText)
{
char chr;
@@ -66,7 +66,7 @@
}
}
-void
+static void
PrintText(const char *format, ...)
{
va_list argptr;
@@ -79,7 +79,7 @@
i386PrintText(buffer);
}
-void
+static void
i386PrintFrames(PKTRAP_FRAME TrapFrame)
{
FRAME *Frame;
@@ -105,6 +105,7 @@
{
PUCHAR InstructionPointer;
+ MachVideoHideShowTextCursor(FALSE);
MachVideoClearScreen(SCREEN_ATTR);
i386_ScreenPosX = 0;
i386_ScreenPosY = 0;
@@ -182,7 +183,7 @@
CHAR Buffer[1024];
va_list argptr;
- /* Blue screen for the win */
+ MachVideoHideShowTextCursor(FALSE);
MachVideoClearScreen(SCREEN_ATTR);
i386_ScreenPosX = 0;
i386_ScreenPosY = 0;
@@ -215,6 +216,7 @@
PCHAR File,
ULONG Line)
{
+ MachVideoHideShowTextCursor(FALSE);
MachVideoClearScreen(SCREEN_ATTR);
i386_ScreenPosX = 0;
i386_ScreenPosY = 0;
@@ -231,6 +233,8 @@
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]);
+ _disable();
+ __halt();
for (;;);
}
Modified: trunk/reactos/sdk/include/xdk/rtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/xdk/rtlfuncs.h…
==============================================================================
--- trunk/reactos/sdk/include/xdk/rtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/xdk/rtlfuncs.h [iso-8859-1] Wed Jan 25 22:43:04 2017
@@ -3314,7 +3314,7 @@
# define NT_ASSERTMSGW NT_ASSERTMSGW_NOASSUME
#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
#define ASSERT NT_ASSERT
#undef ASSERTMSG