From f9eba66ef3ec406f883caebed75cdeaa042f6b33 Mon Sep 17 00:00:00 2001 From: fche Date: Sat, 3 Sep 2005 17:24:49 +0000 Subject: 2005-09-03 Frank Ch. Eigler 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. --- tapset/context.stp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tapset/context.stp') 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(" "); -- cgit