summaryrefslogtreecommitdiffstats
path: root/runtime/uprobes/uprobes_x86_64.c
diff options
context:
space:
mode:
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>2008-10-28 17:07:27 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-10-28 17:07:27 -0400
commit669bdbfc3aee6d85f4f1b84766a5bfdcb0cc48cf (patch)
tree7d02711c134e816b4f1503538303219ff2b35b1e /runtime/uprobes/uprobes_x86_64.c
parent3cec42574e444b7f91e2d887527bea45348ffb79 (diff)
downloadsystemtap-steved-669bdbfc3aee6d85f4f1b84766a5bfdcb0cc48cf.tar.gz
systemtap-steved-669bdbfc3aee6d85f4f1b84766a5bfdcb0cc48cf.tar.xz
systemtap-steved-669bdbfc3aee6d85f4f1b84766a5bfdcb0cc48cf.zip
PR5274: uretprobes fixes, belated commit
Diffstat (limited to 'runtime/uprobes/uprobes_x86_64.c')
-rw-r--r--runtime/uprobes/uprobes_x86_64.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/uprobes/uprobes_x86_64.c b/runtime/uprobes/uprobes_x86_64.c
index a681cab5..8cf36623 100644
--- a/runtime/uprobes/uprobes_x86_64.c
+++ b/runtime/uprobes/uprobes_x86_64.c
@@ -701,3 +701,13 @@ unsigned long arch_hijack_uret_addr(unsigned long trampoline_address,
}
return orig_ret_addr;
}
+
+static
+unsigned long arch_predict_sp_at_ret(struct pt_regs *regs,
+ struct task_struct *tsk)
+{
+ if (test_tsk_thread_flag(tsk, TIF_IA32))
+ return (unsigned long) regs->rsp + 4;
+ else
+ return (unsigned long) regs->rsp + 8;
+}