summaryrefslogtreecommitdiffstats
path: root/tapset/context.stp
diff options
context:
space:
mode:
Diffstat (limited to 'tapset/context.stp')
-rw-r--r--tapset/context.stp4
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(" ");