summaryrefslogtreecommitdiffstats
path: root/dwflpp.h
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-08-26 20:09:48 -0700
committerJosh Stone <jistone@redhat.com>2009-08-26 20:09:48 -0700
commit8096dd7dbc7bc5712da58a6f9bcb90c0b74c10db (patch)
treecbc805e5827d0826e46f42ce9bdd97b98175eb08 /dwflpp.h
parent546499713651809f026e118f81b9c52f01c895f6 (diff)
downloadsystemtap-steved-8096dd7dbc7bc5712da58a6f9bcb90c0b74c10db.tar.gz
systemtap-steved-8096dd7dbc7bc5712da58a6f9bcb90c0b74c10db.tar.xz
systemtap-steved-8096dd7dbc7bc5712da58a6f9bcb90c0b74c10db.zip
Reorganize iterate_over_labels
I noticed that iterate_over_labels was using a static variable as a recursion variable, which isn't a safe thing to do since it will only be initialized once. While fixing that, I also reorganized the function quite a bit. * dwflpp.cxx (dwflpp::iterate_over_labels): Take the current function as a parameter instead of using a static local. Rewrite some of the code as well to try to make it more obvious. * tapsets.cxx (add_label_name): Remove in favor of query_label. (query_label): New, to check decl_file and fix probe listing. (query_srcfile_label, query_cu): Adjust to iterate_over_labels change and start using query_label as the callback.
Diffstat (limited to 'dwflpp.h')
-rw-r--r--dwflpp.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/dwflpp.h b/dwflpp.h
index 1c7c9215..073b9bfc 100644
--- a/dwflpp.h
+++ b/dwflpp.h
@@ -78,7 +78,6 @@ typedef std::vector<inline_instance_info> inline_instance_map_t;
/* XXX FIXME functions that dwflpp needs from tapsets.cxx */
func_info_map_t *get_filtered_functions(dwarf_query *q);
inline_instance_map_t *get_filtered_inlines(dwarf_query *q);
-void add_label_name(dwarf_query *q, const char *name);
struct
@@ -225,15 +224,17 @@ struct dwflpp
void *data);
void iterate_over_labels (Dwarf_Die *begin_die,
- const char *sym,
- const char *symfunction,
- void *data,
+ const std::string& sym,
+ const std::string& symfunction,
+ dwarf_query *q,
void (* callback)(const std::string &,
const char *,
+ const char *,
int,
Dwarf_Die *,
Dwarf_Addr,
- dwarf_query *));
+ dwarf_query *),
+ const std::string& current_function);
void collect_srcfiles_matching (std::string const & pattern,
std::set<std::string> & filtered_srcfiles);