summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfche <fche>2006-10-04 17:22:15 +0000
committerfche <fche>2006-10-04 17:22:15 +0000
commit30e13b11a5dbc6c457f34a56945d3a10183bf3b7 (patch)
treedaa52ff8bbcfc3800a410aa82c47346aeae77f07
parent214d3eca806493162f53b83a9f498b7cdc206e53 (diff)
downloadsystemtap-steved-30e13b11a5dbc6c457f34a56945d3a10183bf3b7.tar.gz
systemtap-steved-30e13b11a5dbc6c457f34a56945d3a10183bf3b7.tar.xz
systemtap-steved-30e13b11a5dbc6c457f34a56945d3a10183bf3b7.zip
2006-10-04 Frank Ch. Eigler <fche@elastic.org>
* context.stp (probefunc): Return empty string for userspace (< PAGE_OFFSET) pointers.
-rw-r--r--tapset/ChangeLog5
-rw-r--r--tapset/context.stp8
2 files changed, 10 insertions, 3 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index 851d059e..3f723916 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-04 Frank Ch. Eigler <fche@elastic.org>
+
+ * context.stp (probefunc): Return empty string for
+ userspace (< PAGE_OFFSET) pointers.
+
2006-09-26 David Smith <dsmith@redhat.com>
* test/run.sh: Changed 'stpd' references to 'staprun'.
diff --git a/tapset/context.stp b/tapset/context.stp
index 7c59b0d6..ab71193a 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -106,11 +106,12 @@ function probefunc:string () %{ /* pure */
*dst++ = *ptr++;
*dst = 0;
- } else if (CONTEXT->regs) {
+ } else if (CONTEXT->regs &&
+ (REG_IP(CONTEXT->regs) >= PAGE_OFFSET)) {
_stp_symbol_sprint_basic(THIS->__retvalue, MAXSTRINGLEN,
REG_IP(CONTEXT->regs));
- if (THIS->__retvalue[0] == '.') /* powerpc symbol has a dot*/
- strlcpy(THIS->__retvalue,THIS->__retvalue + 1,MAXSTRINGLEN);
+ if (THIS->__retvalue[0] == '.') /* powerpc symbol has a dot*/
+ strlcpy(THIS->__retvalue,THIS->__retvalue + 1,MAXSTRINGLEN);
} else {
THIS->__retvalue[0] = '\0';
}
@@ -129,6 +130,7 @@ function probemod:string () %{ /* pure */
*dst++ = *ptr++;
*dst = 0;
} else {
+ /* XXX: need a PC- and symbol-table-based fallback. */
THIS->__retvalue[0] = '\0';
}
%}