frame: do not assume unwinding will succeed
authorMarkus Metzger <markus.t.metzger@intel.com>
Mon, 18 Mar 2013 15:43:05 +0000 (16:43 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Thu, 16 Jan 2014 12:06:12 +0000 (13:06 +0100)
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/ChangeLog
gdb/frame.c

index 077d059d9b836307e1bb6eb9144872787f09f781..5ac01830c754fb4802ae18b238055ae3ba5827b8 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * frame.c (get_frame_unwind_stop_reason): Unconditionally call
+       get_prev_frame_1.
+
 2014-01-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * dwarf2-frame.c (dwarf2_frame_cfa): Move UNWIND_UNAVAILABLE check
index b72d5e4aad3f18773ba97879dc4f95442b20e2a8..8cd607b5ba404e8ee3e7e81553d6c659a79747e4 100644 (file)
@@ -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;
 }
 
This page took 0.044272 seconds and 4 git commands to generate.