kernel: show segment-adjusted pagefault addr

This commit is contained in:
Ben Gras 2011-08-12 14:14:48 +00:00
parent 7b70f548e4
commit ca5e8b2c2d

View 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);