diff options
Diffstat (limited to 'gdb/ada-valprint.c')
-rw-r--r-- | gdb/ada-valprint.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 8af9ef0..0d5b6d7 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -741,22 +741,10 @@ ada_value_print_num (struct value *val, struct ui_file *stream, int recurse, struct type *type = ada_check_typedef (value_type (val)); const gdb_byte *valaddr = value_contents_for_printing (val); - if (ada_is_gnat_encoded_fixed_point_type (type)) - { - struct value *scale = gnat_encoded_fixed_point_scaling_factor (type); - val = value_cast (value_type (scale), val); - val = value_binop (val, scale, BINOP_MUL); - - const char *fmt = TYPE_LENGTH (type) < 4 ? "%.11g" : "%.17g"; - std::string str - = target_float_to_string (value_contents (val), value_type (val), fmt); - fputs_filtered (str.c_str (), stream); - return; - } - else if (type->code () == TYPE_CODE_RANGE - && (TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_ENUM - || TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_BOOL - || TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_CHAR)) + if (type->code () == TYPE_CODE_RANGE + && (TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_ENUM + || TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_BOOL + || TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_CHAR)) { /* For enum-valued ranges, we want to recurse, because we'll end up printing the constant's name rather than its numeric |