summaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-05-20 22:21:19 +0000
committerPedro Alves <pedro@codesourcery.com>2008-05-20 22:21:19 +0000
commit917a77477249e00136b49f13fdd6ea57c44a0614 (patch)
tree07b53349ed39ae8cb8a276f8a69eabb3143cad3a /gdb/frame.c
parent51f07f295c5616a21244a8a31e3a1065d5405b49 (diff)
downloadgdb-917a77477249e00136b49f13fdd6ea57c44a0614.tar.gz
* frame.c (get_prev_frame_1): Build frame id before setting
this_frame->prev_p, not after.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c6
1 files changed, 5 insertions, 1 deletions
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)