mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 12:38:03 +02:00
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>
(cherry picked from commit a73641937a)
This commit is contained in:
parent
daaa9f0566
commit
891ea8f74d
1 changed files with 8 additions and 3 deletions
|
|
@ -97,9 +97,14 @@ xorg_backtrace(void)
|
||||||
else
|
else
|
||||||
filename = "?";
|
filename = "?";
|
||||||
|
|
||||||
ErrorFSigSafe("%u: %s (%s%s+0x%x) [%p]\n", i++, filename, procname,
|
|
||||||
ret == -UNW_ENOMEM ? "..." : "", (int)off,
|
if (unw_is_signal_frame(&cursor)) {
|
||||||
(void *)(uintptr_t)(ip));
|
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);
|
ret = unw_step(&cursor);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue