1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-03-31 19:42:17 +02:00

Compile fix for platforms other than linux-i386

This commit is contained in:
Arun Sharma 2012-03-12 19:55:16 -07:00
parent f0bb806ecb
commit 6da4dde70e

View file

@ -35,6 +35,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <string.h>
#include <syslog.h>
#include <sys/poll.h>
#include <sys/mman.h>
#include <sys/socket.h>
@ -205,7 +206,17 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
ucontext_t *uc;
uc = ucontext;
#if defined(__linux__)
#ifdef TARGET_X86
ip = uc->uc_mcontext.gregs[REG_EIP];
#elif defined(TARGET_X86_64)
ip = uc->uc_mcontext.gregs[REG_RIP];
#elif defined(TARGET_ARM)
ip = uc->uc_mcontext.arm_ip;
#endif
#else
#error Port me
#endif
dprintf(2, "signal:%d address:0x%lx ip:0x%lx\n",
sig,
/* this is void*, but using %p would print "(null)"