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. --- ChangeLog | 6 ++++++ tapsets.cxx | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index b641d3b7..5f8e6ff3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-11 Josh Stone + + * 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. + 2009-02-11 Josh Stone * staptree.h (struct cast_op, visitor::visit_cast_op): New. 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