summaryrefslogtreecommitdiffstats
path: root/tapset/kretprobe.stp
Commit message (Collapse)AuthorAgeFilesLines
* PR5916: Exploit kretprobe data storage areaJosh Stone2009-11-101-0/+56
Since 2.6.25, kretprobes can carry a data packet to be filled in an entry_handler. This patch lets us store our implicitly-saved $target variables in .return probes in that data area. * tapset/kretprobe.stp: New get/set functions for kretprobe data. * translate.cxx (c_unparser::emit_common_header): Add context->pi_longs. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol_saved_return): Switch between the old and new methods of saving $vars in .return probes. (dwarf_var_expanding_visitor::gen_mapped_saved_return): The old way. (dwarf_var_expanding_visitor::gen_kretprobe_saved_return): The new way. (dwarf_derived_probe::join_group): Don't register paired entry-handlers. (dwarf_derived_probe::dwarf_derived_probe): Remember saved-var details. (dwarf_derived_probe_group::emit_module_decls): Output saved-var details. Also split the kretprobe handler whether we're on entry or return. (dwarf_derived_probe_group::emit_module_init): Prepare the entry handler. * testsuite/systemtap.base/kretprobe-vars.stp: Test implicit $var saving.