• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

Revision4c0b9e3dc00640022a0512be909c33f0a51a9816 (tree)
Time2011-06-08 05:17:31
AuthorVladimir Chtchetkine <vchtchetkine@goog...>
CommiterAndroid Code Review

Log Message

Merge "Fix crash reporting on x86 platform."

Change Summary

Incremental Difference

--- 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,
2424
2525 //ebp==0, it indicates that the stack is poped to the bottom or there is no stack at all.
2626 while (ebp) {
27- _LOG(tfd, !at_fault, "#0%d ",stack_level);
2827 mi = pc_to_mapinfo(map, eip, &rel_pc);
2928
3029 /* 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,
3231 sym = symbol_table_lookup(mi->symbols, rel_pc);
3332 }
3433 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);
3636 } 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 : "");
3839 }
3940
4041 stack_level++;
@@ -49,7 +50,6 @@ int unwind_backtrace_with_ptrace_x86(int tfd, pid_t pid, mapinfo *map,
4950 if (ebp)
5051 _LOG(tfd, !at_fault, "stack: \n");
5152 while (ebp) {
52- _LOG(tfd, !at_fault, "#0%d \n",stack_level);
5353 stack_ptr = cur_sp;
5454 while((int)(ebp - stack_ptr) >= 0) {
5555 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,
6060 sym = symbol_table_lookup(mi->symbols, rel_pc);
6161 }
6262 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);
6565 } 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 : "");
6768 }
6869
6970 stack_ptr = stack_ptr + 4;