summaryrefslogtreecommitdiffstats
path: root/dwflpp.h
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-07-01 18:59:41 -0700
committerJosh Stone <jistone@redhat.com>2009-07-01 18:59:41 -0700
commit1c6b77e564d4d849f1994d56d662ceb018a112d4 (patch)
tree150a76702ed77d23237158130aa807a8fff2cf6f /dwflpp.h
parentbfbbea5a2c9690b82b7b75617befd5074149138a (diff)
downloadsystemtap-steved-1c6b77e564d4d849f1994d56d662ceb018a112d4.tar.gz
systemtap-steved-1c6b77e564d4d849f1994d56d662ceb018a112d4.tar.xz
systemtap-steved-1c6b77e564d4d849f1994d56d662ceb018a112d4.zip
PR10327: resolve symbol aliases to dwarf functions
This will first read in the symbol table for modules, and update the dwarf cu_function_cache with aliased names too. Then when iterating in dwarf, all of the possible names are matched, instead of only the canonical dwarf name. * dwflpp.cxx (dwflpp::iterate_over_functions): call update_symtab, and track wildcard addresses in a set to avoid alias dupes * dwflpp.h (symbol_table::Compare): removed * tapsets.cxx (symbol_table::map_by_addr): replaces list_by_addr (symbol_table::sort): removed -- multimap doesn't need sorting (symbol_table::mark_dwarf_redundancies): removed, see update_symtab (symbol_table::purge_syscall_stubs): remove map elements inline (dwarf_query::handle_query_module): preload the symtable. (query_dwarf_func): don't compare the function a second time, especially since it may have been an alias that matched at first. (module_info::get_symtab): allow being called multiple times (module_info::update_symtab): copy dies from the cache to the symtab, and also add aliased names to the cache
Diffstat (limited to 'dwflpp.h')
-rw-r--r--dwflpp.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/dwflpp.h b/dwflpp.h
index 8b503b33..ec6c5a0c 100644
--- a/dwflpp.h
+++ b/dwflpp.h
@@ -87,6 +87,7 @@ module_info
info_status symtab_status; // symbol table cached?
void get_symtab(dwarf_query *q);
+ void update_symtab(cu_function_cache_t *funcs);
module_info(const char *name) :
mod(NULL),
@@ -128,28 +129,6 @@ struct func_info
Dwarf_Addr entrypc;
Dwarf_Addr prologue_end;
bool weak;
-
- // Comparison functor for list of functions sorted by address. The
- // two versions that take a Dwarf_Addr let us use the STL algorithms
- // upper_bound, equal_range et al., but we don't know whether the
- // searched-for value will be passed as the first or the second
- // argument.
- struct Compare
- {
- bool operator() (const func_info* f1, const func_info* f2) const
- {
- return f1->addr < f2->addr;
- }
- // For doing lookups by address.
- bool operator() (Dwarf_Addr addr, const func_info* f2) const
- {
- return addr < f2->addr;
- }
- bool operator() (const func_info* f1, Dwarf_Addr addr) const
- {
- return f1->addr < addr;
- }
- };
};