summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-04-24 18:37:35 -0700
committerJosh Stone <jistone@redhat.com>2009-04-24 20:09:43 -0700
commit46856d8d04167a05b62f8d3a480b2be7509fcf86 (patch)
tree0da02804a43bc716c03d608f4366ee4ab91af299
parent5badd4d0d1fc3f7dce2dc26a3ad5a69275ff07d2 (diff)
downloadsystemtap-steved-46856d8d04167a05b62f8d3a480b2be7509fcf86.tar.gz
systemtap-steved-46856d8d04167a05b62f8d3a480b2be7509fcf86.tar.xz
systemtap-steved-46856d8d04167a05b62f8d3a480b2be7509fcf86.zip
Fill out the pp() for dwarfless kprobes
-rw-r--r--tapsets.cxx28
1 files changed, 25 insertions, 3 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 511289df..9a8524b1 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -8350,11 +8350,33 @@ kprobe_derived_probe::kprobe_derived_probe (probe *base,
#define USHRT_MAX 32767
#endif
- // Expansion of $target variables in the probe body produces an error during translate phase
+ // Expansion of $target variables in the probe body produces an error during
+ // translate phase, since we're not using debuginfo
+
vector<probe_point::component*> comps;
+ comps.push_back (new probe_point::component(TOK_KPROBE));
- if (has_return)
- comps.push_back (new probe_point::component(TOK_RETURN));
+ if (has_statement)
+ {
+ comps.push_back (new probe_point::component(TOK_STATEMENT, new literal_number(addr)));
+ comps.push_back (new probe_point::component(TOK_ABSOLUTE));
+ }
+ else
+ {
+ size_t pos = name.find(':');
+ if (pos != string::npos)
+ {
+ string module = name.substr(0, pos);
+ string function = name.substr(pos + 1);
+ comps.push_back (new probe_point::component(TOK_MODULE, new literal_string(module)));
+ comps.push_back (new probe_point::component(TOK_FUNCTION, new literal_string(function)));
+ }
+ else
+ comps.push_back (new probe_point::component(TOK_FUNCTION, new literal_string(name)));
+
+ if (has_return)
+ comps.push_back (new probe_point::component(TOK_RETURN));
+ }
this->sole_location()->components = comps;
}