summaryrefslogtreecommitdiffstats
path: root/debuggerd/arm
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2012-09-24 14:13:37 -0700
committerBen Cheng <bccheng@google.com>2012-09-24 14:13:37 -0700
commitc47b772b67a2da5599b712e8c98cb0879dad6e48 (patch)
treeeedf55c9a284f9e7b4b7ee3904d15f32bebc217f /debuggerd/arm
parent96094ae27c4deac8b0dde8e3c6a479b249cecb72 (diff)
downloadsystem_core-c47b772b67a2da5599b712e8c98cb0879dad6e48.zip
system_core-c47b772b67a2da5599b712e8c98cb0879dad6e48.tar.gz
system_core-c47b772b67a2da5599b712e8c98cb0879dad6e48.tar.bz2
Dump 256 bytes per chunk pointed by general-purpose registers.
Bug: 7216522 Change-Id: Iddcec8399b00ad411be6863dd866a3f74377ba03
Diffstat (limited to 'debuggerd/arm')
-rw-r--r--debuggerd/arm/machine.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/debuggerd/arm/machine.c b/debuggerd/arm/machine.c
index 1c2e13f..160db7b 100644
--- a/debuggerd/arm/machine.c
+++ b/debuggerd/arm/machine.c
@@ -53,7 +53,8 @@ static void dump_memory(log_t* log, pid_t tid, uintptr_t addr, bool at_fault) {
/* catch underflow */
p = 0;
}
- end = p + 80;
+ /* Dump more memory content for the crashing thread. */
+ end = p + 256;
/* catch overflow; 'end - p' has to be multiples of 16 */
while (end < p)
end -= 16;
@@ -81,6 +82,8 @@ static void dump_memory(log_t* log, pid_t tid, uintptr_t addr, bool at_fault) {
long data = ptrace(PTRACE_PEEKTEXT, tid, (void*)p, NULL);
sprintf(code_buffer + strlen(code_buffer), "%08lx ", data);
+ /* Enable the following code blob to dump ASCII values */
+#if 0
int j;
for (j = 0; j < 4; j++) {
/*
@@ -95,6 +98,7 @@ static void dump_memory(log_t* log, pid_t tid, uintptr_t addr, bool at_fault) {
*asc_out++ = '.';
}
}
+#endif
p += 4;
}
*asc_out = '\0';