diff options
Diffstat (limited to 'runtime/stack-x86_64.c')
-rw-r--r-- | runtime/stack-x86_64.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 3ba99201..e2eb4aa2 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -30,16 +30,15 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) struct unwind_frame_info info; arch_unw_init_frame_info(&info, regs); - /* we haven't actually executed the instruction at the IP yet. */ - UNW_PC(&info) -= 1; - while (!arch_unw_user_mode(&info)) { int ret = unwind(&info); - dbug_unwind(1, "ret=%d PC=%lx\n", ret, UNW_PC(&info)); + dbug_unwind(1, "ret=%d PC=%lx SP=%lx\n", ret, UNW_PC(&info), UNW_SP(&info)); if (ret < 0) { _stp_stack_print_fallback(UNW_SP(&info), verbose); break; } + if (ret) + break; _stp_func_print(UNW_PC(&info), verbose, 1); } } |