From 387c84f0f5af6340368a75a6342e241158452407 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Fri, 25 Aug 2006 04:11:45 +0000 Subject: [PATCH] - Add some debugging code to see why trap frames are screwed up. svn path=/trunk/; revision=23701 --- .../ntoskrnl/include/internal/i386/asmmacro.S | 16 +++++++++++++++- reactos/ntoskrnl/ke/i386/trap.s | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/include/internal/i386/asmmacro.S b/reactos/ntoskrnl/include/internal/i386/asmmacro.S index e9d3579577b..2e0cf174862 100644 --- a/reactos/ntoskrnl/include/internal/i386/asmmacro.S +++ b/reactos/ntoskrnl/include/internal/i386/asmmacro.S @@ -570,7 +570,7 @@ _KiUnexpectedInterrupt&Number: 5: #ifdef DBG sub dword ptr [esp+KTRAP_FRAME_DEBUGARGMARK], 0xBADB0D00 - //jnz 0f // FIXME: ROS IS BROKEN + jnz 0f /* Assert FS */ mov bx, fs @@ -752,12 +752,26 @@ FastExit: jmp 3b .endif +#if DBG 0: +#if 0 + /* Print a message */ + mov esi, [esp+KTRAP_FRAME_DEBUGARGMARK] + mov edi, [esp+KTRAP_FRAME_DEBUGARGMARK-4] + push edi + push esi + push offset Broken + call _DbgPrint + add esp, 12 +#endif + jmp 2b // ros hack + /* Fix up the mask */ add dword ptr [esp+KTRAP_FRAME_DEBUGARGMARK], 0xBADB0D00 6: int 3 jmp 5b +#endif 2: /* Check if this was V86 mode */ diff --git a/reactos/ntoskrnl/ke/i386/trap.s b/reactos/ntoskrnl/ke/i386/trap.s index 415fd14a356..0ffd6f59262 100644 --- a/reactos/ntoskrnl/ke/i386/trap.s +++ b/reactos/ntoskrnl/ke/i386/trap.s @@ -84,6 +84,9 @@ _KiUnexpectedEntrySize: _UnexpectedMsg: .asciz "\n\x7\x7!!! Unexpected Interrupt %02lx !!!\n" +Broken: + .asciz "\n\x7\x7!!! Broken TrapFrame. Magic: %08lx MagicB: %08lx!!!\n" + /* SOFTWARE INTERRUPT SERVICES ***********************************************/ _KiGetTickCount: