Anton Arapov sent a test kernel build with new support for uretprobes,
and this patch adds stap support. I've confirmed that it works on
x86_64, but i686 is crashing the target processes with SIGSEGV.
We need to find a dynamic (pass-2) way to detect the presence of
uretprobes in the kernel. For now, I've just hacked it enabled, and it
will fail registration at runtime.
* buildrun.cxx (compile_pass): Autoconf uretprobes and its exports.
* runtime/linux/autoconf-inode-uretprobes.c: New, check for uretprobes.
* runtime/linux/runtime.h: Add function pointers for uretprobes.
* runtime/transport/transport.c (_stp_transport_init): Set the uretprobe
function pointers if not exported. (Anton's kernel does have exports,
but we're prepared in case upstream doesn't accept those.)
* runtime/linux/uprobes-inode.c (stapiu_consumer): Let this double as
either a uprobe_consumer or a uretprobe_consumer, chosen by return_p.
(stapiu_probe_handler): Add a new generic function signature.
(stapiu_uprobe_handler, stapiu_uretprobe_handler): New specific
callbacks that mux into stapiu_probe_handler.
(stapiu_register, stapiu_unregister): New functions to perform the
appropriate kind of registration for a probe.
* tapsets.cxx (dwarf_builder::build): Hack the uretprobes check.
(uprobe_derived_probe_group::emit_module_inode_decls): Use the new
signature for the probe handler, and emit .return_p.