system/core
Revision | 4c0b9e3dc00640022a0512be909c33f0a51a9816 (tree) |
---|---|
Time | 2011-06-08 05:17:31 |
Author | Vladimir Chtchetkine <vchtchetkine@goog...> |
Commiter | Android Code Review |
Merge "Fix crash reporting on x86 platform."
@@ -24,7 +24,6 @@ int unwind_backtrace_with_ptrace_x86(int tfd, pid_t pid, mapinfo *map, | ||
24 | 24 | |
25 | 25 | //ebp==0, it indicates that the stack is poped to the bottom or there is no stack at all. |
26 | 26 | while (ebp) { |
27 | - _LOG(tfd, !at_fault, "#0%d ",stack_level); | |
28 | 27 | mi = pc_to_mapinfo(map, eip, &rel_pc); |
29 | 28 | |
30 | 29 | /* 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, | ||
32 | 31 | sym = symbol_table_lookup(mi->symbols, rel_pc); |
33 | 32 | } |
34 | 33 | if (sym) { |
35 | - _LOG(tfd, !at_fault, " eip: %08x %s (%s)\n", eip, mi ? mi->name : "", sym->name); | |
34 | + _LOG(tfd, !at_fault, " #%02d eip: %08x %s (%s)\n", | |
35 | + stack_level, eip, mi ? mi->name : "", sym->name); | |
36 | 36 | } else { |
37 | - _LOG(tfd, !at_fault, " eip: %08x %s\n", eip, mi ? mi->name : ""); | |
37 | + _LOG(tfd, !at_fault, " #%02d eip: %08x %s\n", | |
38 | + stack_level, eip, mi ? mi->name : ""); | |
38 | 39 | } |
39 | 40 | |
40 | 41 | stack_level++; |
@@ -49,7 +50,6 @@ int unwind_backtrace_with_ptrace_x86(int tfd, pid_t pid, mapinfo *map, | ||
49 | 50 | if (ebp) |
50 | 51 | _LOG(tfd, !at_fault, "stack: \n"); |
51 | 52 | while (ebp) { |
52 | - _LOG(tfd, !at_fault, "#0%d \n",stack_level); | |
53 | 53 | stack_ptr = cur_sp; |
54 | 54 | while((int)(ebp - stack_ptr) >= 0) { |
55 | 55 | 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, | ||
60 | 60 | sym = symbol_table_lookup(mi->symbols, rel_pc); |
61 | 61 | } |
62 | 62 | if (sym) { |
63 | - _LOG(tfd, !at_fault, " %08x %08x %s (%s)\n", | |
64 | - stack_ptr, stack_content, mi ? mi->name : "", sym->name); | |
63 | + _LOG(tfd, !at_fault, " #%02d %08x %08x %s (%s)\n", | |
64 | + stack_level, stack_ptr, stack_content, mi ? mi->name : "", sym->name); | |
65 | 65 | } else { |
66 | - _LOG(tfd, !at_fault, " %08x %08x %s\n", stack_ptr, stack_content, mi ? mi->name : ""); | |
66 | + _LOG(tfd, !at_fault, " #%02d %08x %08x %s\n", | |
67 | + stack_level, stack_ptr, stack_content, mi ? mi->name : ""); | |
67 | 68 | } |
68 | 69 | |
69 | 70 | stack_ptr = stack_ptr + 4; |