diff options
author | Anton Gorenkov <xgsa@sourceware.org> | 2012-02-21 13:48:59 +0000 |
---|---|---|
committer | Anton Gorenkov <xgsa@sourceware.org> | 2012-02-21 13:48:59 +0000 |
commit | dfcee124897d3395925bdfbfded468c9c81394a0 (patch) | |
tree | ff8b1acd9e1b0763ff5edff8183a73fbc997643e /gdb/value.h | |
parent | 16a87420985f256b5cde070586ebcdfda2225b01 (diff) | |
download | gdb-dfcee124897d3395925bdfbfded468c9c81394a0.zip gdb-dfcee124897d3395925bdfbfded468c9c81394a0.tar.gz gdb-dfcee124897d3395925bdfbfded468c9c81394a0.tar.bz2 |
gdb/
* c-valprint.c (c_value_print): Use value_rtti_indirect_type
instead of value_rtti_target_type.
* eval.c (evaluate_subexp_standard): Use value_rtti_indirect_type
instead of value_rtti_target_type.
* typeprint.c (whatis_exp): Use value_rtti_indirect_type instead of
value_rtti_target_type.
* valops.c (value_ind): Extract function readjust_indirect_value_type.
(value_rtti_target_type): Rename to ...
(value_rtti_indirect_type): ... here and make it indirect. Update
function comment.
* value.c (readjust_indirect_value_type): New function.
(coerce_ref): Support for enclosing type setting for references
with readjust_indirect_value_type.
* value.h (readjust_value_type): New declaration.
(value_rtti_target_type): Rename to ...
(value_rtti_indirect_type): ... here.
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gdb/value.h b/gdb/value.h index 2a2274d..d4c4a83 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -351,6 +351,19 @@ extern short *deprecated_value_regnum_hack (struct value *); extern struct value *coerce_ref_if_computed (const struct value *arg); +/* Setup a new value type and enclosing value type for dereferenced value VALUE. + ENC_TYPE is the new enclosing type that should be set. ORIGINAL_TYPE and + ORIGINAL_VAL are the type and value of the original reference or pointer. + + Note, that VALUE is modified by this function. + + It is a common implementation for coerce_ref and value_ind. */ + +extern struct value * readjust_indirect_value_type (struct value *value, + struct type *enc_type, + struct type *original_type, + struct value *original_val); + /* Convert a REF to the object referenced. */ extern struct value *coerce_ref (struct value *value); @@ -615,8 +628,8 @@ extern struct value *value_primitive_field (struct value *arg1, int offset, struct type *arg_type); -extern struct type *value_rtti_target_type (struct value *, int *, int *, - int *); +extern struct type *value_rtti_indirect_type (struct value *, int *, int *, + int *); extern struct value *value_full_object (struct value *, struct type *, int, int, int); |