]> sourceware.org Git - systemtap.git/commitdiff
PR 5672: fix generated dwarf probe point names from wildcards
authorFrank Ch. Eigler <fche@elastic.org>
Fri, 25 Jan 2008 19:04:39 +0000 (14:04 -0500)
committerFrank Ch. Eigler <fche@elastic.org>
Fri, 25 Jan 2008 19:04:39 +0000 (14:04 -0500)
2008-01-25  Frank Ch. Eigler  <fche@elastic.org>

PR 5672.
* staptree.cxx (probe_point copy ctor): New function.
* staptree.h: Declare it.
* tapsets.cxx (dwarf_derived_probe ctor): Call it to shallow-copy
incoming base probe location before recomputing/overwriting it.

ChangeLog
staptree.cxx
staptree.h
tapsets.cxx

index 6a2b8c27bfa9b3d4667a1554a5171ccec592d102..3097675e7e819017565848bf826a335bbd9e0de2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-25  Frank Ch. Eigler  <fche@elastic.org>
+
+       PR 5672.
+       * staptree.cxx (probe_point copy ctor): New function.
+       * staptree.h: Declare it.
+       * tapsets.cxx (dwarf_derived_probe ctor): Call it to shallow-copy
+       incoming base probe location before recomputing/overwriting it.
+
 2008-01-25  David Smith  <dsmith@redhat.com>
 
        * configure.ac: Compressed the two perfmon options into one.
index 173314eef5133798f9aa64fab50d299746e77475..6d0013759bd82d9e8cf4050677971863d22bd7e5 100644 (file)
@@ -82,6 +82,14 @@ probe_point::probe_point (std::vector<component*> const & comps,
 {
 }
 
+// NB: shallow-copy of compoonents & condition!
+probe_point::probe_point (const probe_point& pp):
+  components(pp.components), tok(pp.tok), optional (pp.optional), sufficient (pp.sufficient),
+  condition (pp.condition)
+{
+}
+
+
 probe_point::probe_point ():
   tok (0), optional (false), sufficient (false), condition (0)
 {
index 5b4b56cd8baed85dc67f080c67a13bbebe0fa200..54194c7b24e951a7575f937b8f7e002e018214b7 100644 (file)
@@ -577,6 +577,7 @@ struct probe_point
   expression* condition;
   void print (std::ostream& o) const;
   probe_point ();
+  probe_point(const probe_point& pp);
   probe_point(std::vector<component*> const & comps,const token * t);
   std::string str();
 };
index 06aa73aa457005cc689aa044fbb4938bfa3a14ef..5b69373b7b1bebb89ba38bb5a711a6d1b98d87b0 100644 (file)
@@ -3635,7 +3635,7 @@ dwarf_derived_probe::dwarf_derived_probe(const string& funcname,
                                          Dwarf_Addr addr,
                                          dwarf_query& q,
                                          Dwarf_Die* scope_die /* may be null */)
-  : derived_probe (q.base_probe, q.base_loc /* NB: base_loc.components will be overwritten */ ),
+  : derived_probe (q.base_probe, new probe_point(*q.base_loc) /* .components soon rewritten */ ),
     module (module), section (section), addr (addr),
     has_return (q.has_return),
     has_maxactive (q.has_maxactive),
This page took 0.496241 seconds and 5 git commands to generate.