]> sourceware.org Git - systemtap.git/commitdiff
The /* pc=0x... */ is no longer printed by "stap -v -L 'kernel.function("*")'
authorDi Chen <dichen@redhat.com>
Thu, 2 Sep 2021 04:52:47 +0000 (12:52 +0800)
committerWilliam Cohen <wcohen@redhat.com>
Tue, 14 Sep 2021 14:27:25 +0000 (10:27 -0400)
The disappeared /* pc=0x... */ resulted from the missing implementation
of the function "dwarf_derived_probe::printsig_nonest".
Which makes "p->printsig_nonest(sig)" in main.cxx end up calling
"derived_probe::printsig_nonest", and the type of "p" is

(gdb) ptype /m p
type = /* real type = dwarf_derived_probe * */

This patch added "dwarf_derived_probe::printsig_nonest" for PC value
print.

https://sourceware.org/bugzilla/show_bug.cgi?id=27940

Signed-off-by: Di Chen <dichen@redhat.com>
elaborate.h
tapsets.cxx

index 9817172a7e6e6efdfe69c3bcbad435425a6d5c3a..baa29e67c1f2151c6e10380694672d7345699cf2 100644 (file)
@@ -204,7 +204,7 @@ struct derived_probe: public probe
   virtual probe_point* sole_location () const;
   virtual probe_point* script_location () const;
   virtual void printsig (std::ostream &o) const cxx_override;
-  void printsig_nonest (std::ostream &o) const;
+  virtual void printsig_nonest (std::ostream &o) const;
   // return arguments of probe if there
   virtual void getargs (std::list<std::string> &) const {}
   void printsig_nested (std::ostream &o) const;
index 1348818072f0b760856985191ed809931dce8591..ef6fb19d90a98164714b2b2afd3d2352c145786e 100644 (file)
@@ -560,6 +560,7 @@ struct dwarf_derived_probe: public generic_kprobe_derived_probe
   bool access_vars;
 
   void printsig (std::ostream &o) const;
+  void printsig_nonest (std::ostream &o) const;
   virtual void join_group (systemtap_session& s);
   void emit_probe_local_init(systemtap_session& s, translator_output * o);
   void getargs(std::list<std::string> &arg_set) const;
@@ -5387,6 +5388,16 @@ dwarf_derived_probe::printsig (ostream& o) const
 }
 
 
+void
+dwarf_derived_probe::printsig_nonest (ostream& o) const
+{
+  sole_location()->print (o);
+  if (symbol_name != "")
+    o << " /* pc=<" << symbol_name << "+" << offset << "> */";
+  else
+    o << " /* pc=" << section << "+0x" << hex << addr << dec << " */";
+}
+
 
 void
 dwarf_derived_probe::join_group (systemtap_session& s)
This page took 0.044157 seconds and 5 git commands to generate.