diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2020-12-12 09:31:01 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2020-12-12 09:31:01 +0000 |
commit | de1becf4e6fef4f4af7ddcce36b218eb8b97e953 (patch) | |
tree | 6c9ca26361bcdb5ff8552163eef21caa9a15c4f7 /xserver/os | |
parent | 547f94c1bd5f859fdb141297f602245d127f205b (diff) |
Update X server to version 1.20.10. Tested by jsg@ and naddy@
Diffstat (limited to 'xserver/os')
-rw-r--r-- | xserver/os/Makefile.in | 1 | ||||
-rw-r--r-- | xserver/os/backtrace.c | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/xserver/os/Makefile.in b/xserver/os/Makefile.in index a9089ae6b..f81c2915b 100644 --- a/xserver/os/Makefile.in +++ b/xserver/os/Makefile.in @@ -509,6 +509,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/os/backtrace.c b/xserver/os/backtrace.c index 619bf145e..2aad0e38a 100644 --- a/xserver/os/backtrace.c +++ b/xserver/os/backtrace.c @@ -45,6 +45,7 @@ xorg_backtrace(void) { unw_cursor_t cursor; unw_context_t context; + unw_word_t ip; unw_word_t off; unw_proc_info_t pip; int ret, i = 0; @@ -88,7 +89,9 @@ xorg_backtrace(void) procname[1] = 0; } - if (dladdr((void *)(uintptr_t)(pip.start_ip + off), &dlinfo) && dlinfo.dli_fname && + if (unw_get_reg (&cursor, UNW_REG_IP, &ip) < 0) + ip = pip.start_ip + off; + if (dladdr((void *)(uintptr_t)(ip), &dlinfo) && dlinfo.dli_fname && *dlinfo.dli_fname) filename = dlinfo.dli_fname; else @@ -96,7 +99,7 @@ xorg_backtrace(void) ErrorFSigSafe("%u: %s (%s%s+0x%x) [%p]\n", i++, filename, procname, ret == -UNW_ENOMEM ? "..." : "", (int)off, - (void *)(uintptr_t)(pip.start_ip + off)); + (void *)(uintptr_t)(ip)); ret = unw_step(&cursor); if (ret < 0) |