From d0c9791728caa0d3b3270a997c7fd97919976c97 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 07:52:09 -0700 Subject: 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 --- gdb/m2-valprint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/m2-valprint.c') diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c index e4335c1..c718798 100644 --- a/gdb/m2-valprint.c +++ b/gdb/m2-valprint.c @@ -164,7 +164,7 @@ m2_print_unbounded_array (struct value *value, LONGEST len; struct value *val; - struct type *type = check_typedef (value_type (value)); + struct type *type = check_typedef (value->type ()); const gdb_byte *valaddr = value_contents_for_printing (value).data (); addr = unpack_pointer (type->field (0).type (), @@ -260,7 +260,7 @@ m2_print_array_contents (struct value *val, const struct value_print_options *options, int len) { - struct type *type = check_typedef (value_type (val)); + struct type *type = check_typedef (val->type ()); if (type->length () > 0) { @@ -308,7 +308,7 @@ m2_language::value_print_inner (struct value *val, struct ui_file *stream, const gdb_byte *valaddr = value_contents_for_printing (val).data (); const CORE_ADDR address = value_address (val); - struct type *type = check_typedef (value_type (val)); + struct type *type = check_typedef (val->type ()); switch (type->code ()) { case TYPE_CODE_ARRAY: -- cgit v1.1