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>
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;
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;
}
+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)