diff options
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index 7088f32..b3cbf23 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -784,9 +784,9 @@ frame_unwind_pc (struct frame_info *this_frame) { if (gdbarch_unwind_pc_p (frame_unwind_arch (this_frame))) { - volatile struct gdb_exception ex; struct gdbarch *prev_gdbarch; CORE_ADDR pc = 0; + int pc_p = 0; /* The right way. The `pure' way. The one true way. This method depends solely on the register-unwind code to @@ -806,11 +806,12 @@ frame_unwind_pc (struct frame_info *this_frame) different ways that a PC could be unwound. */ prev_gdbarch = frame_unwind_arch (this_frame); - TRY_CATCH (ex, RETURN_MASK_ERROR) + TRY { pc = gdbarch_unwind_pc (prev_gdbarch, this_frame); + pc_p = 1; } - if (ex.reason < 0) + CATCH (ex, RETURN_MASK_ERROR) { if (ex.error == NOT_AVAILABLE_ERROR) { @@ -835,7 +836,9 @@ frame_unwind_pc (struct frame_info *this_frame) else throw_exception (ex); } - else + END_CATCH + + if (pc_p) { this_frame->prev_pc.value = pc; this_frame->prev_pc.status = CC_VALUE; @@ -1963,14 +1966,13 @@ get_prev_frame_always_1 (struct frame_info *this_frame) struct frame_info * get_prev_frame_always (struct frame_info *this_frame) { - volatile struct gdb_exception ex; struct frame_info *prev_frame = NULL; - TRY_CATCH (ex, RETURN_MASK_ERROR) + TRY { prev_frame = get_prev_frame_always_1 (this_frame); } - if (ex.reason < 0) + CATCH (ex, RETURN_MASK_ERROR) { if (ex.error == MEMORY_ERROR) { @@ -1994,6 +1996,7 @@ get_prev_frame_always (struct frame_info *this_frame) else throw_exception (ex); } + END_CATCH return prev_frame; } @@ -2222,21 +2225,21 @@ get_frame_pc (struct frame_info *frame) int get_frame_pc_if_available (struct frame_info *frame, CORE_ADDR *pc) { - volatile struct gdb_exception ex; gdb_assert (frame->next != NULL); - TRY_CATCH (ex, RETURN_MASK_ERROR) + TRY { *pc = frame_unwind_pc (frame->next); } - if (ex.reason < 0) + CATCH (ex, RETURN_MASK_ERROR) { if (ex.error == NOT_AVAILABLE_ERROR) return 0; else throw_exception (ex); } + END_CATCH return 1; } @@ -2307,18 +2310,18 @@ int get_frame_address_in_block_if_available (struct frame_info *this_frame, CORE_ADDR *pc) { - volatile struct gdb_exception ex; - TRY_CATCH (ex, RETURN_MASK_ERROR) + TRY { *pc = get_frame_address_in_block (this_frame); } - if (ex.reason < 0) + CATCH (ex, RETURN_MASK_ERROR) { if (ex.error == NOT_AVAILABLE_ERROR) return 0; throw_exception (ex); } + END_CATCH return 1; } |