From: John Hodge Date: Tue, 1 Mar 2011 06:38:03 +0000 (+0800) Subject: Kernel - Added backtrace for user segfault X-Git-Tag: rel0.10~180 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=142cba687f6eede6de63efbb25d2fc811f2fe1d1;p=tpg%2Facess2.git Kernel - Added backtrace for user segfault --- diff --git a/Kernel/arch/x86/mm_virt.c b/Kernel/arch/x86/mm_virt.c index 68fd5c0d..72c40c2a 100644 --- a/Kernel/arch/x86/mm_virt.c +++ b/Kernel/arch/x86/mm_virt.c @@ -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 ; }