diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 07:52:09 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:06 -0700 |
commit | d0c9791728caa0d3b3270a997c7fd97919976c97 (patch) | |
tree | 1753b7232efa89e05696d4289d60ad019fc161e4 /gdb/ada-varobj.c | |
parent | 7cf57bc5be656c62cc6b80280a9eddad2b8ded3f (diff) | |
download | gdb-d0c9791728caa0d3b3270a997c7fd97919976c97.zip gdb-d0c9791728caa0d3b3270a997c7fd97919976c97.tar.gz gdb-d0c9791728caa0d3b3270a997c7fd97919976c97.tar.bz2 |
Turn value_type into method
This changes value_type to be a method of value. Much of this patch
was written by script.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/ada-varobj.c')
-rw-r--r-- | gdb/ada-varobj.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ada-varobj.c b/gdb/ada-varobj.c index 6b92b76..63e851e 100644 --- a/gdb/ada-varobj.c +++ b/gdb/ada-varobj.c @@ -66,7 +66,7 @@ ada_varobj_decode_var (struct value **value_ptr, struct type **type_ptr) *value_ptr = ada_get_decoded_value (*value_ptr); if (*value_ptr != nullptr) - *type_ptr = ada_check_typedef (value_type (*value_ptr)); + *type_ptr = ada_check_typedef ((*value_ptr)->type ()); else *type_ptr = ada_get_decoded_type (*type_ptr); } @@ -102,7 +102,7 @@ ada_varobj_struct_elt (struct value *parent_value, if (parent_value) { value = value_field (parent_value, fieldno); - type = value_type (value); + type = value->type (); } else type = parent_type->field (fieldno).type (); @@ -150,7 +150,7 @@ ada_varobj_ind (struct value *parent_value, if (parent_value) { value = ada_value_ind (parent_value); - type = value_type (value); + type = value->type (); } else type = parent_type->target_type (); @@ -181,7 +181,7 @@ ada_varobj_simple_array_elt (struct value *parent_value, value_from_longest (parent_type->index_type (), elt_index); value = ada_value_subscript (parent_value, 1, &index_value); - type = value_type (value); + type = value->type (); } else type = parent_type->target_type (); @@ -221,7 +221,7 @@ ada_varobj_adjust_for_child_access (struct value **value, if (*value != NULL && ada_is_tagged_type (*type, 1)) { *value = ada_tag_value_at_base_address (*value); - *type = value_type (*value); + *type = (*value)->type (); } } @@ -943,7 +943,7 @@ static bool ada_value_is_changeable_p (const struct varobj *var) { struct type *type = (var->value != nullptr - ? value_type (var->value.get ()) : var->type); + ? var->value.get ()->type () : var->type); if (type->code () == TYPE_CODE_REF) type = type->target_type (); |