{
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
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)
{
else
throw_exception (ex);
}
- else
+ END_CATCH
+
+ if (pc_p)
{
this_frame->prev_pc.value = pc;
this_frame->prev_pc.status = CC_VALUE;
selected_frame = fi;
/* NOTE: cagney/2002-05-04: FI can be NULL. This occurs when the
frame is being invalidated. */
- if (deprecated_selected_frame_level_changed_hook)
- deprecated_selected_frame_level_changed_hook (frame_relative_level (fi));
/* FIXME: kseitz/2002-08-28: It would be nice to call
selected_frame_level_changed_event() right here, but due to limitations
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)
{
else
throw_exception (ex);
}
+ END_CATCH
return prev_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;
}
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;
}