diff options
author | hunt <hunt> | 2006-01-31 05:59:35 +0000 |
---|---|---|
committer | hunt <hunt> | 2006-01-31 05:59:35 +0000 |
commit | ae246abb53ef1c57eedb0b67da349f87ec43a0ce (patch) | |
tree | 7cec43d38887feb33fa97425a0cc04c8ce139539 /tapset/context.stp | |
parent | 1d738eedba4bded6e6d72fd52710fe91ce880229 (diff) | |
download | systemtap-steved-ae246abb53ef1c57eedb0b67da349f87ec43a0ce.tar.gz systemtap-steved-ae246abb53ef1c57eedb0b67da349f87ec43a0ce.tar.xz systemtap-steved-ae246abb53ef1c57eedb0b67da349f87ec43a0ce.zip |
2006-01-30 Martin Hunt <hunt@redhat.com>
* context.stp (probefunc): New function.
(is_return): New function.
(returnval): New function.
Diffstat (limited to 'tapset/context.stp')
-rw-r--r-- | tapset/context.stp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tapset/context.stp b/tapset/context.stp index 4ba9dfb2..3056ed18 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -84,7 +84,32 @@ function pp:string () %{ strlcpy (THIS->__retvalue, CONTEXT->probe_point, MAXSTRINGLEN); %} +function probefunc:string () %{ + char *start = strstr(CONTEXT->probe_point, "function(\""); + if (start) { + char *ptr = start+10; + char *dst = THIS->__retvalue; + int len = MAXSTRINGLEN; + while (*ptr != '@' && --len > 0 && *ptr) + *dst++ = *ptr++; + *dst = 0; + } +%} + +function is_return:long () %{ + char *ptr = strrchr(CONTEXT->probe_point, '.'); + if (ptr) { + if (strcmp(ptr+1,"return") == 0) + THIS->__retvalue = 1; + } +%} + function target:long () %{ THIS->__retvalue = _stp_target; %} +function returnval:long () %{ + if (CONTEXT->regs) { + THIS->__retvalue = dwarf_register_0(CONTEXT->regs); + } +%} |