mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
2004-11-12 Andrew Cagney <cagney@gnu.org>
Merge VALUE_REGNO and VALUE_FRAME_REGNUM into VALUE_REGNUM. * value.h (VALUE_REGNO, VALUE_FRAME_REGNUM): Delete. (VALUE_REGNUM): Define. (struct value): Delete location.regnum, rename "regno" to "regnum". * value.c, valops.c, valarith.c, findvar.c: Update.
This commit is contained in:
parent
b88f0b484e
commit
9ee8fc9d71
@ -1,5 +1,12 @@
|
||||
2004-11-12 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
Merge VALUE_REGNO and VALUE_FRAME_REGNUM into VALUE_REGNUM.
|
||||
* value.h (VALUE_REGNO, VALUE_FRAME_REGNUM): Delete.
|
||||
(VALUE_REGNUM): Define.
|
||||
(struct value): Delete location.regnum, rename "regno" to
|
||||
"regnum".
|
||||
* value.c, valops.c, valarith.c, findvar.c: Update.
|
||||
|
||||
* value.h (VALUE_TYPE, VALUE_NEXT, VALUE_OFFSET, VALUE_BITSIZE)
|
||||
(VALUE_BITPOS): Delete.
|
||||
(value_type, value_offset, value_bitsize, value_bitpos): Declare.
|
||||
|
@ -286,7 +286,7 @@ value_of_register (int regnum, struct frame_info *frame)
|
||||
register_size (current_gdbarch, regnum));
|
||||
VALUE_LVAL (reg_val) = lval;
|
||||
VALUE_ADDRESS (reg_val) = addr;
|
||||
VALUE_REGNO (reg_val) = regnum;
|
||||
VALUE_REGNUM (reg_val) = regnum;
|
||||
VALUE_OPTIMIZED_OUT (reg_val) = optim;
|
||||
return reg_val;
|
||||
}
|
||||
@ -622,7 +622,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
|
||||
We'll just attribute the value to the original register. */
|
||||
VALUE_LVAL (v) = lval_register;
|
||||
VALUE_ADDRESS (v) = regnum;
|
||||
VALUE_REGNO (v) = regnum;
|
||||
VALUE_REGNUM (v) = regnum;
|
||||
}
|
||||
else if (CONVERT_REGISTER_P (regnum, type))
|
||||
{
|
||||
@ -636,7 +636,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
|
||||
REGISTER_TO_VALUE (frame, regnum, type, VALUE_CONTENTS_RAW (v));
|
||||
VALUE_LVAL (v) = lval_reg_frame_relative;
|
||||
VALUE_FRAME_ID (v) = get_frame_id (frame);
|
||||
VALUE_FRAME_REGNUM (v) = regnum;
|
||||
VALUE_REGNUM (v) = regnum;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -696,7 +696,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
|
||||
{
|
||||
VALUE_LVAL (v) = lval_reg_frame_relative;
|
||||
VALUE_FRAME_ID (v) = get_frame_id (frame);
|
||||
VALUE_FRAME_REGNUM (v) = regnum;
|
||||
VALUE_REGNUM (v) = regnum;
|
||||
}
|
||||
else if (mem_stor)
|
||||
{
|
||||
@ -707,7 +707,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
|
||||
{
|
||||
VALUE_LVAL (v) = lval_register;
|
||||
VALUE_ADDRESS (v) = first_addr;
|
||||
VALUE_REGNO (v) = first_realnum;
|
||||
VALUE_REGNUM (v) = first_realnum;
|
||||
}
|
||||
else
|
||||
internal_error (__FILE__, __LINE__,
|
||||
@ -764,21 +764,21 @@ locate_var_value (struct symbol *var, struct frame_info *frame)
|
||||
switch (VALUE_LVAL (lazy_value))
|
||||
{
|
||||
case lval_register:
|
||||
gdb_assert (REGISTER_NAME (VALUE_REGNO (lazy_value)) != NULL
|
||||
&& *REGISTER_NAME (VALUE_REGNO (lazy_value)) != '\0');
|
||||
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 register $%s",
|
||||
SYMBOL_PRINT_NAME (var),
|
||||
REGISTER_NAME (VALUE_REGNO (lazy_value)));
|
||||
REGISTER_NAME (VALUE_REGNUM (lazy_value)));
|
||||
break;
|
||||
|
||||
case lval_reg_frame_relative:
|
||||
gdb_assert (REGISTER_NAME (VALUE_FRAME_REGNUM (lazy_value)) != NULL
|
||||
&& *REGISTER_NAME (VALUE_FRAME_REGNUM (lazy_value)) != '\0');
|
||||
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_FRAME_REGNUM (lazy_value)));
|
||||
REGISTER_NAME (VALUE_REGNUM (lazy_value)));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -277,7 +277,7 @@ value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound
|
||||
else
|
||||
VALUE_LVAL (v) = VALUE_LVAL (array);
|
||||
VALUE_ADDRESS (v) = VALUE_ADDRESS (array);
|
||||
VALUE_REGNO (v) = VALUE_REGNO (array);
|
||||
VALUE_REGNUM (v) = VALUE_REGNUM (array);
|
||||
v->offset = value_offset (array) + elt_offs;
|
||||
return v;
|
||||
}
|
||||
|
@ -606,23 +606,23 @@ value_assign (struct value *toval, struct value *fromval)
|
||||
if (VALUE_LVAL (toval) == lval_register)
|
||||
{
|
||||
frame = get_current_frame ();
|
||||
value_reg = VALUE_REGNO (toval);
|
||||
value_reg = VALUE_REGNUM (toval);
|
||||
}
|
||||
else
|
||||
{
|
||||
frame = frame_find_by_id (VALUE_FRAME_ID (toval));
|
||||
value_reg = VALUE_FRAME_REGNUM (toval);
|
||||
value_reg = VALUE_REGNUM (toval);
|
||||
}
|
||||
|
||||
if (!frame)
|
||||
error ("Value being assigned to is no longer active.");
|
||||
|
||||
if (VALUE_LVAL (toval) == lval_reg_frame_relative
|
||||
&& CONVERT_REGISTER_P (VALUE_FRAME_REGNUM (toval), type))
|
||||
&& CONVERT_REGISTER_P (VALUE_REGNUM (toval), type))
|
||||
{
|
||||
/* If TOVAL is a special machine register requiring
|
||||
conversion of program values to a special raw format. */
|
||||
VALUE_TO_REGISTER (frame, VALUE_FRAME_REGNUM (toval),
|
||||
VALUE_TO_REGISTER (frame, VALUE_REGNUM (toval),
|
||||
type, VALUE_CONTENTS (fromval));
|
||||
}
|
||||
else
|
||||
|
@ -94,7 +94,7 @@ allocate_value (struct type *type)
|
||||
val->offset = 0;
|
||||
val->bitpos = 0;
|
||||
val->bitsize = 0;
|
||||
VALUE_REGNO (val) = -1;
|
||||
VALUE_REGNUM (val) = -1;
|
||||
VALUE_LAZY (val) = 0;
|
||||
VALUE_OPTIMIZED_OUT (val) = 0;
|
||||
VALUE_EMBEDDED_OFFSET (val) = 0;
|
||||
@ -248,7 +248,7 @@ value_copy (struct value *arg)
|
||||
val->bitpos = arg->bitpos;
|
||||
val->bitsize = arg->bitsize;
|
||||
VALUE_FRAME_ID (val) = VALUE_FRAME_ID (arg);
|
||||
VALUE_REGNO (val) = VALUE_REGNO (arg);
|
||||
VALUE_REGNUM (val) = VALUE_REGNUM (arg);
|
||||
VALUE_LAZY (val) = VALUE_LAZY (arg);
|
||||
VALUE_OPTIMIZED_OUT (val) = VALUE_OPTIMIZED_OUT (arg);
|
||||
VALUE_EMBEDDED_OFFSET (val) = VALUE_EMBEDDED_OFFSET (arg);
|
||||
@ -963,7 +963,7 @@ value_primitive_field (struct value *arg1, int offset,
|
||||
if (VALUE_LVAL (arg1) == lval_internalvar)
|
||||
VALUE_LVAL (v) = lval_internalvar_component;
|
||||
VALUE_ADDRESS (v) = VALUE_ADDRESS (arg1);
|
||||
VALUE_REGNO (v) = VALUE_REGNO (arg1);
|
||||
VALUE_REGNUM (v) = VALUE_REGNUM (arg1);
|
||||
/* VALUE_OFFSET (v) = VALUE_OFFSET (arg1) + offset
|
||||
+ TYPE_FIELD_BITPOS (arg_type, fieldno) / 8; */
|
||||
return v;
|
||||
|
@ -58,9 +58,6 @@ struct value
|
||||
|
||||
/* Pointer to internal variable. */
|
||||
struct internalvar *internalvar;
|
||||
|
||||
/* Number of register. Only used with lval_reg_frame_relative. */
|
||||
int regnum;
|
||||
} location;
|
||||
|
||||
/* Describes offset of a value within lval of a structure in bytes.
|
||||
@ -139,7 +136,7 @@ struct value
|
||||
struct value *next;
|
||||
|
||||
/* Register number if the value is from a register. */
|
||||
short regno;
|
||||
short regnum;
|
||||
|
||||
/* If zero, contents of this value are in the contents field. If
|
||||
nonzero, contents are in inferior memory at address in the
|
||||
@ -218,9 +215,8 @@ extern int value_fetch_lazy (struct value *val);
|
||||
#define VALUE_LVAL(val) (val)->lval
|
||||
#define VALUE_ADDRESS(val) (val)->location.address
|
||||
#define VALUE_INTERNALVAR(val) (val)->location.internalvar
|
||||
#define VALUE_FRAME_REGNUM(val) ((val)->location.regnum)
|
||||
#define VALUE_FRAME_ID(val) ((val)->frame_id)
|
||||
#define VALUE_REGNO(val) (val)->regno
|
||||
#define VALUE_REGNUM(val) (val)->regnum
|
||||
#define VALUE_OPTIMIZED_OUT(val) ((val)->optimized_out)
|
||||
#define VALUE_EMBEDDED_OFFSET(val) ((val)->embedded_offset)
|
||||
#define VALUE_POINTED_TO_OFFSET(val) ((val)->pointed_to_offset)
|
||||
|
Loading…
Reference in New Issue
Block a user