This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v9 18/29] frame: do not assume unwinding will succeed
- From: Markus Metzger <markus dot t dot metzger at intel dot com>
- To: jan dot kratochvil at redhat dot com, palves at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 19 Dec 2013 17:44:48 +0100
- Subject: [PATCH v9 18/29] frame: do not assume unwinding will succeed
- Authentication-results: sourceware.org; auth=none
- References: <1387471499-29444-1-git-send-email-markus dot t dot metzger at intel dot com>
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/frame.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/gdb/frame.c b/gdb/frame.c
index 8facdc00..8dd4714 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -2533,13 +2533,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;
}
--
1.8.3.1