aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 07:52:09 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:06 -0700
commitd0c9791728caa0d3b3270a997c7fd97919976c97 (patch)
tree1753b7232efa89e05696d4289d60ad019fc161e4 /gdb/mi
parent7cf57bc5be656c62cc6b80280a9eddad2b8ded3f (diff)
downloadgdb-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/mi')
-rw-r--r--gdb/mi/mi-cmd-stack.c4
-rw-r--r--gdb/mi/mi-main.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 4666808..0ac4d6a 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -505,10 +505,10 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
/* A scalar object that does not have all bits available is
also considered unavailable, because all bits contribute
to its representation. */
- || (val_print_scalar_type_p (value_type (arg->val))
+ || (val_print_scalar_type_p (arg->val->type ())
&& !value_bytes_available (arg->val,
value_embedded_offset (arg->val),
- value_type (arg->val)->length ()))))
+ arg->val->type ()->length ()))))
return;
gdb::optional<ui_out_emit_tuple> tuple_emitter;
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index e0cade2..6098724 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -2474,8 +2474,8 @@ print_variable_or_computed (const char *expression, enum print_values values)
switch (values)
{
case PRINT_SIMPLE_VALUES:
- type = check_typedef (value_type (val));
- type_print (value_type (val), "", &stb, -1);
+ type = check_typedef (val->type ());
+ type_print (val->type (), "", &stb, -1);
uiout->field_stream ("type", stb);
if (type->code () != TYPE_CODE_ARRAY
&& type->code () != TYPE_CODE_STRUCT