From 8fa75a5d1741c337abb7d1e04fc36348f54145e0 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 20 May 2008 22:21:19 +0000 Subject: [PATCH] * frame.c (get_prev_frame_1): Build frame id before setting this_frame->prev_p, not after. --- gdb/ChangeLog | 5 +++++ gdb/frame.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 81be400aaa4..19cb11c6458 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-05-21 Pedro Alves + + * frame.c (get_prev_frame_1): Build frame id before setting + this_frame->prev_p, not after. + 2008-05-21 Nick Roberts * annotate.c (annotate_new_thread): New function for new-thread diff --git a/gdb/frame.c b/gdb/frame.c index 45b9b5f3903..937aced8d7d 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1179,13 +1179,17 @@ get_prev_frame_1 (struct frame_info *this_frame) } return this_frame->prev; } + + /* If the frame id hasn't been built yet, it must be done before + setting a stop reason. */ + this_id = get_frame_id (this_frame); + this_frame->prev_p = 1; this_frame->stop_reason = UNWIND_NO_REASON; /* Check that this frame's ID was valid. If it wasn't, don't try to unwind to the prev frame. Be careful to not apply this test to the sentinel frame. */ - this_id = get_frame_id (this_frame); if (this_frame->level >= 0 && !frame_id_p (this_id)) { if (frame_debug) -- 2.30.2