aboutsummaryrefslogtreecommitdiffstats
path: root/debuggerd/unwind-arm.c
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-06-09 17:21:03 -0700
committerAndroid Code Review <code-review@android.com>2010-06-09 17:21:03 -0700
commit13b012aafff1bcc3a87e69eca82a9611e8842bac (patch)
tree2e490ae4a0e46de15a8817a291b3f8ab8697b6c1 /debuggerd/unwind-arm.c
parentf2df6bb982c8e0f84b2aabdfa9843fa992b9e5e4 (diff)
parentae7b91b68008ab09635a97a18e7d07a35e8404aa (diff)
downloadsystem_core-13b012aafff1bcc3a87e69eca82a9611e8842bac.tar.gz
system_core-13b012aafff1bcc3a87e69eca82a9611e8842bac.tar.bz2
system_core-13b012aafff1bcc3a87e69eca82a9611e8842bac.zip
Merge "debuggerd: Show function names in tombstone backtraces"
Diffstat (limited to 'debuggerd/unwind-arm.c')
-rw-r--r--debuggerd/unwind-arm.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/debuggerd/unwind-arm.c b/debuggerd/unwind-arm.c
index 9642d2e4..b081161a 100644
--- a/debuggerd/unwind-arm.c
+++ b/debuggerd/unwind-arm.c
@@ -37,6 +37,8 @@
#include <unwind.h>
#include "utility.h"
+#include "symbol_table.h"
+
typedef struct _ZSt9type_info type_info; /* This names C++ type_info type */
void __attribute__((weak)) __cxa_call_unexpected(_Unwind_Control_Block *ucbp);
@@ -393,6 +395,7 @@ static _Unwind_Reason_Code log_function(_Unwind_Context *context, pid_t pid,
phase2_vrs *vrs = (phase2_vrs*) context;
const mapinfo *mi;
bool only_in_tombstone = !at_fault;
+ const struct symbol* sym = 0;
if (stack_level < STACK_CONTENT_DEPTH) {
sp_list[stack_level] = vrs->core.r[R_SP];
@@ -451,9 +454,20 @@ static _Unwind_Reason_Code log_function(_Unwind_Context *context, pid_t pid,
rel_pc = pc;
mi = pc_to_mapinfo(map, pc, &rel_pc);
- _LOG(tfd, only_in_tombstone,
- " #%02d pc %08x %s\n", stack_level, rel_pc,
- mi ? mi->name : "");
+ /* See if we can determine what symbol this stack frame resides in */
+ if (mi != 0 && mi->symbols != 0) {
+ sym = symbol_table_lookup(mi->symbols, rel_pc);
+ }
+
+ if (sym) {
+ _LOG(tfd, only_in_tombstone,
+ " #%02d pc %08x %s (%s)\n", stack_level, rel_pc,
+ mi ? mi->name : "", sym->name);
+ } else {
+ _LOG(tfd, only_in_tombstone,
+ " #%02d pc %08x %s\n", stack_level, rel_pc,
+ mi ? mi->name : "");
+ }
return _URC_NO_REASON;
}