diff options
author | John Reiser <jreiser@BitWagon.com> | 2011-03-18 09:31:56 -0700 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2011-03-22 12:13:24 -0400 |
commit | cba95c2d81193ba6ffc5fa53971ea460140d7f28 (patch) | |
tree | 42f6a4bd398e9ca960aa81b2220820ca865926b6 | |
parent | 7ebb12843494f573ee083cdb8c1edb36bd14a2cc (diff) | |
download | memstomp-cba95c2d81193ba6ffc5fa53971ea460140d7f28.tar.gz memstomp-cba95c2d81193ba6ffc5fa53971ea460140d7f28.tar.xz memstomp-cba95c2d81193ba6ffc5fa53971ea460140d7f28.zip |
find_matching_file returns ElfXX_Phdr *; enables optimization.
-rw-r--r-- | backtrace-symbols.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/backtrace-symbols.c b/backtrace-symbols.c index 8c6ab9a..0176e3f 100644 --- a/backtrace-symbols.c +++ b/backtrace-symbols.c @@ -239,11 +239,11 @@ static char **process_file( #define MAX_DEPTH 16 -struct file_match { - char const *file; - void const *address; - void const *base; - void const *hdr; +struct file_match { /* INput or OUTput w.r.t. find_matching_file() */ + char const *file; /* OUT */ + void const *address; /* IN */ + void const *base; /* OUT */ + ElfW(Phdr) const *phdr; /* OUT */ }; static int find_matching_file(struct dl_phdr_info *const info, @@ -262,6 +262,7 @@ static int find_matching_file(struct dl_phdr_info *const info, /* we found a match */ match->file = info->dlpi_name; match->base = (void *) info->dlpi_addr; + match->phdr = phdr; return 1; /* first match is good enough */ } } |