diff options
author | Christopher Ferris <cferris@google.com> | 2014-01-31 16:41:13 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-01-31 16:41:13 +0000 |
commit | 6334485f164b3237805c4829c387c549c106779f (patch) | |
tree | 53e7316c1fada1e99644adfdaa7ef008b9017881 /libbacktrace | |
parent | bd74ac6d3839513cd0b9e8739313eaaa6f4eda5f (diff) | |
parent | cbe55724c8211c9c06362cebff0a262197dbc351 (diff) | |
download | system_core-6334485f164b3237805c4829c387c549c106779f.zip system_core-6334485f164b3237805c4829c387c549c106779f.tar.gz system_core-6334485f164b3237805c4829c387c549c106779f.tar.bz2 |
am cbe55724: am 7957529d: Merge "Clean up UnwindCurrent.cpp\'s use of ucontext.h."
* commit 'cbe55724c8211c9c06362cebff0a262197dbc351':
Clean up UnwindCurrent.cpp's use of ucontext.h.
Diffstat (limited to 'libbacktrace')
-rw-r--r-- | libbacktrace/UnwindCurrent.cpp | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/libbacktrace/UnwindCurrent.cpp b/libbacktrace/UnwindCurrent.cpp index 17b71b9..461ed02 100644 --- a/libbacktrace/UnwindCurrent.cpp +++ b/libbacktrace/UnwindCurrent.cpp @@ -27,26 +27,7 @@ #include "UnwindCurrent.h" #include "UnwindMap.h" -// Define the ucontext_t structures needed for each supported arch. -#if defined(__arm__) - // The current version of the <signal.h> doesn't define ucontext_t. - #include <asm/sigcontext.h> // Ensure 'struct sigcontext' is defined. - - // Machine context at the time a signal was raised. - typedef struct ucontext { - uint32_t uc_flags; - struct ucontext* uc_link; - stack_t uc_stack; - struct sigcontext uc_mcontext; - uint32_t uc_sigmask; - } ucontext_t; -#elif defined(__i386__) - #include <asm/sigcontext.h> - #include <asm/ucontext.h> - typedef struct ucontext ucontext_t; -#elif !defined(__mips__) && !defined(__aarch64__) - #error Unsupported architecture. -#endif +#include <ucontext.h> //------------------------------------------------------------------------- // UnwindCurrent functions. @@ -158,7 +139,7 @@ void UnwindCurrent::ExtractContext(void* sigcontext) { context->regs[13] = uc->uc_mcontext.arm_sp; context->regs[14] = uc->uc_mcontext.arm_lr; context->regs[15] = uc->uc_mcontext.arm_pc; -#elif defined(__mips__) || defined(__i386__) +#else context->uc_mcontext = uc->uc_mcontext; #endif } |