diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2013-03-18 16:43:05 +0100 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2014-01-16 13:06:12 +0100 |
commit | 824344ca4f9765b5598aed2c11b6f3caf5cc77ba (patch) | |
tree | 677fe9059c91005f9af7fde3ecc82acd933aeccf | |
parent | 32261e523447cdecdfffe93807ac9bd0de3fe88d (diff) | |
download | gdb-824344ca4f9765b5598aed2c11b6f3caf5cc77ba.zip gdb-824344ca4f9765b5598aed2c11b6f3caf5cc77ba.tar.gz gdb-824344ca4f9765b5598aed2c11b6f3caf5cc77ba.tar.bz2 |
frame: do not assume unwinding will succeed
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.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/frame.c | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 077d059..5ac0183 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 earlier. diff --git a/gdb/frame.c b/gdb/frame.c index b72d5e4..8cd607b 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -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; } |