1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-02 17:22:37 +02:00

Fix test build on FreeBSD.

This commit is contained in:
Konstantin Belousov 2012-05-24 12:31:26 +03:00
parent d93d96ad83
commit 61a173763e

View file

@ -214,6 +214,14 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
#elif defined(TARGET_ARM)
ip = uc->uc_mcontext.arm_ip;
#endif
#elif defined(__FreeBSD__)
#ifdef __i386__
ip = uc->uc_mcontext.mc_eip;
#elif defined(__amd64__)
ip = uc->uc_mcontext.mc_rip;
#else
#error Port me
#endif
#else
#error Port me
#endif
@ -230,7 +238,9 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
void *array[50];
int size;
size = backtrace(array, 50);
#ifdef __linux__
backtrace_symbols_fd(array, size, 2);
#endif
}
_exit(1);