aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 10:19:10 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:07 -0700
commit463b870d01ae26aa3366e99fb86416b1c67f8061 (patch)
tree9d25835efdc8b9ccbc431c304d4b6e6cfefcff0a /gdb/c-valprint.c
parent4b53ca88831137e94a6882f224d755a2d32ab8ef (diff)
downloadgdb-463b870d01ae26aa3366e99fb86416b1c67f8061.zip
gdb-463b870d01ae26aa3366e99fb86416b1c67f8061.tar.gz
gdb-463b870d01ae26aa3366e99fb86416b1c67f8061.tar.bz2
Turn value_enclosing_type into method
This changes value_enclosing_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/c-valprint.c')
-rw-r--r--gdb/c-valprint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 8d28c45..0a9e4f4 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -571,18 +571,18 @@ c_value_print (struct value *val, struct ui_file *stream,
better to leave the object as-is. */
if (!(full
&& (real_type->length ()
- < value_enclosing_type (val)->length ())))
+ < val->enclosing_type ()->length ())))
val = value_cast (real_type, val);
gdb_printf (stream, "(%s%s) ",
real_type->name (),
full ? "" : _(" [incomplete object]"));
}
- else if (type != check_typedef (value_enclosing_type (val)))
+ else if (type != check_typedef (val->enclosing_type ()))
{
/* No RTTI information, so let's do our best. */
gdb_printf (stream, "(%s ?) ",
- value_enclosing_type (val)->name ());
- val = value_cast (value_enclosing_type (val), val);
+ val->enclosing_type ()->name ());
+ val = value_cast (val->enclosing_type (), val);
}
}