summaryrefslogtreecommitdiff
path: root/xserver/os
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2020-12-12 09:31:01 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2020-12-12 09:31:01 +0000
commitde1becf4e6fef4f4af7ddcce36b218eb8b97e953 (patch)
tree6c9ca26361bcdb5ff8552163eef21caa9a15c4f7 /xserver/os
parent547f94c1bd5f859fdb141297f602245d127f205b (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.in1
-rw-r--r--xserver/os/backtrace.c7
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)