{
/* Not an lval. */
not_lval,
- /* In memory. Could be a saved register. */
+ /* In memory. */
lval_memory,
- /* In a register. */
+ /* In a register. Registers are relative to a frame. */
lval_register,
/* In a gdb internal variable. */
lval_internalvar,
/* Part of a gdb internal variable (structure field). */
- lval_internalvar_component,
- /* In a register series in a frame not the current one, which may have been
- partially saved or saved in different places (otherwise would be
- lval_register or lval_memory). */
- lval_reg_frame_relative
+ lval_internalvar_component
};
/* Control types for commands */
is that REGISTER_TO_VALUE populates the entire value
including the location. */
REGISTER_TO_VALUE (frame, regnum, type, VALUE_CONTENTS_RAW (v));
- VALUE_LVAL (v) = lval_reg_frame_relative;
+ VALUE_LVAL (v) = lval_register;
VALUE_FRAME_ID (v) = get_frame_id (frame);
VALUE_REGNUM (v) = regnum;
}
{
mem_stor++;
+ /* FIXME: cagney/2004-11-12: I think this is trying to
+ check that the stored registers are adjacent in
+ memory. It isn't doing a good job? */
mem_tracking = (mem_tracking
&& (regnum == local_regnum
|| addr == last_addr));
last_addr = addr;
}
- /* FIXME: cagney/2003-06-04: Shouldn't this always use
- lval_reg_frame_relative? If it doesn't and the register's
- location changes (say after a resume) then this value is
- going to have wrong information. */
- if ((reg_stor && mem_stor)
- || (mem_stor && !mem_tracking))
- /* Mixed storage; all of the hassle we just went through was
- for some good purpose. */
- {
- VALUE_LVAL (v) = lval_reg_frame_relative;
- VALUE_FRAME_ID (v) = get_frame_id (frame);
- VALUE_REGNUM (v) = regnum;
- }
- else if (mem_stor)
+ if (mem_tracking && mem_stor && !reg_stor)
{
VALUE_LVAL (v) = lval_memory;
VALUE_ADDRESS (v) = first_addr;
}
- else if (reg_stor)
+ else
{
VALUE_LVAL (v) = lval_register;
- VALUE_ADDRESS (v) = first_addr;
- VALUE_REGNUM (v) = first_realnum;
+ VALUE_FRAME_ID (v) = get_frame_id (frame);
+ VALUE_REGNUM (v) = regnum;
}
- else
- internal_error (__FILE__, __LINE__,
- "value_from_register: Value not stored anywhere!");
VALUE_OPTIMIZED_OUT (v) = optimized;
REGISTER_NAME (VALUE_REGNUM (lazy_value)));
break;
- case lval_reg_frame_relative:
- gdb_assert (REGISTER_NAME (VALUE_REGNUM (lazy_value)) != NULL
- && *REGISTER_NAME (VALUE_REGNUM (lazy_value)) != '\0');
- error("Address requested for identifier "
- "\"%s\" which is in frame register $%s",
- SYMBOL_PRINT_NAME (var),
- REGISTER_NAME (VALUE_REGNUM (lazy_value)));
- break;
-
default:
error ("Can't take address of \"%s\" which isn't an lvalue.",
SYMBOL_PRINT_NAME (var));
}
break;
- case lval_reg_frame_relative:
case lval_register:
{
struct frame_info *frame;
if (!frame)
error ("Value being assigned to is no longer active.");
- if (VALUE_LVAL (toval) == lval_reg_frame_relative
+ if (VALUE_LVAL (toval) == lval_register
&& CONVERT_REGISTER_P (VALUE_REGNUM (toval), type))
{
/* If TOVAL is a special machine register requiring
{
case lval_memory:
case lval_register:
- case lval_reg_frame_relative:
reinit_frame_cache ();
For BITS_BIG_ENDIAN=1 targets, it is the position of the MSB. */
int bitpos;
- /* Frame value is relative to. In practice, this ID is only used if
- the value is stored in several registers in other than the
- current frame, and these registers have not all been saved at the
- same place in memory. This will be described in the lval enum
- above as "lval_reg_frame_relative". */
+ /* Frame register value is relative to. This will be described in
+ the lval enum above as "lval_register". */
struct frame_id frame_id;
/* Type of the value. */