mirror of
https://github.com/tezc/sc.git
synced 2025-01-28 07:03:06 +08:00
get backtrace pointer for only MAC_OS_X_VERSION_10_6
This commit is contained in:
parent
17973df076
commit
1901bc7c76
@ -331,13 +331,13 @@ static void *sc_instruction(ucontext_t *uc)
|
||||
(void) uc;
|
||||
void *p = NULL;
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6)
|
||||
#if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__)
|
||||
p = (void *) uc->uc_mcontext->__ss.__rip;
|
||||
#elif defined(__i386__)
|
||||
p = (void *) uc->uc_mcontext->__ss.__eip;
|
||||
#else
|
||||
p = (void *) arm_thread_state64_get_pc(uc->uc_mcontext->__ss);
|
||||
p = (void *) (uintptr_t) arm_thread_state64_get_pc(uc->uc_mcontext->__ss);
|
||||
#endif
|
||||
#elif defined(__linux__)
|
||||
#if defined(__i386__) || ((defined(__x86_64__)) && defined(__ILP32__))
|
||||
|
Loading…
x
Reference in New Issue
Block a user