amd64: Print more information when applications segfault.
authorJordan Gordeev <jgordeev@dir.bg>
Wed, 3 Jun 2009 16:14:24 +0000 (19:14 +0300)
committerJordan Gordeev <jgordeev@dir.bg>
Fri, 5 Jun 2009 18:57:18 +0000 (21:57 +0300)
sys/platform/pc64/amd64/trap.c

index 0094e4c..2487ce6 100644 (file)
@@ -897,8 +897,9 @@ nogo:
         * NOTE: on amd64 we have a tf_addr field in the trapframe, no
         * kludge is needed to pass the fault address to signal handlers.
         */
-       kprintf("seg-fault accessing address %p ip=%p\n",
-               va, frame->tf_rip);
+       struct proc *p = td->td_proc;
+       kprintf("seg-fault accessing address %p rip=%p pid=%d p_comm=%s\n",
+               va, frame->tf_rip, p->p_pid, p->p_comm);
        /* Debugger("seg-fault"); */
 
        return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV);