summaryrefslogtreecommitdiffstats
path: root/runtime/stack-x86_64.c
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-17 16:18:34 +0100
committerTim Moore <timoore@redhat.com>2009-12-17 17:37:37 +0100
commitd5a2bd44d30b45b6829eb27d70ffb6ceaa70c5bd (patch)
tree0eced4c394d1e576932c5739bc5f819f8d584a6e /runtime/stack-x86_64.c
parent4c5ce7a55108edb5203b3d69949f09c2284f1963 (diff)
downloadsystemtap-steved-d5a2bd44d30b45b6829eb27d70ffb6ceaa70c5bd.tar.gz
systemtap-steved-d5a2bd44d30b45b6829eb27d70ffb6ceaa70c5bd.tar.xz
systemtap-steved-d5a2bd44d30b45b6829eb27d70ffb6ceaa70c5bd.zip
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
Diffstat (limited to 'runtime/stack-x86_64.c')
-rw-r--r--runtime/stack-x86_64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c
index 3fc203f7..80ebd3e7 100644
--- a/runtime/stack-x86_64.c
+++ b/runtime/stack-x86_64.c
@@ -38,6 +38,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),
@@ -47,6 +48,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);