From 824344ca4f9765b5598aed2c11b6f3caf5cc77ba Mon Sep 17 00:00:00 2001 From: Markus Metzger <markus.t.metzger@intel.com> Date: Mon, 18 Mar 2013 16:43:05 +0100 Subject: frame: do not assume unwinding will succeed In get_frame_unwind_stop_reason, remove the assumption that further frame unwinding will succeed. gdb/ 2013-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * frame.c (get_frame_unwind_stop_reason): Unconditionally call get_prev_frame_1. --- gdb/frame.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gdb/frame.c') diff --git a/gdb/frame.c b/gdb/frame.c index b72d5e4aad3..8cd607b5ba4 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -2522,13 +2522,10 @@ get_frame_sp (struct frame_info *this_frame) enum unwind_stop_reason get_frame_unwind_stop_reason (struct frame_info *frame) { - /* If we haven't tried to unwind past this point yet, then assume - that unwinding would succeed. */ - if (frame->prev_p == 0) - return UNWIND_NO_REASON; + /* Fill-in STOP_REASON. */ + get_prev_frame_1 (frame); + gdb_assert (frame->prev_p); - /* Otherwise, we set a reason when we succeeded (or failed) to - unwind. */ return frame->stop_reason; } -- cgit v1.2.1