summaryrefslogtreecommitdiffstats
path: root/tapset/context-unwind.stp
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-02-20 14:56:38 +0100
committerMark Wielaard <mjw@redhat.com>2009-02-20 14:56:38 +0100
commit02615365a92ca2570c1f96abc8a97674aa2ccae1 (patch)
treeebedfd91a0f6d299b39e84295e091e12c0767dc8 /tapset/context-unwind.stp
parentc3bad3042df505a3470f1e20b09822a9df1d4761 (diff)
parentadc67597f327cd43d58b1d0cb740dab14a75a058 (diff)
downloadsystemtap-steved-02615365a92ca2570c1f96abc8a97674aa2ccae1.tar.gz
systemtap-steved-02615365a92ca2570c1f96abc8a97674aa2ccae1.tar.xz
systemtap-steved-02615365a92ca2570c1f96abc8a97674aa2ccae1.zip
Merge branch 'master' into pr6866
Conflicts: ChangeLog: Removed runtime/ChangeLog: Removed runtime/sym.c: Merged runtime/task_finder.c: Merged tapset/ChangeLog: Removed testsuite/ChangeLog: Removed
Diffstat (limited to 'tapset/context-unwind.stp')
-rw-r--r--tapset/context-unwind.stp17
1 files changed, 9 insertions, 8 deletions
diff --git a/tapset/context-unwind.stp b/tapset/context-unwind.stp
index 59d111ee..7c96b7e2 100644
--- a/tapset/context-unwind.stp
+++ b/tapset/context-unwind.stp
@@ -23,10 +23,11 @@
* except that deeper stack nesting may be supported. Return nothing.
*/
function print_backtrace () %{
- if (! CONTEXT->regs)
- WARN_ON (! CONTEXT->regs);
- else
- _stp_stack_print(CONTEXT->regs, 1, CONTEXT->pi, MAXTRACE);
+ if (CONTEXT->regs) {
+ _stp_stack_print(CONTEXT->regs, 1, CONTEXT->pi, MAXTRACE);
+ } else {
+ _stp_printf("Systemtap probe: %s\n", CONTEXT->probe_point);
+ }
%}
/**
@@ -36,10 +37,10 @@ function print_backtrace () %{
* stack. It may be truncated due to maximum string length.
*/
function backtrace:string () %{ /* pure */
- if (! CONTEXT->regs)
- WARN_ON (! CONTEXT->regs);
- else
- _stp_stack_snprint (THIS->__retvalue, MAXSTRINGLEN, CONTEXT->regs, 0, CONTEXT->pi, MAXTRACE);
+ if (CONTEXT->regs)
+ _stp_stack_snprint (THIS->__retvalue, MAXSTRINGLEN, CONTEXT->regs, 0, CONTEXT->pi, MAXTRACE);
+ else
+ strlcpy (THIS->__retvalue, "", MAXSTRINGLEN);
%}
/**