diff options
Diffstat (limited to 'runtime/stack-x86_64.c')
-rw-r--r-- | runtime/stack-x86_64.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 33928677..03eb33e8 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -27,18 +27,19 @@ static void _stp_stack_print_fallback(unsigned long stack, int verbose, int leve #endif -static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) +static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels, + struct task_struct *tsk) { #ifdef STP_USE_DWARF_UNWINDER // FIXME: large stack allocation struct unwind_frame_info info; arch_unw_init_frame_info(&info, regs); - while (levels && !arch_unw_user_mode(&info)) { - int ret = unwind(&info); + while (levels && (tsk || !arch_unw_user_mode(&info))) { + int ret = unwind(&info, tsk); 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, current); + _stp_func_print(UNW_PC(&info), verbose, 1, tsk); levels--; continue; } |