summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-02-11 14:43:24 -0800
committerJosh Stone <jistone@redhat.com>2009-02-18 12:48:41 -0800
commitc24447be6017725800336e2a8a4836e3f58fdfe9 (patch)
treec4b032f063ccff418bcfbb5c8a4ffd57feda3982
parent9b5af2958a35174a67076c0f27cff0ed5950736d (diff)
downloadsystemtap-steved-c24447be6017725800336e2a8a4836e3f58fdfe9.tar.gz
systemtap-steved-c24447be6017725800336e2a8a4836e3f58fdfe9.tar.xz
systemtap-steved-c24447be6017725800336e2a8a4836e3f58fdfe9.zip
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.
-rw-r--r--ChangeLog6
-rw-r--r--tapsets.cxx12
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b641d3b7..5f8e6ff3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-02-11 Josh Stone <jistone@redhat.com>
+ * 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 <jistone@redhat.com>
+
* staptree.h (struct cast_op, visitor::visit_cast_op): New.
* staptree.cxx (cast_op::print/visit, various visitor::visit_cast_op's):
Incorporate cast_op into the basic tree operations.
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);
};
@@ -4787,6 +4788,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
{
// Instead of just printing the plain locations, we add a PC value