diff options
author | fche <fche> | 2005-09-03 17:24:49 +0000 |
---|---|---|
committer | fche <fche> | 2005-09-03 17:24:49 +0000 |
commit | f9eba66ef3ec406f883caebed75cdeaa042f6b33 (patch) | |
tree | ee5996857ff254f209742df2ad9ed54e50b4e157 /tapset/context.stp | |
parent | 6a505121fc997e6f21d26f8c8656f99e58faaaab (diff) | |
download | systemtap-steved-f9eba66ef3ec406f883caebed75cdeaa042f6b33.tar.gz systemtap-steved-f9eba66ef3ec406f883caebed75cdeaa042f6b33.tar.xz systemtap-steved-f9eba66ef3ec406f883caebed75cdeaa042f6b33.zip |
2005-09-03 Frank Ch. Eigler <fche@elastic.org>
PR 1187 prime
* tapset.cxx (literal_stmt_for_local): Don't automgaically copy
target char*'s to systemtap strings.
* tapset/conversions.stp (user_string, kernel_string): New functions.
* stapfuncs.5.in: Document new functions.
Diffstat (limited to 'tapset/context.stp')
-rw-r--r-- | tapset/context.stp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tapset/context.stp b/tapset/context.stp index 32b009bf..6d600190 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -10,8 +10,9 @@ function print_backtrace () %{ } %} -function backtrace () %{ +function backtrace:string () %{ if (CONTEXT->regs) { + /* XXX: is String really necessary for this? */ String str = _stp_string_init (0); _stp_stack_sprint (str, CONTEXT->regs, 0); strlcpy (THIS->__retvalue, _stp_string_ptr(str), MAXSTRINGLEN); @@ -79,6 +80,7 @@ function euid:long () %{ function print_stack(stk:string) %{ char *ptr = THIS->stk; char *tok = strsep(&ptr, " "); + /* XXX: is this header really necessary & accurate? */ _stp_printf ("trace for %d (%s)\n", current->pid, current->comm); while (tok && *tok) { _stp_print_cstr(" "); |