diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-02-03 15:40:41 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-02-03 15:40:41 -0500 |
commit | 22f8b401b35f9d3fc17dc682dcf1785309206647 (patch) | |
tree | 6e480fc5479a303194c05a99b1490f3766109a7c /tapset/context-unwind.stp | |
parent | 0c44723c0834224111db09284218d3104d149b44 (diff) | |
download | systemtap-steved-22f8b401b35f9d3fc17dc682dcf1785309206647.tar.gz systemtap-steved-22f8b401b35f9d3fc17dc682dcf1785309206647.tar.xz systemtap-steved-22f8b401b35f9d3fc17dc682dcf1785309206647.zip |
PR9810: Mostly revert "PR6961: initial sketch: set up dummy pt_regs for non-trap based probes"
Diffstat (limited to 'tapset/context-unwind.stp')
-rw-r--r-- | tapset/context-unwind.stp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tapset/context-unwind.stp b/tapset/context-unwind.stp index 4c5ed34b..a0836ed6 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); %} /** |