]> sourceware.org Git - systemtap.git/commitdiff
PR14297 cont'd: correct stap -l syscall.* -- i.e., aliases
authorFrank Ch. Eigler <fche@redhat.com>
Wed, 15 May 2013 14:29:32 +0000 (10:29 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Wed, 15 May 2013 14:29:32 +0000 (10:29 -0400)
What a tangled web.

* elaborate.cxx (alias_derived_probe::sole_location): Define &
  override to provide the alias name itself rather than the
  aliased referent probes.

elaborate.cxx

index 01005859a621b71e4b89b39072ee9bac6b22a193..c74b1870a0b565f2919fc41d1c3fb2878000ddcc 100644 (file)
@@ -145,7 +145,7 @@ derived_probe::sole_location () const
 {
   if (locations.size() == 0 || locations.size() > 1)
     throw semantic_error (_N("derived_probe with no locations",
-                             "derived_probe with no locations",
+                             "derived_probe with too many locations",
                              locations.size()), this->tok);
   else
     return locations[0];
@@ -779,6 +779,7 @@ struct alias_derived_probe: public derived_probe
 
   virtual const probe_alias *get_alias () const { return alias; }
   virtual probe_point *get_alias_loc () const { return alias_loc; }
+  virtual probe_point *sole_location () const;
 
 private:
   const probe_alias *alias; // Used to check for recursion
@@ -802,6 +803,13 @@ alias_derived_probe::alias_derived_probe(probe *base, probe_point *l,
 }
 
 
+probe_point*
+alias_derived_probe::sole_location () const
+{
+  return const_cast<probe_point*>(alias_loc);
+}
+
+
 probe*
 probe::create_alias(probe_point* l, probe_point* a)
 {
This page took 0.03606 seconds and 5 git commands to generate.