aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-07 23:51:03 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-07 23:51:03 +0000
commit046245839052222161e5cb1233a0f4ca55cfffba (patch)
tree5f03d8e8715954687d0c45b965b47cf1e4e01595 /gdb/valops.c
parent55bc2f369cdb7533c18144abed052fce62e66000 (diff)
downloadgdb-046245839052222161e5cb1233a0f4ca55cfffba.zip
gdb-046245839052222161e5cb1233a0f4ca55cfffba.tar.gz
gdb-046245839052222161e5cb1233a0f4ca55cfffba.tar.bz2
2005-02-07 Andrew Cagney <cagney@gnu.org>
* value.h (deprecated_set_value_type): Declare. * value.c (deprecated_set_value_type): Define. * hpacc-abi.c, gnu-v2-abi.c, cp-valprint.c: Update. * c-valprint.c, jv-lang.c, objc-lang.c, ada-lang.c: Update. * infcall.c, printcmd.c, valops.c, eval.c, p-exp.y: Update. * ax-gdb.c, tracepoint.c: Update.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 942ef16..56e4645 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -240,8 +240,8 @@ value_cast (struct type *type, struct value *arg2)
TYPE_TARGET_TYPE (range_type),
low_bound,
new_length + low_bound - 1);
- arg2->type = create_array_type ((struct type *) NULL,
- element_type, range_type);
+ deprecated_set_value_type (arg2, create_array_type ((struct type *) NULL,
+ element_type, range_type));
return arg2;
}
}
@@ -282,7 +282,7 @@ value_cast (struct type *type, struct value *arg2)
arg2, 0, type2, 1);
if (v)
{
- v->type = type;
+ deprecated_set_value_type (v, type);
return v;
}
}
@@ -380,7 +380,7 @@ value_cast (struct type *type, struct value *arg2)
if (v)
{
v = value_addr (v);
- v->type = type;
+ deprecated_set_value_type (v, type);
return v;
}
}
@@ -405,7 +405,7 @@ value_cast (struct type *type, struct value *arg2)
}
/* No superclass found, just fall through to change ptr type. */
}
- arg2->type = type;
+ deprecated_set_value_type (arg2, type);
arg2 = value_change_enclosing_type (arg2, type);
set_value_pointed_to_offset (arg2, 0); /* pai: chk_val */
return arg2;
@@ -730,7 +730,7 @@ value_assign (struct value *toval, struct value *fromval)
val = value_copy (toval);
memcpy (value_contents_raw (val), value_contents (fromval),
TYPE_LENGTH (type));
- val->type = type;
+ deprecated_set_value_type (val, type);
val = value_change_enclosing_type (val, value_enclosing_type (fromval));
set_value_embedded_offset (val, value_embedded_offset (fromval));
set_value_pointed_to_offset (val, value_pointed_to_offset (fromval));
@@ -855,7 +855,7 @@ value_addr (struct value *arg1)
We keep the same location information, which is efficient,
and allows &(&X) to get the location containing the reference. */
arg2 = value_copy (arg1);
- arg2->type = lookup_pointer_type (TYPE_TARGET_TYPE (type));
+ deprecated_set_value_type (arg2, lookup_pointer_type (TYPE_TARGET_TYPE (type)));
return arg2;
}
if (TYPE_CODE (type) == TYPE_CODE_FUNC)
@@ -911,7 +911,7 @@ value_ind (struct value *arg1)
arg2 = value_at_lazy (enc_type, (value_as_address (arg1)
- value_pointed_to_offset (arg1)));
/* Re-adjust type */
- arg2->type = TYPE_TARGET_TYPE (base_type);
+ deprecated_set_value_type (arg2, TYPE_TARGET_TYPE (base_type));
/* Add embedding info */
arg2 = value_change_enclosing_type (arg2, enc_type);
set_value_embedded_offset (arg2, value_pointed_to_offset (arg1));
@@ -2625,7 +2625,7 @@ value_full_object (struct value *argp, struct type *rtype, int xfull, int xtop,
used for its computation. */
new_val = value_at_lazy (real_type, VALUE_ADDRESS (argp) - top +
(using_enc ? 0 : value_embedded_offset (argp)));
- new_val->type = value_type (argp);
+ deprecated_set_value_type (new_val, value_type (argp));
set_value_embedded_offset (new_val, (using_enc
? top + value_embedded_offset (argp)
: top));