aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2020-11-23 21:48:23 -0500
committerJoel Brobecker <brobecker@adacore.com>2020-11-23 21:48:23 -0500
commitd19937a74c51872e8bbff6e37d9b89b202519b07 (patch)
treea71a396d5b956b873682cf8829db491886c1fed3 /gdb/valprint.c
parent2a12c336b9d55189780846324eda98c66d543de7 (diff)
downloadgdb-d19937a74c51872e8bbff6e37d9b89b202519b07.zip
gdb-d19937a74c51872e8bbff6e37d9b89b202519b07.tar.gz
gdb-d19937a74c51872e8bbff6e37d9b89b202519b07.tar.bz2
Make fixed_point_type_base_type a method of struct type
As suggested by Simon, to logically connect this function to the object it inspects. Note that, logically, this method should be "const". Unfortunately, the implementation iterates on struct type objects starting with "this", and thus trying to declare the method "const" triggers a compilation error. gdb/ChangeLog: * gdbtypes.h (struct type) <fixed_point_type_base_type> New method, replacing the fixed_point_type_base_type function. All callers updated throughout this project. (fixed_point_type_base_type): Remove declaration. * gdbtypes.c (type::fixed_point_type_base_type): Replaces fixed_point_type_base_type. Adjust implementation accordingly.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index f428eb5..6e9262e 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -871,7 +871,7 @@ generic_value_print (struct value *val, struct ui_file *stream, int recurse,
type = check_typedef (type);
if (is_fixed_point_type (type))
- type = fixed_point_type_base_type (type);
+ type = type->fixed_point_type_base_type ();
switch (type->code ())
{