summaryrefslogtreecommitdiffstats
path: root/runtime/stack-i386.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-02-20 14:56:38 +0100
committerMark Wielaard <mjw@redhat.com>2009-02-20 14:56:38 +0100
commit02615365a92ca2570c1f96abc8a97674aa2ccae1 (patch)
treeebedfd91a0f6d299b39e84295e091e12c0767dc8 /runtime/stack-i386.c
parentc3bad3042df505a3470f1e20b09822a9df1d4761 (diff)
parentadc67597f327cd43d58b1d0cb740dab14a75a058 (diff)
downloadsystemtap-steved-02615365a92ca2570c1f96abc8a97674aa2ccae1.tar.gz
systemtap-steved-02615365a92ca2570c1f96abc8a97674aa2ccae1.tar.xz
systemtap-steved-02615365a92ca2570c1f96abc8a97674aa2ccae1.zip
Merge branch 'master' into pr6866
Conflicts: ChangeLog: Removed runtime/ChangeLog: Removed runtime/sym.c: Merged runtime/task_finder.c: Merged tapset/ChangeLog: Removed testsuite/ChangeLog: Removed
Diffstat (limited to 'runtime/stack-i386.c')
-rw-r--r--runtime/stack-i386.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c
index ed7e2ce1..206801d8 100644
--- a/runtime/stack-i386.c
+++ b/runtime/stack-i386.c
@@ -14,10 +14,11 @@ static int _stp_valid_stack_ptr(unsigned long context, unsigned long p)
}
/* DWARF unwinder failed. Just dump intereting addresses on kernel stack. */
-static void _stp_stack_print_fallback(unsigned long context, unsigned long stack, int verbose, int levels)
+#if ! (defined(CONFIG_STACKTRACE) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26))
+static void _stp_stack_print_fallback(unsigned long stack, int verbose, int levels)
{
unsigned long addr;
- while (levels && _stp_valid_stack_ptr(context, stack)) {
+ while (levels && stack & (THREAD_SIZE-1)) {
if (unlikely(_stp_read_address(addr, (unsigned long *)stack, KERNEL_DS))) {
/* cannot access stack. give up. */
return;
@@ -27,6 +28,7 @@ static void _stp_stack_print_fallback(unsigned long context, unsigned long stack
stack++;
}
}
+#endif
static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels)
{
@@ -69,11 +71,11 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels)
/* If an error happened or we hit a kretprobe trampoline, use fallback backtrace */
/* FIXME: is there a way to unwind across kretprobe trampolines? */
if (ret < 0 || (ret > 0 && UNW_PC(&info) == _stp_kretprobe_trampoline))
- _stp_stack_print_fallback(context, UNW_SP(&info), verbose, levels);
+ _stp_stack_print_fallback(UNW_SP(&info), verbose, levels);
break;
}
#else /* ! STP_USE_DWARF_UNWINDER */
- _stp_stack_print_fallback(context, (unsigned long)&REG_SP(regs), verbose, levels);
+ _stp_stack_print_fallback((unsigned long)&REG_SP(regs), verbose, levels);
#endif /* STP_USE_FRAME_POINTER */
#endif
}