aboutsummaryrefslogtreecommitdiff
path: root/gdb/d-lang.c
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2016-09-06 17:31:03 +0200
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2016-09-06 17:31:03 +0200
commit49f190bcb7f074ea2e27d4e967e4fae9ed7dafb6 (patch)
treeee2cd587d9bfd4df9156a6c70cbd60aae704317d /gdb/d-lang.c
parentc413c44801e449f1f0b9828b81770e752b8219af (diff)
downloadgdb-49f190bcb7f074ea2e27d4e967e4fae9ed7dafb6.zip
gdb-49f190bcb7f074ea2e27d4e967e4fae9ed7dafb6.tar.gz
gdb-49f190bcb7f074ea2e27d4e967e4fae9ed7dafb6.tar.bz2
Add missing format for built-in floating-point types
Many callers of init_float_type and arch_float_type still pass a NULL floatformat. This commit changes those callers where the floatformat that is supposed to be use is obvious. There are two categories where this is the case: - A number of built-in types are intended to match the platform ABI floating-point types (i.e. types that use gdbarch_float_bit etc.). Those places should use the platform ABI floating-point formats defined via gdbarch_float_format etc. - A number of language built-in types should simply use IEEE floating- point formats, since the language actually defines that this is the format that must be used to implement floating-point types for this language. (This affects Java, Go, and Rust.) The same applies for to the predefined "RS/6000" stabs floating-point built-in types. gdb/ChangeLog: * ada-lang.c (ada_language_arch_info): Use gdbarch-provided platform ABI floating-point formats for built-in types. * d-lang.c (build_d_types): Likewise. * f-lang.c (build_fortran_types): Likewise. * m2-lang.c (build_m2_types): Likewise. * mdebugread.c (basic_type): Likewise. * go-lang.c (build_go_types): Use IEEE floating-point formats for language built-in types as mandanted by the language. * jv-lang.c (build_java_types): Likewise. * rust-lang.c (rust_language_arch_info): Likewise. * stabsread.c (rs6000_builtin_type): Likewise. Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Diffstat (limited to 'gdb/d-lang.c')
-rw-r--r--gdb/d-lang.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index 2eb7ffa..5fbc242 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -287,13 +287,13 @@ build_d_types (struct gdbarch *gdbarch)
= arch_integer_type (gdbarch, 128, 1, "ucent");
builtin_d_type->builtin_float
= arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
- "float", NULL);
+ "float", gdbarch_float_format (gdbarch));
builtin_d_type->builtin_double
= arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
- "double", NULL);
+ "double", gdbarch_double_format (gdbarch));
builtin_d_type->builtin_real
= arch_float_type (gdbarch, gdbarch_long_double_bit (gdbarch),
- "real", NULL);
+ "real", gdbarch_long_double_format (gdbarch));
TYPE_INSTANCE_FLAGS (builtin_d_type->builtin_byte)
|= TYPE_INSTANCE_FLAG_NOTTEXT;
@@ -303,13 +303,13 @@ build_d_types (struct gdbarch *gdbarch)
/* Imaginary and complex types. */
builtin_d_type->builtin_ifloat
= arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
- "ifloat", NULL);
+ "ifloat", gdbarch_float_format (gdbarch));
builtin_d_type->builtin_idouble
= arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
- "idouble", NULL);
+ "idouble", gdbarch_double_format (gdbarch));
builtin_d_type->builtin_ireal
= arch_float_type (gdbarch, gdbarch_long_double_bit (gdbarch),
- "ireal", NULL);
+ "ireal", gdbarch_long_double_format (gdbarch));
builtin_d_type->builtin_cfloat
= arch_complex_type (gdbarch, "cfloat",
builtin_d_type->builtin_float);