* frame.c (get_prev_frame_1): Build frame id before setting
authorPedro Alves <palves@redhat.com>
Tue, 20 May 2008 22:21:19 +0000 (22:21 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 20 May 2008 22:21:19 +0000 (22:21 +0000)
this_frame->prev_p, not after.

gdb/ChangeLog
gdb/frame.c

index 81be400aaa4a9c3d2dc971000781d66a9d0ec484..19cb11c6458c4a42e8e79241fbfcf29bb5c91136 100644 (file)
@@ -1,3 +1,8 @@
+2008-05-21  Pedro Alves  <pedro@codesourcery.com>
+
+       * frame.c (get_prev_frame_1): Build frame id before setting
+       this_frame->prev_p, not after.
+
 2008-05-21  Nick Roberts  <nickrob@snap.net.nz>
 
        * annotate.c (annotate_new_thread): New function for new-thread
index 45b9b5f39034effe2c17bbe533926e44d3afa995..937aced8d7d0eac6ecf3cea23384a5826484d969 100644 (file)
@@ -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)