]> Zhao Yanbai Git Server - minix.git/commitdiff
kernel: show segment-adjusted pagefault addr
authorBen Gras <ben@minix3.org>
Fri, 12 Aug 2011 14:14:48 +0000 (14:14 +0000)
committerBen Gras <ben@minix3.org>
Fri, 12 Aug 2011 15:16:52 +0000 (15:16 +0000)
kernel/arch/i386/exception.c

index f446905504c9d93960fb20e581e781df18ea5cac..d5224932b56d9bf57570de756cb72063da58da2f 100644 (file)
@@ -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);