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>
This commit is contained in:
Tom Tromey
2023-01-31 07:52:09 -07:00
parent 7cf57bc5be
commit d0c9791728
107 changed files with 880 additions and 884 deletions

View File

@ -206,10 +206,10 @@ mi_should_print (struct symbol *sym, enum mi_print_types type)
static void
py_print_type (struct ui_out *out, struct value *val)
{
check_typedef (value_type (val));
check_typedef (val->type ());
string_file stb;
type_print (value_type (val), "", &stb, -1);
type_print (val->type (), "", &stb, -1);
out->field_stream ("type", stb);
}
@ -235,7 +235,7 @@ py_print_value (struct ui_out *out, struct value *val,
if (args_type == MI_PRINT_SIMPLE_VALUES
|| args_type == MI_PRINT_ALL_VALUES)
{
struct type *type = check_typedef (value_type (val));
struct type *type = check_typedef (val->type ());
if (args_type == MI_PRINT_ALL_VALUES)
should_print = 1;
@ -378,7 +378,7 @@ py_print_single_arg (struct ui_out *out,
py_print_type (out, val);
if (val != NULL)
annotate_arg_value (value_type (val));
annotate_arg_value (val->type ());
/* If the output is to the CLI, and the user option "set print
frame-arguments" is set to none, just output "...". */