summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
Diffstat (limited to 'tapset')
-rw-r--r--tapset/ChangeLog5
-rw-r--r--tapset/context.stp30
2 files changed, 16 insertions, 19 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index 63323cc7..1fc64c62 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-24 Josh Stone <joshua.i.stone@intel.com>
+
+ PR 2677
+ * context.stp (probefunc): Use _stp_symbol_sprint_basic
+
2006-05-19 Li Guanglei <guanglei@cn.ibm.com>
Patch from Mao Bibo (bibo.mao@intel.com)
diff --git a/tapset/context.stp b/tapset/context.stp
index 9a46df19..0565d1b7 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -1,5 +1,6 @@
// context tapset
// Copyright (C) 2005, 2006 Red Hat Inc.
+// Copyright (C) 2006 Intel Corporation.
//
// This file is part of systemtap, and is free software. You can
// redistribute it and/or modify it under the terms of the GNU General
@@ -89,9 +90,7 @@ function pp:string () %{ /* pure */
%}
function probefunc:string () %{ /* pure */
- char *dst, *ptr, *start;
- String str;
- int len = MAXSTRINGLEN;
+ char *ptr, *start;
start = strstr(CONTEXT->probe_point, "function(\"");
ptr = start + 10;
@@ -99,28 +98,21 @@ function probefunc:string () %{ /* pure */
start = strstr(CONTEXT->probe_point, "inline(\"");
ptr = start + 8;
}
+
if (start) {
- dst = THIS->__retvalue;
+ int len = MAXSTRINGLEN;
+ char *dst = THIS->__retvalue;
while (*ptr != '@' && --len > 0 && *ptr)
*dst++ = *ptr++;
*dst = 0;
+
} else if (CONTEXT->regs) {
- str = _stp_string_init (0);
- _stp_symbol_sprint(str, REG_IP(CONTEXT->regs));
- start = strstr(_stp_string_ptr(str), " : ");
- if (start) {
- dst = THIS->__retvalue;
- ptr = start+3;
- while (*ptr != '+' && --len > 0 && *ptr)
- *dst++ = *ptr++;
- *dst = 0;
- }
- else {
- strlcpy(THIS->__retvalue, _stp_string_ptr(str),MAXSTRINGLEN);
- }
+ _stp_symbol_sprint_basic(THIS->__retvalue, MAXSTRINGLEN,
+ REG_IP(CONTEXT->regs));
+
} else {
- THIS->__retvalue[0] = '\0';
- }
+ THIS->__retvalue[0] = '\0';
+ }
%}
function is_return:long () %{ /* pure */