4#include <reactos/buildno.h>
17 "NON-MASKABLE INTERRUPT EXCEPTION",
24 "COPROCESSOR SEGMENT OVERRUN",
26 "SEGMENT NOT PRESENT",
28 "GENERAL PROTECTION FAULT",
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"
121 "0x%02lx: Exception %02X: %s\n\n",
127 PrintText(
"EAX: %.8lx ESP: %.8lx CR0: %.8lx DR0: %.8lx\n",
129 PrintText(
"EBX: %.8lx EBP: %.8lx CR1: ???????? DR1: %.8lx\n",
130 TrapFrame->
Ebx, TrapFrame->
Ebp, TrapFrame->
Dr1);
131 PrintText(
"ECX: %.8lx ESI: %.8lx CR2: %.8lx DR2: %.8lx\n",
132 TrapFrame->
Ecx, TrapFrame->
Esi, Special->
Cr2, TrapFrame->
Dr2);
133 PrintText(
"EDX: %.8lx EDI: %.8lx CR3: %.8lx DR3: %.8lx\n",
134 TrapFrame->
Edx, TrapFrame->
Edi, Special->
Cr3, TrapFrame->
Dr3);
136 41,
"", Special->
Cr4, TrapFrame->
Dr6);
138 62,
"", TrapFrame->
Dr7);
145 PrintText(
" DS: %.4lx ERROR CODE: %.8lx\n",
149 PrintText(
" FS: %.4lx GDTR Base: %.8lx Limit: %.4x\n",
152 PrintText(
" GS: %.4lx IDTR Base: %.8lx Limit: %.4x\n",
155 PrintText(
" SS: %.4lx LDTR: %.4lx TR: %.4lx\n\n",
158 PrintText(
"RAX: %.8lx R8: %.8lx R12: %.8lx RSI: %.8lx\n",
159 TrapFrame->
Rax, TrapFrame->
R8, 0, TrapFrame->
Rsi);
160 PrintText(
"RBX: %.8lx R9: %.8lx R13: %.8lx RDI: %.8lx\n",
161 TrapFrame->
Rbx, TrapFrame->
R9, 0, TrapFrame->
Rdi);
162 PrintText(
"RCX: %.8lx R10: %.8lx R14: %.8lx RBP: %.8lx\n",
163 TrapFrame->
Rcx, TrapFrame->
R10, 0, TrapFrame->
Rbp);
164 PrintText(
"RDX: %.8lx R11: %.8lx R15: %.8lx RSP: %.8lx\n",
165 TrapFrame->
Rdx, TrapFrame->
R11, 0, TrapFrame->
Rsp);
169 PrintText(
" DS: %.4lx ERROR CODE: %.8lx\n",
173 PrintText(
" FS: %.4lx GDTR Base: %.8lx Limit: %.4x\n",
175 PrintText(
" GS: %.4lx IDTR Base: %.8lx Limit: %.4x\n",
177 PrintText(
" SS: %.4lx LDTR: %.4lx TR: %.4lx\n\n",
185 InstructionPointer = (
PUCHAR)TrapFrame->
Eip;
187 InstructionPointer = (
PUCHAR)TrapFrame->
Rip;
190 if ((TrapIndex == 3) || (TrapIndex == 4))
191 InstructionPointer--;
193 PrintText(
"\nInstruction stream: %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x\n",
194 InstructionPointer[0], InstructionPointer[1],
195 InstructionPointer[2], InstructionPointer[3],
196 InstructionPointer[4], InstructionPointer[5],
197 InstructionPointer[6], InstructionPointer[7]);
216 PrintText(
"A problem has been detected and FreeLoader boot has been aborted.\n\n");
247 PrintText(
"A problem has been detected and FreeLoader boot has been aborted.\n\n");
256 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 DECLSPEC_NORETURN void FrLdrBugCheckEx(ULONG BugCode, PCHAR File, ULONG Line)
static void PrintTextV(const CHAR *Format, va_list args)
static void i386PrintFrames(PKTRAP_FRAME TrapFrame)
static ULONG i386_ScreenPosY
static void i386PrintText(CHAR *pszText)
static ULONG i386_ScreenPosX
DECLSPEC_NORETURN VOID FrLdrBugCheckWithMessage(ULONG BugCode, PCHAR File, ULONG Line, PSTR Format,...)
static const CHAR * i386ExceptionDescriptionText[]
void NTAPI i386PrintExceptionText(ULONG TrapIndex, PKTRAP_FRAME TrapFrame, PKSPECIAL_REGISTERS Special)
static void PrintText(const CHAR *Format,...)
DECLSPEC_NORETURN void NTAPI FrLdrBugCheck(ULONG BugCode)
void __cdecl _disable(void)
__INTRIN_INLINE void __halt(void)
#define DECLSPEC_NORETURN
_In_ HFONT _Out_ PUINT _Out_ PUINT Width