diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2010-06-10 08:51:33 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2010-06-10 08:51:33 -0700 |
commit | 75a1d218d82b8a7d6e0196465dc02ca03fc173c6 (patch) | |
tree | 0bf3f3eef43c2723e0545ea07d38a45cab5cb600 /debuggerd/debuggerd.c | |
parent | 7c84efe083f4cd6b4a322bfe018f26b2f7d1e844 (diff) | |
parent | 13b012aafff1bcc3a87e69eca82a9611e8842bac (diff) | |
download | core-75a1d218d82b8a7d6e0196465dc02ca03fc173c6.tar.gz core-75a1d218d82b8a7d6e0196465dc02ca03fc173c6.tar.bz2 core-75a1d218d82b8a7d6e0196465dc02ca03fc173c6.zip |
merge from open-source master
Change-Id: I50b7bc6faa6d0abd4998cae8fc7dda1e8fa49407
Diffstat (limited to 'debuggerd/debuggerd.c')
-rw-r--r-- | debuggerd/debuggerd.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/debuggerd/debuggerd.c b/debuggerd/debuggerd.c index e850a2e65..3b2972acc 100644 --- a/debuggerd/debuggerd.c +++ b/debuggerd/debuggerd.c @@ -63,7 +63,7 @@ static int logsocket = -1; /* Log information onto the tombstone */ void _LOG(int tfd, bool in_tombstone_only, const char *fmt, ...) { - char buf[128]; + char buf[512]; va_list ap; va_start(ap, fmt); @@ -106,10 +106,11 @@ mapinfo *parse_maps_line(char *line) mi->start = strtoul(line, 0, 16); mi->end = strtoul(line + 9, 0, 16); - /* To be filled in parse_exidx_info if the mapped section starts with + /* To be filled in parse_elf_info if the mapped section starts with * elf_header */ mi->exidx_start = mi->exidx_end = 0; + mi->symbols = 0; mi->next = 0; strcpy(mi->name, line + 49); @@ -353,7 +354,7 @@ void dump_crash_banner(int tfd, unsigned pid, unsigned tid, int sig) if(sig) dump_fault_addr(tfd, tid, sig); } -static void parse_exidx_info(mapinfo *milist, pid_t pid) +static void parse_elf_info(mapinfo *milist, pid_t pid) { mapinfo *mi; for (mi = milist; mi != NULL; mi = mi->next) { @@ -383,6 +384,9 @@ static void parse_exidx_info(mapinfo *milist, pid_t pid) break; } } + + /* Try to load symbols from this file */ + mi->symbols = symbol_table_create(mi->name); } } } @@ -420,7 +424,7 @@ void dump_crash_report(int tfd, unsigned pid, unsigned tid, bool at_fault) fclose(fp); } - parse_exidx_info(milist, tid); + parse_elf_info(milist, tid); /* If stack unwinder fails, use the default solution to dump the stack * content. @@ -439,6 +443,7 @@ void dump_crash_report(int tfd, unsigned pid, unsigned tid, bool at_fault) while(milist) { mapinfo *next = milist->next; + symbol_table_free(milist->symbols); free(milist); milist = next; } |