diff options
author | Joel Brobecker <brobecker@adacore.com> | 2020-11-23 21:48:23 -0500 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2020-11-23 21:48:23 -0500 |
commit | d19937a74c51872e8bbff6e37d9b89b202519b07 (patch) | |
tree | a71a396d5b956b873682cf8829db491886c1fed3 /gdb/value.c | |
parent | 2a12c336b9d55189780846324eda98c66d543de7 (diff) | |
download | fsf-binutils-gdb-d19937a74c51872e8bbff6e37d9b89b202519b07.zip fsf-binutils-gdb-d19937a74c51872e8bbff6e37d9b89b202519b07.tar.gz fsf-binutils-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/value.c')
-rw-r--r-- | gdb/value.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/value.c b/gdb/value.c index a122674..f6c1a36 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 (); |