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:11 +0100 |
commit | 32261e523447cdecdfffe93807ac9bd0de3fe88d (patch) | |
tree | c45272423433ef0836d18ddcba7570cb64c124be /gdb/dwarf2-frame.c | |
parent | ea001bdce2a4442eb556c64514c8ec2473f4c4d1 (diff) | |
download | gdb-32261e523447cdecdfffe93807ac9bd0de3fe88d.zip gdb-32261e523447cdecdfffe93807ac9bd0de3fe88d.tar.gz gdb-32261e523447cdecdfffe93807ac9bd0de3fe88d.tar.bz2 |
frame, cfa: check unwind stop reason first
Swap the unwind stop reason check and the unwinder check to allow
non-dwarf2 frame types to fail with a recoverable error.
gdb/
2013-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2-frame.c (dwarf2_frame_cfa): Move UNWIND_UNAVAILABLE check
earlier.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index d6d1bf7..772de56 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -1512,16 +1512,16 @@ dwarf2_frame_cfa (struct frame_info *this_frame) { while (get_frame_type (this_frame) == INLINE_FRAME) this_frame = get_prev_frame (this_frame); + if (get_frame_unwind_stop_reason (this_frame) == UNWIND_UNAVAILABLE) + throw_error (NOT_AVAILABLE_ERROR, + _("can't compute CFA for this frame: " + "required registers or memory are unavailable")); /* This restriction could be lifted if other unwinders are known to compute the frame base in a way compatible with the DWARF unwinder. */ if (!frame_unwinder_is (this_frame, &dwarf2_frame_unwind) && !frame_unwinder_is (this_frame, &dwarf2_tailcall_frame_unwind)) error (_("can't compute CFA for this frame")); - if (get_frame_unwind_stop_reason (this_frame) == UNWIND_UNAVAILABLE) - throw_error (NOT_AVAILABLE_ERROR, - _("can't compute CFA for this frame: " - "required registers or memory are unavailable")); return get_frame_base (this_frame); } |