diff options
author | Elliott Hughes <enh@google.com> | 2013-10-04 17:01:33 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-10-08 09:57:01 -0700 |
commit | c00f2cb587630d5e954c7f548749f1e3170b3cb1 (patch) | |
tree | c62c53a795026d249df132db9bc7894add15611d /linker/debugger.cpp | |
parent | 5d06718cd357b509588465ec1fa261db23b5899a (diff) | |
download | android_bionic-c00f2cb587630d5e954c7f548749f1e3170b3cb1.tar.gz android_bionic-c00f2cb587630d5e954c7f548749f1e3170b3cb1.tar.bz2 android_bionic-c00f2cb587630d5e954c7f548749f1e3170b3cb1.zip |
x86_64 linker.
Based on I8dc3e2cb596f75dc58ae82e4dc58f8c177dd3323 by
Pavel Chupin <pavel.v.chupin@intel.com>.
Change-Id: Icd582d277cbe273477b450f2848343d72c86ec9f
Diffstat (limited to 'linker/debugger.cpp')
-rw-r--r-- | linker/debugger.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/linker/debugger.cpp b/linker/debugger.cpp index c9475228b..6ddd35805 100644 --- a/linker/debugger.cpp +++ b/linker/debugger.cpp @@ -176,7 +176,12 @@ static bool have_siginfo(int signum) { * Catches fatal signals so we can ask debuggerd to ptrace us before * we crash. */ +#if __LP64__ // TODO: implement 64-bit sigaction using rt_sigaction. +void debuggerd_signal_handler(int n) { + siginfo_t* info = NULL; +#else void debuggerd_signal_handler(int n, siginfo_t* info, void*) { +#endif /* * It's possible somebody cleared the SA_SIGINFO flag, which would mean * our "info" arg holds an undefined value. @@ -249,7 +254,11 @@ void debuggerd_init() { struct sigaction action; memset(&action, 0, sizeof(action)); sigemptyset(&action.sa_mask); +#if __LP64__ // TODO: implement 64-bit sigaction using rt_sigaction. + action.sa_handler = debuggerd_signal_handler; +#else action.sa_sigaction = debuggerd_signal_handler; +#endif action.sa_flags = SA_RESTART | SA_SIGINFO; // Use the alternate signal stack if available so we can catch stack overflows. |