From 028e1bde11b9644d1ac62f0a1a2188cf8def234a Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sun, 20 Dec 2009 13:34:16 -0500 Subject: runtime backtracing: port commit #2e7f8442 to uprobes1 * runtime/uprobes/uprobes.c (uprobe_get_pc): new function --- runtime/uprobes/uprobes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runtime/uprobes/uprobes.h') diff --git a/runtime/uprobes/uprobes.h b/runtime/uprobes/uprobes.h index d542420d..e888f9e8 100644 --- a/runtime/uprobes/uprobes.h +++ b/runtime/uprobes/uprobes.h @@ -95,6 +95,14 @@ extern void unregister_uretprobe(struct uretprobe *rp); /* For PRs 9940, 6852... */ extern void unmap_uprobe(struct uprobe *u); extern void unmap_uretprobe(struct uretprobe *rp); +/* + * Given a program counter, translate it back to the original address + * if it is the address of the trampoline. sp is the stack pointer for + * the frame that corresponds to the address. + */ +extern unsigned long uprobe_get_pc(struct uretprobe_instance *ri, + unsigned long pc, + unsigned long sp); #ifdef UPROBES_IMPLEMENTATION -- cgit