aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2020-11-23 21:49:13 -0500
committerJoel Brobecker <brobecker@adacore.com>2020-11-23 21:49:13 -0500
commite6fcee3a73ddab55e3b35b7705b01035383e5417 (patch)
tree38ef476f6ba4c32b607fefa0b189cca54ff667a3 /gdb/valprint.c
parentd19937a74c51872e8bbff6e37d9b89b202519b07 (diff)
downloadgdb-e6fcee3a73ddab55e3b35b7705b01035383e5417.zip
gdb-e6fcee3a73ddab55e3b35b7705b01035383e5417.tar.gz
gdb-e6fcee3a73ddab55e3b35b7705b01035383e5417.tar.bz2
Make function fixed_point_scaling_factor a method of struct type
This logically connects this function to the object it inspects. gdb/ChangeLog: * gdbtypes.h (struct type) <fixed_point_scaling_factor>: New method, replacing fixed_point_scaling_factor. All callers updated throughout this project. (fixed_point_scaling_factor): Delete declaration. * gdbtypes.c (type::fixed_point_scaling_factor): Replaces fixed_point_scaling_factor. 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 6e9262e..50278ac 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -811,7 +811,7 @@ generic_val_print_fixed_point (struct value *val, struct ui_file *stream,
f.read_fixed_point (gdb::make_array_view (valaddr, TYPE_LENGTH (type)),
type_byte_order (type), type->is_unsigned (),
- fixed_point_scaling_factor (type));
+ type->fixed_point_scaling_factor ());
const char *fmt = TYPE_LENGTH (type) < 4 ? "%.11Fg" : "%.17Fg";
std::string str = gmp_string_printf (fmt, f.val);