{
struct value *v = allocate_value (type);
if (valaddr == NULL)
- VALUE_LAZY (v) = 1;
+ set_value_lazy (v, 1);
else
memcpy (value_contents_raw (v), valaddr, TYPE_LENGTH (type));
VALUE_ADDRESS (v) = address;
result = allocate_value (type);
VALUE_LVAL (result) = VALUE_LVAL (val);
- result->bitsize = value_bitsize (val);
- result->bitpos = value_bitpos (val);
+ set_value_bitsize (result, value_bitsize (val));
+ set_value_bitpos (result, value_bitpos (val));
VALUE_ADDRESS (result) = VALUE_ADDRESS (val) + value_offset (val);
if (value_lazy (val)
|| TYPE_LENGTH (type) > TYPE_LENGTH (value_type (val)))
- VALUE_LAZY (result) = 1;
+ set_value_lazy (result, 1);
else
memcpy (value_contents_raw (result), value_contents (val),
TYPE_LENGTH (type));
struct value *mark = value_mark ();
struct value *dummy = value_from_longest (builtin_type_long, 0);
struct type *result;
- dummy->type = type;
+ deprecated_set_value_type (dummy, type);
result = ada_type_of_array (dummy, 0);
value_free_to_mark (mark);
return result;
if (VALUE_LVAL (obj) == lval_internalvar)
VALUE_LVAL (v) = lval_internalvar_component;
VALUE_ADDRESS (v) = VALUE_ADDRESS (obj) + value_offset (obj) + offset;
- v->bitpos = bit_offset + value_bitpos (obj);
- v->bitsize = bit_size;
+ set_value_bitpos (v, bit_offset + value_bitpos (obj));
+ set_value_bitsize (v, bit_size);
if (value_bitpos (v) >= HOST_CHAR_BIT)
{
VALUE_ADDRESS (v) += 1;
- v->bitpos -= HOST_CHAR_BIT;
+ set_value_bitpos (v, value_bitpos (v) - HOST_CHAR_BIT);
}
}
else
- v->bitsize = bit_size;
+ set_value_bitsize (v, bit_size);
unpacked = (unsigned char *) value_contents (v);
srcBitsLeft = bit_size;
struct type *type = value_type (toval);
int bits = value_bitsize (toval);
- if (!toval->modifiable)
+ if (!deprecated_value_modifiable (toval))
error (_("Left operand of assignment is not a modifiable lvalue."));
toval = coerce_ref (toval);
val = value_copy (toval);
memcpy (value_contents_raw (val), value_contents (fromval),
TYPE_LENGTH (type));
- val->type = type;
+ deprecated_set_value_type (val, type);
return val;
}
else if (is_enumeral
&& TYPE_NAME (SYMBOL_TYPE (syms[i].sym)) != NULL)
{
- printf_unfiltered ("[%d] ", i + first_choice);
+ printf_unfiltered (("[%d] "), i + first_choice);
ada_print_type (SYMBOL_TYPE (syms[i].sym), NULL,
gdb_stdout, -1, 0);
printf_unfiltered (_("'(%s) (enumeral)\n"),
if (prompt == NULL)
prompt = ">";
- printf_unfiltered ("%s ", prompt);
+ printf_unfiltered (("%s "), prompt);
gdb_flush (gdb_stdout);
args = command_line_input ((char *) NULL, 0, annotation_suffix);
|| TYPE_LENGTH (TYPE_TARGET_TYPE (type2))
!= TYPE_LENGTH (TYPE_TARGET_TYPE (type2)))
error (_("Incompatible types in assignment"));
- val->type = type;
+ deprecated_set_value_type (val, type);
}
return val;
}
if (err_msg == NULL)
return 0;
else
- error ("%s", err_msg);
+ error (("%s"), err_msg);
}
return value_of_variable (syms[0].sym, syms[0].block);