diff options
author | Elliott Hughes <enh@google.com> | 2014-07-15 11:38:47 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-07-15 13:18:32 -0700 |
commit | e9f7361ea9506c8bd8ad1442a43f270859b1b119 (patch) | |
tree | 03068608118e573e31d24bb8a92711dd17099965 /debuggerd | |
parent | 7e55d8899c45de1c5a48f794abf794f5500065f1 (diff) | |
download | system_core-e9f7361ea9506c8bd8ad1442a43f270859b1b119.zip system_core-e9f7361ea9506c8bd8ad1442a43f270859b1b119.tar.gz system_core-e9f7361ea9506c8bd8ad1442a43f270859b1b119.tar.bz2 |
Add SIGFPE to crasher.
Bug: 3399996
(cherry picked from commit 3ecc42106ea4cf825a57859cfd58442442685d24)
Change-Id: I075613ca3c022ce8d38a06a5ba236ceff32d181c
Diffstat (limited to 'debuggerd')
-rw-r--r-- | debuggerd/crasher.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/debuggerd/crasher.c b/debuggerd/crasher.c index 9df3c64..d315ee5 100644 --- a/debuggerd/crasher.c +++ b/debuggerd/crasher.c @@ -141,11 +141,14 @@ static int do_action(const char* arg) } else if (!strcmp(arg, "assert")) { __assert("some_file.c", 123, "false"); } else if (!strcmp(arg, "assert2")) { - __assert2("some_file.c", 123, "some_function", "false"); + __assert2("some_file.c", 123, "some_function", "false"); } else if (!strcmp(arg, "LOG_ALWAYS_FATAL")) { LOG_ALWAYS_FATAL("hello %s", "world"); } else if (!strcmp(arg, "LOG_ALWAYS_FATAL_IF")) { LOG_ALWAYS_FATAL_IF(true, "hello %s", "world"); + } else if (!strcmp(arg, "SIGFPE")) { + raise(SIGFPE); + return EXIT_SUCCESS; } else if (!strcmp(arg, "SIGPIPE")) { int pipe_fds[2]; pipe(pipe_fds); @@ -177,6 +180,7 @@ static int do_action(const char* arg) fprintf(stderr, " assert2 call assert() with a function\n"); fprintf(stderr, " LOG_ALWAYS_FATAL call LOG_ALWAYS_FATAL\n"); fprintf(stderr, " LOG_ALWAYS_FATAL_IF call LOG_ALWAYS_FATAL\n"); + fprintf(stderr, " SIGFPE cause a SIGFPE\n"); fprintf(stderr, " SIGPIPE cause a SIGPIPE\n"); fprintf(stderr, " SIGSEGV cause a SIGSEGV at address 0x0 (synonym: crash)\n"); fprintf(stderr, " SIGSEGV-non-null cause a SIGSEGV at a non-zero address\n"); |