PERFORCE change 30857 for review
Peter Wemm
peter at FreeBSD.org
Fri May 9 11:14:40 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=30857
Change 30857 by peter at peter_daintree on 2003/05/09 11:14:12
This is not for commit to cvs. Print some info about page fault
traps. This is a poor substitute for gdb, but helped me a lot.
And if I dont submit it on its own soon, I'm going to accidently
include it in another submit without comment.
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/trap.c#8 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/trap.c#8 (text+ko) ====
@@ -551,6 +551,11 @@
return (-1);
}
+printf("trap_pfault: pid %d %s %s %s eva %p, rip %p, rax %p, rbx %p, rcx %p, rdx %p, rsp %p, rvp %p, rsi %p, rdi %p\n", p->p_pid,
+ frame->tf_err & PGEX_U ? "user" : "supervisor",
+ frame->tf_err & PGEX_W ? "write" : "read",
+ frame->tf_err & PGEX_P ? "protection violation" : "page not present",
+eva, frame->tf_rip, frame->tf_rax, frame->tf_rbx, frame->tf_rcx, frame->tf_rdx, frame->tf_rsp, frame->tf_rbp, frame->tf_rsi, frame->tf_rdi);
/* kludge to pass faulting virtual address to sendsig */
frame->tf_err = eva;
More information about the p4-projects
mailing list