summaryrefslogtreecommitdiffstats
path: root/libcutils
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-04-25 16:05:34 -0700
committerElliott Hughes <enh@google.com>2014-04-25 20:20:39 -0700
commit855fcc3114c20ff9fd286fe1723d1413fec9685a (patch)
tree012f6de674c3ba210b9f1de42d9c7607a6e9862d /libcutils
parent2317287d18fae3f9ae0f3beb7748a804f06b5720 (diff)
downloadsystem_core-855fcc3114c20ff9fd286fe1723d1413fec9685a.zip
system_core-855fcc3114c20ff9fd286fe1723d1413fec9685a.tar.gz
system_core-855fcc3114c20ff9fd286fe1723d1413fec9685a.tar.bz2
Use the si_code value bionic passes us.
Bionic needs to re-raise various signals, which means the si_code debuggerd sees has been clobbered. If bionic sends us the original si_code value, we can use that instead of the one we see when the ptrace the crashed process' siginfo. Change-Id: If116a6bc667d55a6fb39b74f96673292af4e4c8c
Diffstat (limited to 'libcutils')
-rw-r--r--libcutils/debugger.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcutils/debugger.c b/libcutils/debugger.c
index 7d907fc..056de5d 100644
--- a/libcutils/debugger.c
+++ b/libcutils/debugger.c
@@ -15,6 +15,7 @@
*/
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <cutils/debugger.h>
@@ -28,9 +29,9 @@ int dump_tombstone(pid_t tid, char* pathbuf, size_t pathlen) {
}
debugger_msg_t msg;
+ memset(&msg, 0, sizeof(msg));
msg.tid = tid;
msg.action = DEBUGGER_ACTION_DUMP_TOMBSTONE;
- msg.abort_msg_address = 0;
int result = 0;
if (TEMP_FAILURE_RETRY(write(s, &msg, sizeof(msg))) != sizeof(msg)) {
@@ -62,9 +63,9 @@ int dump_backtrace_to_file(pid_t tid, int fd) {
}
debugger_msg_t msg;
+ memset(&msg, 0, sizeof(msg));
msg.tid = tid;
msg.action = DEBUGGER_ACTION_DUMP_BACKTRACE;
- msg.abort_msg_address = 0;
int result = 0;
if (TEMP_FAILURE_RETRY(write(s, &msg, sizeof(msg))) != sizeof(msg)) {