Kernel - Added backtrace for user segfault
authorJohn Hodge <[email protected]>
Tue, 1 Mar 2011 06:38:03 +0000 (14:38 +0800)
committerJohn Hodge <[email protected]>
Tue, 1 Mar 2011 06:38:03 +0000 (14:38 +0800)
Kernel/arch/x86/mm_virt.c

index 68fd5c0..72c40c2 100644 (file)
@@ -218,6 +218,9 @@ void MM_PageFault(tVAddr Addr, Uint ErrorCode, tRegs *Regs)
                        );
                Warning("User Pagefault: Instruction at %04x:%08x accessed %p", Regs->cs, Regs->eip, Addr);
                __asm__ __volatile__ ("sti");   // Restart IRQs
+               #if 1
+               Error_Backtrace(Regs->eip, Regs->ebp);
+               #endif
                Threads_SegFault(Addr);
                return ;
        }

UCC git Repository :: git.ucc.asn.au