From: Ben Gras Date: Fri, 12 Aug 2011 14:14:48 +0000 (+0000) Subject: kernel: show segment-adjusted pagefault addr X-Git-Tag: v3.2.0~370 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/addsub.png?a=commitdiff_plain;h=ca5e8b2c2defe65fd29d1ab54b64d8eef14a3ca6;p=minix.git kernel: show segment-adjusted pagefault addr --- diff --git a/kernel/arch/i386/exception.c b/kernel/arch/i386/exception.c index f44690550..d5224932b 100644 --- a/kernel/arch/i386/exception.c +++ b/kernel/arch/i386/exception.c @@ -103,6 +103,11 @@ PRIVATE void pagefault( struct proc *pr, "pc = 0x%x, addr = 0x%x, flags = 0x%x, is_nested %d\n", pr->p_endpoint, pr->p_name, cpuid, pr->p_reg.pc, pagefaultcr2, frame->errcode, is_nested); + if(!is_nested) { + printf("process vir addr of pagefault is 0x%lx\n", + pagefaultcr2 - + (pr->p_memmap[D].mem_phys << CLICK_SHIFT)); + } proc_stacktrace(pr); printf("pc of pagefault: 0x%lx\n", frame->eip); cause_sig(proc_nr(pr), SIGSEGV);