diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-20 07:38:28 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-20 07:38:28 -0800 |
commit | 7d9dcdc82a871926e5e3a27143908fa3f4181b5f (patch) | |
tree | 9f06bfedddae069d0388739f5f2779472da5dc7f /libc/unistd | |
parent | 6f04a0f4c72acff80dad04828cb69ef67fa609d1 (diff) | |
download | bionic-7d9dcdc82a871926e5e3a27143908fa3f4181b5f.zip bionic-7d9dcdc82a871926e5e3a27143908fa3f4181b5f.tar.gz bionic-7d9dcdc82a871926e5e3a27143908fa3f4181b5f.tar.bz2 |
auto import from //branches/cupcake/...@132569
Diffstat (limited to 'libc/unistd')
-rw-r--r-- | libc/unistd/abort.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/unistd/abort.c b/libc/unistd/abort.c index a02beba..d4e40e1 100644 --- a/libc/unistd/abort.c +++ b/libc/unistd/abort.c @@ -34,6 +34,11 @@ #include "thread_private.h" #include "atexit.h" +/* temporary, for bug hunting */ +#include "logd.h" +#define debug_log(format, ...) \ + __libc_android_log_print(ANDROID_LOG_DEBUG, "libc-abort", (format), ##__VA_ARGS__ ) + void abort(void) { @@ -48,6 +53,9 @@ abort(void) * any errors -- X311J doesn't allow abort to return anyway. */ sigdelset(&mask, SIGABRT); + /* temporary, so deliberate seg fault can be caught by debuggerd */ + sigdelset(&mask, SIGSEGV); + /* -- */ (void)sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL); /* @@ -64,6 +72,13 @@ abort(void) } } + /* temporary, for bug hunting */ + debug_log("abort() called in pid %d\n", getpid()); + /* seg fault seems to produce better debuggerd results than SIGABRT */ + *((char*)0xdeadbaad) = 39; + debug_log("somehow we're not dead?\n"); + /* -- */ + (void)kill(getpid(), SIGABRT); /* |