From: Jordan Gordeev Date: Wed, 3 Jun 2009 16:14:24 +0000 (+0300) Subject: amd64: Print more information when applications segfault. X-Git-Url: https://gitweb.dragonflybsd.org/~syl/dragonfly.git/commitdiff_plain/91915136a245001ad06c980e14e73f57bb8d17f0 amd64: Print more information when applications segfault. --- diff --git a/sys/platform/pc64/amd64/trap.c b/sys/platform/pc64/amd64/trap.c index 0094e4cacc..2487ce6eae 100644 --- a/sys/platform/pc64/amd64/trap.c +++ b/sys/platform/pc64/amd64/trap.c @@ -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);