From c24447be6017725800336e2a8a4836e3f58fdfe9 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 11 Feb 2009 14:43:24 -0800 Subject: Provide dwarf module names as defaults in @cast()s * tapsets.cxx (dwarf_var_expanding_visitor::visit_cast_op): While expanding dwarf probes, provide the current module as a default to @casts without a module name. --- tapsets.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index d479efda..e5fbcc30 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -4228,6 +4228,7 @@ struct dwarf_var_expanding_visitor: public var_expanding_visitor dwarf_var_expanding_visitor(dwarf_query & q, Dwarf_Die *sd, Dwarf_Addr a): q(q), scope_die(sd), addr(a), add_block(NULL), add_probe(NULL), visited(false) {} void visit_target_symbol (target_symbol* e); + void visit_cast_op (cast_op* e); }; @@ -4786,6 +4787,17 @@ dwarf_var_expanding_visitor::visit_target_symbol (target_symbol *e) } +void +dwarf_var_expanding_visitor::visit_cast_op (cast_op *e) +{ + // Fill in our current module context if needed + if (e->module.empty()) + e->module = q.dw.module_name; + + var_expanding_visitor::visit_cast_op(e); +} + + void dwarf_derived_probe::printsig (ostream& o) const { -- cgit