summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
Diffstat (limited to 'tapset')
-rw-r--r--tapset/ChangeLog4
-rw-r--r--tapset/context.stp17
2 files changed, 21 insertions, 0 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index efe52985..c7210a5e 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,7 @@
+2006-08-08 Eugene Teo <eteo@redhat.com>
+
+ * context.stp (probemod): New function.
+
2006-07-18 Thang Nguyen <thang.p.nguyen@intel.com>
* context.stp: Modified probefunc() to print the function
diff --git a/tapset/context.stp b/tapset/context.stp
index 16b176af..7c59b0d6 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -116,6 +116,23 @@ function probefunc:string () %{ /* pure */
}
%}
+function probemod:string () %{ /* pure */
+ char *ptr, *start;
+
+ start = strstr(CONTEXT->probe_point, "module(\"");
+ ptr = start + 8;
+
+ if (start) {
+ int len = MAXSTRINGLEN;
+ char *dst = THIS->__retvalue;
+ while (*ptr != '"' && --len && *ptr)
+ *dst++ = *ptr++;
+ *dst = 0;
+ } else {
+ THIS->__retvalue[0] = '\0';
+ }
+%}
+
function is_return:long () %{ /* pure */
char *ptr = strrchr(CONTEXT->probe_point, '.');
if (ptr) {