summaryrefslogtreecommitdiff
path: root/gdb/value.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/value.c
parent2a12c336b9d55189780846324eda98c66d543de7 (diff)
downloadbinutils-gdb-d19937a74c51872e8bbff6e37d9b89b202519b07.tar.gz
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/value.c')
-rw-r--r--gdb/value.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/value.c b/gdb/value.c
index a1226749eb9..f6c1a36ac0f 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -2759,7 +2759,7 @@ LONGEST
unpack_long (struct type *type, const gdb_byte *valaddr)
{
if (is_fixed_point_type (type))
- type = fixed_point_type_base_type (type);
+ type = type->fixed_point_type_base_type ();
enum bfd_endian byte_order = type_byte_order (type);
enum type_code code = type->code ();