4#include <reactos/buildno.h>
15 "Exception 00: DIVIDE BY ZERO",
16 "Exception 01: DEBUG EXCEPTION",
17 "Exception 02: NON-MASKABLE INTERRUPT EXCEPTION",
18 "Exception 03: BREAKPOINT (INT 3)",
19 "Exception 04: OVERFLOW",
20 "Exception 05: BOUND EXCEPTION",
21 "Exception 06: INVALID OPCODE",
22 "Exception 07: FPU NOT AVAILABLE",
23 "Exception 08: DOUBLE FAULT",
24 "Exception 09: COPROCESSOR SEGMENT OVERRUN",
25 "Exception 0A: INVALID TSS",
26 "Exception 0B: SEGMENT NOT PRESENT",
27 "Exception 0C: STACK EXCEPTION",
28 "Exception 0D: GENERAL PROTECTION FAULT",
29 "Exception 0E: PAGE FAULT",
30 "Exception 0F: Reserved",
31 "Exception 10: COPROCESSOR ERROR",
32 "Exception 11: ALIGNMENT CHECK",
33 "Exception 12: MACHINE CHECK"
36#define SCREEN_ATTR 0x1F
112 PUCHAR InstructionPointer;
119 PrintText(
"FreeLdr " KERNEL_VERSION_STR
" " KERNEL_VERSION_BUILD_STR
"\n"
120 "Report this error on the ReactOS Bug Tracker: https://jira.reactos.org\n\n"
124 PrintText(
"EAX: %.8lx ESP: %.8lx CR0: %.8lx DR0: %.8lx\n",
126 PrintText(
"EBX: %.8lx EBP: %.8lx CR1: ???????? DR1: %.8lx\n",
127 TrapFrame->
Ebx, TrapFrame->
Ebp, TrapFrame->
Dr1);
128 PrintText(
"ECX: %.8lx ESI: %.8lx CR2: %.8lx DR2: %.8lx\n",
129 TrapFrame->
Ecx, TrapFrame->
Esi, Special->
Cr2, TrapFrame->
Dr2);
130 PrintText(
"EDX: %.8lx EDI: %.8lx CR3: %.8lx DR3: %.8lx\n",
131 TrapFrame->
Edx, TrapFrame->
Edi, Special->
Cr3, TrapFrame->
Dr3);
133 41,
"", Special->
Cr4, TrapFrame->
Dr6);
135 62,
"", TrapFrame->
Dr7);
142 PrintText(
" DS: %.4lx ERROR CODE: %.8lx\n",
146 PrintText(
" FS: %.4lx GDTR Base: %.8lx Limit: %.4x\n",
149 PrintText(
" GS: %.4lx IDTR Base: %.8lx Limit: %.4x\n",
152 PrintText(
" SS: %.4lx LDTR: %.4lx TR: %.4lx\n\n",
155 PrintText(
"RAX: %.8lx R8: %.8lx R12: %.8lx RSI: %.8lx\n",
156 TrapFrame->
Rax, TrapFrame->
R8, 0, TrapFrame->
Rsi);
157 PrintText(
"RBX: %.8lx R9: %.8lx R13: %.8lx RDI: %.8lx\n",
158 TrapFrame->
Rbx, TrapFrame->
R9, 0, TrapFrame->
Rdi);
159 PrintText(
"RCX: %.8lx R10: %.8lx R14: %.8lx RBP: %.8lx\n",
160 TrapFrame->
Rcx, TrapFrame->
R10, 0, TrapFrame->
Rbp);
161 PrintText(
"RDX: %.8lx R11: %.8lx R15: %.8lx RSP: %.8lx\n",
162 TrapFrame->
Rdx, TrapFrame->
R11, 0, TrapFrame->
Rsp);
166 PrintText(
" DS: %.4lx ERROR CODE: %.8lx\n",
170 PrintText(
" FS: %.4lx GDTR Base: %.8lx Limit: %.4x\n",
172 PrintText(
" GS: %.4lx IDTR Base: %.8lx Limit: %.4x\n",
174 PrintText(
" SS: %.4lx LDTR: %.4lx TR: %.4lx\n\n",
182 InstructionPointer = (
PUCHAR)TrapFrame->
Eip;
184 InstructionPointer = (
PUCHAR)TrapFrame->
Rip;
187 if ((TrapIndex == 3) || (TrapIndex == 4))
188 InstructionPointer--;
190 PrintText(
"\nInstruction stream: %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x\n",
191 InstructionPointer[0], InstructionPointer[1],
192 InstructionPointer[2], InstructionPointer[3],
193 InstructionPointer[4], InstructionPointer[5],
194 InstructionPointer[6], InstructionPointer[7]);
212 PrintText(
"A problem has been detected and FreeLoader boot has been aborted.\n\n");
242 PrintText(
"A problem has been detected and FreeLoader boot has been aborted.\n\n");
251 PrintText(
"Bug Information:\n %p\n %p\n %p\n %p\n %p\n\n",
ULONG_PTR BugCheckInfo[5]
#define MachVideoClearScreen(Attr)
#define MachVideoGetDisplaySize(W, H, D)
#define MachVideoHideShowTextCursor(Show)
#define MachVideoPutChar(Ch, Attr, X, Y)
static void PrintTextV(const CHAR *Format, va_list args)
void NTAPI FrLdrBugCheckEx(ULONG BugCode, PCHAR File, ULONG Line)
void NTAPI FrLdrBugCheck(ULONG BugCode)
VOID FrLdrBugCheckWithMessage(ULONG BugCode, PCHAR File, ULONG Line, PSTR Format,...)
static void i386PrintFrames(PKTRAP_FRAME TrapFrame)
static ULONG i386_ScreenPosY
static void i386PrintText(CHAR *pszText)
static ULONG i386_ScreenPosX
static const CHAR * i386ExceptionDescriptionText[]
void NTAPI i386PrintExceptionText(ULONG TrapIndex, PKTRAP_FRAME TrapFrame, PKSPECIAL_REGISTERS Special)
static void PrintText(const CHAR *Format,...)
void __cdecl _disable(void)
__INTRIN_INLINE void __halt(void)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width