diff options
author | Roland McGrath <roland@redhat.com> | 2005-03-06 22:24:29 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2005-03-06 22:24:29 +0000 |
commit | 3a055d7d64222223da2550ca540043de7e3e232b (patch) | |
tree | 892835146e833716932d32fd31e8f24afbe9f74a | |
parent | 4859f6cef86519201dad8ecac933576d963c2e36 (diff) | |
download | strace-3a055d7d64222223da2550ca540043de7e3e232b.tar.gz strace-3a055d7d64222223da2550ca540043de7e3e232b.tar.bz2 strace-3a055d7d64222223da2550ca540043de7e3e232b.tar.xz |
2005-03-06 Roland McGrath <roland@redhat.com>
* strace.c (trace) [PTRACE_GETSIGINFO]: Fetch siginfo_t for SIGSEGV
and SIGBUS signals, use si_addr in output.
-rw-r--r-- | strace.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2240,6 +2240,15 @@ Process %d attached (waiting for parent)\n", pc += (psr >> PSR_RI) & 0x3; ptrace(PT_GETSIGINFO, pid, 0, (long) &si); addr = (unsigned long) si.si_addr; +#elif defined PTRACE_GETSIGINFO + if (WSTOPSIG(status) == SIGSEGV || + WSTOPSIG(status) == SIGBUS) { + siginfo_t si; + if (ptrace(PTRACE_GETSIGINFO, pid, + 0, &si) == 0) + addr = (unsigned long) + si.si_addr; + } #endif printleader(tcp); tprintf("--- %s (%s) @ %lx (%lx) ---", |