summaryrefslogtreecommitdiffstats
path: root/debuggerd
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-06-07 14:56:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-06-07 14:56:17 -0700
commit771f5146893aa9bbc451aed78e61b3b18c1bc3b4 (patch)
treebaf67add6c63061c32653a4cdcdf8b960f13c453 /debuggerd
parentf45cd81bc81cbe92fc666f56d2b75f911cdca208 (diff)
parent4c0b9e3dc00640022a0512be909c33f0a51a9816 (diff)
downloadsystem_core-771f5146893aa9bbc451aed78e61b3b18c1bc3b4.zip
system_core-771f5146893aa9bbc451aed78e61b3b18c1bc3b4.tar.gz
system_core-771f5146893aa9bbc451aed78e61b3b18c1bc3b4.tar.bz2
am 4c0b9e3d: Merge "Fix crash reporting on x86 platform."
* commit '4c0b9e3dc00640022a0512be909c33f0a51a9816': Fix crash reporting on x86 platform.
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/x86/unwind.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/debuggerd/x86/unwind.c b/debuggerd/x86/unwind.c
index 8f84e01..0a7f04c 100644
--- a/debuggerd/x86/unwind.c
+++ b/debuggerd/x86/unwind.c
@@ -24,7 +24,6 @@ int unwind_backtrace_with_ptrace_x86(int tfd, pid_t pid, mapinfo *map,
//ebp==0, it indicates that the stack is poped to the bottom or there is no stack at all.
while (ebp) {
- _LOG(tfd, !at_fault, "#0%d ",stack_level);
mi = pc_to_mapinfo(map, eip, &rel_pc);
/* See if we can determine what symbol this stack frame resides in */
@@ -32,9 +31,11 @@ int unwind_backtrace_with_ptrace_x86(int tfd, pid_t pid, mapinfo *map,
sym = symbol_table_lookup(mi->symbols, rel_pc);
}
if (sym) {
- _LOG(tfd, !at_fault, " eip: %08x %s (%s)\n", eip, mi ? mi->name : "", sym->name);
+ _LOG(tfd, !at_fault, " #%02d eip: %08x %s (%s)\n",
+ stack_level, eip, mi ? mi->name : "", sym->name);
} else {
- _LOG(tfd, !at_fault, " eip: %08x %s\n", eip, mi ? mi->name : "");
+ _LOG(tfd, !at_fault, " #%02d eip: %08x %s\n",
+ stack_level, eip, mi ? mi->name : "");
}
stack_level++;
@@ -49,7 +50,6 @@ int unwind_backtrace_with_ptrace_x86(int tfd, pid_t pid, mapinfo *map,
if (ebp)
_LOG(tfd, !at_fault, "stack: \n");
while (ebp) {
- _LOG(tfd, !at_fault, "#0%d \n",stack_level);
stack_ptr = cur_sp;
while((int)(ebp - stack_ptr) >= 0) {
stack_content = ptrace(PTRACE_PEEKTEXT, pid, (void*)stack_ptr, NULL);
@@ -60,10 +60,11 @@ int unwind_backtrace_with_ptrace_x86(int tfd, pid_t pid, mapinfo *map,
sym = symbol_table_lookup(mi->symbols, rel_pc);
}
if (sym) {
- _LOG(tfd, !at_fault, " %08x %08x %s (%s)\n",
- stack_ptr, stack_content, mi ? mi->name : "", sym->name);
+ _LOG(tfd, !at_fault, " #%02d %08x %08x %s (%s)\n",
+ stack_level, stack_ptr, stack_content, mi ? mi->name : "", sym->name);
} else {
- _LOG(tfd, !at_fault, " %08x %08x %s\n", stack_ptr, stack_content, mi ? mi->name : "");
+ _LOG(tfd, !at_fault, " #%02d %08x %08x %s\n",
+ stack_level, stack_ptr, stack_content, mi ? mi->name : "");
}
stack_ptr = stack_ptr + 4;