Throw exceptions from rs6000 unwinder
gdb:
2017-07-21 Yao Qi <yao.qi@linaro.org>
* rs6000-tdep.c (struct rs6000_frame_cache) <base_p>: Remove.
(rs6000_frame_cache): Don't catch exceptions.
(rs6000_frame_this_id): Don't check info->base_p.
(rs6000_epilogue_frame_this_id): Likewise.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index a5b7091..9b30c55 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -3276,10 +3276,6 @@
CORE_ADDR initial_sp;
struct trad_frame_saved_reg *saved_regs;
- /* Set BASE_P to true if this frame cache is properly initialized.
- Otherwise set to false because some registers or memory cannot
- collected. */
- int base_p;
/* Cache PC for building unavailable frame. */
CORE_ADDR pc;
};
@@ -3302,30 +3298,20 @@
cache->pc = 0;
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
- TRY
- {
- func = get_frame_func (this_frame);
- cache->pc = func;
- pc = get_frame_pc (this_frame);
- skip_prologue (gdbarch, func, pc, &fdata);
+ func = get_frame_func (this_frame);
+ cache->pc = func;
+ pc = get_frame_pc (this_frame);
+ skip_prologue (gdbarch, func, pc, &fdata);
- /* Figure out the parent's stack pointer. */
+ /* Figure out the parent's stack pointer. */
- /* NOTE: cagney/2002-04-14: The ->frame points to the inner-most
- address of the current frame. Things might be easier if the
- ->frame pointed to the outer-most address of the frame. In
- the mean time, the address of the prev frame is used as the
- base address of this frame. */
- cache->base = get_frame_register_unsigned
- (this_frame, gdbarch_sp_regnum (gdbarch));
- }
- CATCH (ex, RETURN_MASK_ERROR)
- {
- if (ex.error != NOT_AVAILABLE_ERROR)
- throw_exception (ex);
- return (struct rs6000_frame_cache *) (*this_cache);
- }
- END_CATCH
+ /* NOTE: cagney/2002-04-14: The ->frame points to the inner-most
+ address of the current frame. Things might be easier if the
+ ->frame pointed to the outer-most address of the frame. In
+ the mean time, the address of the prev frame is used as the
+ base address of this frame. */
+ cache->base = get_frame_register_unsigned
+ (this_frame, gdbarch_sp_regnum (gdbarch));
/* If the function appears to be frameless, check a couple of likely
indicators that we have simply failed to find the frame setup.
@@ -3474,7 +3460,6 @@
cache->initial_sp
= get_frame_register_unsigned (this_frame, fdata.alloca_reg);
- cache->base_p = 1;
return cache;
}
@@ -3485,12 +3470,6 @@
struct rs6000_frame_cache *info = rs6000_frame_cache (this_frame,
this_cache);
- if (!info->base_p)
- {
- (*this_id) = frame_id_build_unavailable_stack (info->pc);
- return;
- }
-
/* This marks the outermost frame. */
if (info->base == 0)
return;
@@ -3571,10 +3550,7 @@
rs6000_epilogue_frame_cache (this_frame, this_cache);
pc = get_frame_func (this_frame);
- if (info->base == 0)
- (*this_id) = frame_id_build_unavailable_stack (pc);
- else
- (*this_id) = frame_id_build (info->base, pc);
+ (*this_id) = frame_id_build (info->base, pc);
}
/* Implementation of frame_unwind.prev_register, as defined in frame_unwind.h.