diff options
author | Josh Stone <jistone@redhat.com> | 2009-04-24 18:37:35 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-04-24 20:09:43 -0700 |
commit | 46856d8d04167a05b62f8d3a480b2be7509fcf86 (patch) | |
tree | 0da02804a43bc716c03d608f4366ee4ab91af299 /tapsets.cxx | |
parent | 5badd4d0d1fc3f7dce2dc26a3ad5a69275ff07d2 (diff) | |
download | systemtap-steved-46856d8d04167a05b62f8d3a480b2be7509fcf86.tar.gz systemtap-steved-46856d8d04167a05b62f8d3a480b2be7509fcf86.tar.xz systemtap-steved-46856d8d04167a05b62f8d3a480b2be7509fcf86.zip |
Fill out the pp() for dwarfless kprobes
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 28 |
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; } |