gdb_assert (regnum < gdbarch_num_cooked_regs (gdbarch));
gdb_assert (next_frame != nullptr);
- /* In some cases NEXT_FRAME may not have a valid frame-id yet. This can
- happen if we end up trying to unwind a register as part of the frame
- sniffer. The only time that we get here without a valid frame-id is
- if NEXT_FRAME is an inline frame. If this is the case then we can
- avoid getting into trouble here by skipping past the inline frames. */
- while (get_frame_type (next_frame) == INLINE_FRAME)
- next_frame = get_next_frame_sentinel_okay (next_frame);
-
- /* We should have a valid next frame. */
- gdb_assert (frame_id_p (get_frame_id (next_frame)));
-
return value::allocate_register_lazy (next_frame, regnum);
}
default_value_from_register (gdbarch *gdbarch, type *type, int regnum,
const frame_info_ptr &this_frame)
{
- frame_info_ptr next_frame = get_next_frame_sentinel_okay (this_frame);
- while (get_frame_type (next_frame) == INLINE_FRAME)
- next_frame = get_next_frame_sentinel_okay (next_frame);
-
- value *value = value::allocate_register (next_frame, regnum, type);
+ value *value
+ = value::allocate_register (get_next_frame_sentinel_okay (this_frame),
+ regnum, type);
/* Any structure stored in more than one register will always be
an integral number of registers. Otherwise, you need to do
fpr to vsr. */
regnum = ieee_128_float_regnum_adjust (gdbarch, type, regnum);
- frame_info_ptr next_frame = get_next_frame_sentinel_okay (this_frame);
- while (get_frame_type (next_frame) == INLINE_FRAME)
- next_frame = get_next_frame_sentinel_okay (next_frame);
-
value *value
- = value::allocate_register (next_frame, regnum, type);
+ = value::allocate_register (get_next_frame_sentinel_okay (this_frame),
+ regnum, type);
/* Any structure stored in more than one register will always be
an integral number of registers. Otherwise, you need to do
result->set_lval (lval_register);
result->m_location.reg.regnum = regnum;
+
+ /* If this register value is created during unwind (while computing a frame
+ id), and NEXT_FRAME is a frame inlined in the frame being unwound, then
+ NEXT_FRAME will not have a valid frame id yet. Find the next non-inline
+ frame (possibly the sentinel frame). This is where registers are unwound
+ from anyway. */
+ while (get_frame_type (next_frame) == INLINE_FRAME)
+ next_frame = get_next_frame_sentinel_okay (next_frame);
+
result->m_location.reg.next_frame_id = get_frame_id (next_frame);
+ /* We should have a next frame with a valid id. */
+ gdb_assert (frame_id_p (result->m_location.reg.next_frame_id));
+
return result;
}
{
/* Register number. */
int regnum;
- /* Frame ID of "next" frame to which a register value is relative.
- If the register value is found relative to frame F, then the
- frame id of F->next will be stored in next_frame_id. */
- struct frame_id next_frame_id;
+
+ /* Frame ID of the next physical (non-inline) frame to which a register
+ value is relative. */
+ frame_id next_frame_id;
} reg;
/* Pointer to internal variable. */