mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-25 00:27:39 +01:00
Fix test build on FreeBSD.
This commit is contained in:
parent
d93d96ad83
commit
61a173763e
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue