diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-08-23 01:09:38 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-08-23 01:09:38 +0000 |
commit | 07b7ceffa0a12c68c61ffa54c1151fa5255b3b23 (patch) | |
tree | a9ad55839b10215ad934c1d9521abc4caa8b33e8 /gdb/gdbtypes.c | |
parent | 33e4e413f74ef7fb9b35239ce0bea02cf2b67a25 (diff) | |
download | gdb-07b7ceffa0a12c68c61ffa54c1151fa5255b3b23.tar.gz |
Add TYPE_FLOATFORMAT().
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index cfb5ffc4d25..5c9e6cf417b 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -2769,6 +2769,16 @@ recursive_dump_type (struct type *type, int spaces) print_cplus_stuff (type, spaces); break; + case TYPE_CODE_FLT: + printfi_filtered (spaces, "floatformat "); + if (TYPE_FLOATFORMAT (type) == NULL + || TYPE_FLOATFORMAT (type)->name == NULL) + puts_filtered ("(null)"); + else + puts_filtered (TYPE_FLOATFORMAT (type)->name); + puts_filtered ("\n"); + break; + default: /* We have to pick one of the union types to be able print and test the value. Pick cplus_struct_type, even though we know it isn't @@ -2848,14 +2858,17 @@ build_gdbtypes (void) init_type (TYPE_CODE_FLT, TARGET_FLOAT_BIT / TARGET_CHAR_BIT, 0, "float", (struct objfile *) NULL); + TYPE_FLOATFORMAT (builtin_type_float) = TARGET_FLOAT_FORMAT; builtin_type_double = init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT, 0, "double", (struct objfile *) NULL); + TYPE_FLOATFORMAT (builtin_type_double) = TARGET_DOUBLE_FORMAT; builtin_type_long_double = init_type (TYPE_CODE_FLT, TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT, 0, "long double", (struct objfile *) NULL); + TYPE_FLOATFORMAT (builtin_type_long_double) = TARGET_LONG_DOUBLE_FORMAT; builtin_type_complex = init_type (TYPE_CODE_COMPLEX, 2 * TARGET_FLOAT_BIT / TARGET_CHAR_BIT, 0, |