os: print <signal handler called> if unw_is_signal_frame()
libunwind has a function to query whether the cursor points to a signal frame. Use this to print 1: <signal handler called> like GDB does, rather than printing something less useful such as 1: /usr/lib/libpthread.so.0 (funlockfile+0x60) [0x7f679838b870] Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
This commit is contained in:
parent
7cdcdfea08
commit
a73641937a
|
@ -97,9 +97,14 @@ xorg_backtrace(void)
|
|||
else
|
||||
filename = "?";
|
||||
|
||||
ErrorFSigSafe("%u: %s (%s%s+0x%x) [%p]\n", i++, filename, procname,
|
||||
ret == -UNW_ENOMEM ? "..." : "", (int)off,
|
||||
(void *)(uintptr_t)(ip));
|
||||
|
||||
if (unw_is_signal_frame(&cursor)) {
|
||||
ErrorFSigSafe("%u: <signal handler called>\n", i++);
|
||||
} else {
|
||||
ErrorFSigSafe("%u: %s (%s%s+0x%x) [%p]\n", i++, filename, procname,
|
||||
ret == -UNW_ENOMEM ? "..." : "", (int)off,
|
||||
(void *)(uintptr_t)(ip));
|
||||
}
|
||||
|
||||
ret = unw_step(&cursor);
|
||||
if (ret < 0)
|
||||
|
|
Loading…
Reference in New Issue