PR14573 (partial): Pass some registers into stapdyn
There doesn't seem to be a way to create and pass the pt_regs structure
from the Dyninst API, but we can still get most registers. This patch
adds a new enter_dyninst_uprobe_regs() to receive registers and fill
them into a pt_regs from there.
XXX Dyninst is currently limited in how many individual function
arguments it can pass, so for now I'm cutting it down to the first 8.
* runtime/dyninst/stapdyn.h: Declare enter_dyninst_uprobe_regs.
* runtime/dyninst/uprobes.c: Implement it, filling all dwarf registers
into a local struct pt_regs.
* runtime/dyninst/regs.c: Include regs.h to get SET_REG_IP.
* stapdyn/stapdyn.cxx (get_dwarf_registers): Create BPatch_snippets for
as many of the DWARF registers as possible (bug-limited to 8).
(instrument_uprobes): Look for the new entry function and use it.