From d5a2bd44d30b45b6829eb27d70ffb6ceaa70c5bd Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Thu, 17 Dec 2009 16:18:34 +0100 Subject: support for a brief backtrace format This only prints symbol+offset, or an address if the symbol isn't known. * runtime/runtime.h (SYM_VERBOSE_NO, SYM_VERBOSE_FULL, SYM_VERBOSE_BRIEF): new constants * runtime/stack.c (_stp_stack_print): support brief format * runtime/sym.c (_stp_func_print): ditto * tapset/ucontext-unwind.stp (print_ubacktrace_brief): new function * testsuite/systemtap.context/fib.c: new test program * testsuite/systemtap.context/fib.stp: new test * testsuite/systemtap.context/fib.exp: new test --- runtime/stack-i386.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/stack-i386.c') diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c index fef11871..4bd3cc53 100644 --- a/runtime/stack-i386.c +++ b/runtime/stack-i386.c @@ -63,6 +63,7 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels, while (levels && (tsk || !arch_unw_user_mode(&info))) { int ret = unwind(&info, tsk); +#if UPROBES_API_VERSION > 1 unsigned long maybe_pc = 0; if (ri) { maybe_pc = uprobe_get_pc(ri, UNW_PC(&info), @@ -72,6 +73,7 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels, else UNW_PC(&info) = maybe_pc; } +#endif dbug_unwind(1, "ret=%d PC=%lx SP=%lx\n", ret, UNW_PC(&info), UNW_SP(&info)); if (ret == 0) { _stp_func_print(UNW_PC(&info), verbose, 1, tsk); -- cgit