mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-01 10:47:38 +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)
|
#elif defined(TARGET_ARM)
|
||||||
ip = uc->uc_mcontext.arm_ip;
|
ip = uc->uc_mcontext.arm_ip;
|
||||||
#endif
|
#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
|
#else
|
||||||
#error Port me
|
#error Port me
|
||||||
#endif
|
#endif
|
||||||
|
@ -230,7 +238,9 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
|
||||||
void *array[50];
|
void *array[50];
|
||||||
int size;
|
int size;
|
||||||
size = backtrace(array, 50);
|
size = backtrace(array, 50);
|
||||||
|
#ifdef __linux__
|
||||||
backtrace_symbols_fd(array, size, 2);
|
backtrace_symbols_fd(array, size, 2);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
_exit(1);
|
_exit(1);
|
||||||
|
|
Loading…
Reference in a new issue