From ae246abb53ef1c57eedb0b67da349f87ec43a0ce Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 31 Jan 2006 05:59:35 +0000 Subject: 2006-01-30 Martin Hunt * context.stp (probefunc): New function. (is_return): New function. (returnval): New function. --- tapset/ChangeLog | 6 ++++++ tapset/context.stp | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) (limited to 'tapset') diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 0313e589..fdfc3bc1 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,9 @@ +2006-01-30 Martin Hunt + + * context.stp (probefunc): New function. + (is_return): New function. + (returnval): New function. + 2006-01-15 Frank Ch. Eigler * logging.stp: Revert. 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); + } +%} -- cgit