]> sourceware.org Git - systemtap.git/commitdiff
2005-06-29 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Wed, 29 Jun 2005 19:52:01 +0000 (19:52 +0000)
committerhunt <hunt>
Wed, 29 Jun 2005 19:52:01 +0000 (19:52 +0000)
* current.c (_stp_ret_addr_r): New function.
(_stp_probe_addr): New function.
(_stp_probe_addr_r): New function.

runtime/ChangeLog
runtime/current.c

index 15d5bdd6db6a29038fa9dbefcab4549f77e4549e..eccf854e27b9e1570eeccce5637cc8a0bea0b84b 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-29  Martin Hunt  <hunt@redhat.com>
+
+       * current.c (_stp_ret_addr_r): New function.
+       (_stp_probe_addr): New function.
+       (_stp_probe_addr_r): New function.
+
 2005-06-27  Martin Hunt  <hunt@redhat.com>
 
        * Doxyfile (PREDEFINED): Added USE_RET_PROBES.
index 82ab400eba3dc14162ef96c60923ce9360676cbf..7edfaf5fd8d6690efecf21e412f5d53240449c4a 100644 (file)
@@ -34,6 +34,29 @@ unsigned long _stp_ret_addr (struct pt_regs *regs)
 #endif
 }
 
+/** Get the current return address for a return probe.
+ * Call from kprobe return probe.
+ * @param ri Pointer to the struct kretprobe_instance.
+ * @return The return address
+ */
+#define _stp_ret_addr_r(ri) (ri->ret_addr)
+
+/** Get the probe address for a kprobe.
+ * Call from a kprobe. This will return the
+ * address of the function that is being probed.
+ * @param kp Pointer to the struct kprobe.
+ * @return The function's address
+ */
+#define _stp_probe_addr(kp) (kp->addr)
+
+/** Get the probe address for a return probe.
+ * Call from kprobe return probe. This will return the
+ * address of the function that is being probed.
+ * @param ri Pointer to the struct kretprobe_instance.
+ * @return The function's address
+ */
+#define _stp_probe_addr_r(ri) (ri->rp->kp.addr)
+
 #ifdef  __x86_64__
 void _stp_sprint_regs(String str, struct pt_regs * regs)
 {
@@ -78,7 +101,7 @@ void _stp_sprint_regs(String str, struct pt_regs * regs)
 
 /** Write the registers to a string.
  * @param regs The pt_regs saved by the kprobe.
- * @note i386 and x86_64 only so far.
+ * @note i386 and x86_64 only so far. 
  */
 void _stp_sprint_regs(String str, struct pt_regs * regs)
 {
This page took 0.029568 seconds and 5 git commands to generate.