diff options
author | Elliott Hughes <enh@google.com> | 2014-01-31 10:26:58 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-01-31 10:26:58 +0000 |
commit | 4d0520fbc92f4bfead3b87890ae9af6dcf3be0ab (patch) | |
tree | 91ca5cd75d87ae8fba641790b3db7af7e35cd17a | |
parent | ab2de41574d15bac8c3ef8f49cfba493ea501a0a (diff) | |
parent | b99d52944f61aebdac427a490bfed2ae8cccbc10 (diff) | |
download | system_core-4d0520fbc92f4bfead3b87890ae9af6dcf3be0ab.zip system_core-4d0520fbc92f4bfead3b87890ae9af6dcf3be0ab.tar.gz system_core-4d0520fbc92f4bfead3b87890ae9af6dcf3be0ab.tar.bz2 |
am b99d5294: Merge "Switch x86 libcorkscrew over to <ucontext.h>."
* commit 'b99d52944f61aebdac427a490bfed2ae8cccbc10':
Switch x86 libcorkscrew over to <ucontext.h>.
-rwxr-xr-x | libcorkscrew/arch-x86/backtrace-x86.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/libcorkscrew/arch-x86/backtrace-x86.c b/libcorkscrew/arch-x86/backtrace-x86.c index ef22821..df486de 100755 --- a/libcorkscrew/arch-x86/backtrace-x86.c +++ b/libcorkscrew/arch-x86/backtrace-x86.c @@ -36,46 +36,7 @@ #include <sys/ptrace.h> #include <cutils/log.h> -#if defined(__BIONIC__) - -#if defined(__BIONIC_HAVE_UCONTEXT_T) - -// Bionic offers the Linux kernel headers. -#include <asm/sigcontext.h> -#include <asm/ucontext.h> -typedef struct ucontext ucontext_t; - -#else /* __BIONIC_HAVE_UCONTEXT_T */ - -/* Old versions of the Android <signal.h> didn't define ucontext_t. */ - -typedef struct { - uint32_t gregs[32]; - void* fpregs; - uint32_t oldmask; - uint32_t cr2; -} mcontext_t; - -enum { - REG_GS = 0, REG_FS, REG_ES, REG_DS, - REG_EDI, REG_ESI, REG_EBP, REG_ESP, - REG_EBX, REG_EDX, REG_ECX, REG_EAX, - REG_TRAPNO, REG_ERR, REG_EIP, REG_CS, - REG_EFL, REG_UESP, REG_SS -}; - -/* Machine context at the time a signal was raised. */ -typedef struct ucontext { - uint32_t uc_flags; - struct ucontext* uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - uint32_t uc_sigmask; -} ucontext_t; - -#endif /* __BIONIC_HAVE_UCONTEXT_T */ - -#elif defined(__APPLE__) +#if defined(__APPLE__) #define _XOPEN_SOURCE #include <ucontext.h> |