diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/frame-unwind.c | 10 | ||||
-rw-r--r-- | gdb/frame.c | 15 |
3 files changed, 13 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2076e5d..b171f00 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2013-11-28 Pedro Alves <palves@redhat.com> + * frame-unwind.c (default_frame_unwind_stop_reason): Return + UNWIND_OUTERMOST if the frame's ID is outer_frame_id. + * frame.c (get_prev_frame_1): Remove outer_frame_id check. + +2013-11-28 Pedro Alves <palves@redhat.com> + * frame.c (get_prev_frame_1): If the frame id is outer_frame_id, set the unwind stop reason to UNWIND_OUTERMOST, not UNWIND_NULL_ID. Remove explicit check for sentinel frame. diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index a731b33..8fabf52 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -143,14 +143,18 @@ default_frame_sniffer (const struct frame_unwind *self, return 1; } -/* A default frame unwinder stop_reason callback that always claims - the frame is unwindable. */ +/* The default frame unwinder stop_reason callback. */ enum unwind_stop_reason default_frame_unwind_stop_reason (struct frame_info *this_frame, void **this_cache) { - return UNWIND_NO_REASON; + struct frame_id this_id = get_frame_id (this_frame); + + if (frame_id_eq (this_id, outer_frame_id)) + return UNWIND_OUTERMOST; + else + return UNWIND_NO_REASON; } /* Helper functions for value-based register unwinding. These return diff --git a/gdb/frame.c b/gdb/frame.c index 32008ac..df1d218 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1773,21 +1773,6 @@ get_prev_frame_1 (struct frame_info *this_frame) if (this_frame->stop_reason != UNWIND_NO_REASON) return NULL; - /* Check that this frame is not the outermost. If it is, don't try - to unwind to the prev frame. */ - this_id = get_frame_id (this_frame); - if (frame_id_eq (this_id, outer_frame_id)) - { - if (frame_debug) - { - fprintf_unfiltered (gdb_stdlog, "-> "); - fprint_frame (gdb_stdlog, NULL); - fprintf_unfiltered (gdb_stdlog, " // frame ID is outer_frame_id }\n"); - } - this_frame->stop_reason = UNWIND_OUTERMOST; - return NULL; - } - /* Check that this frame's ID isn't inner to (younger, below, next) the next frame. This happens when a frame unwind goes backwards. This check is valid only if this frame and the next frame are NORMAL. |