diff options
Diffstat (limited to 'tapset/context.stp')
-rw-r--r-- | tapset/context.stp | 17 |
1 files changed, 17 insertions, 0 deletions
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) { |