mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-19 00:49:47 +08:00
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>
This commit is contained in:
@ -1128,8 +1128,10 @@ rust_language_arch_info (struct gdbarch *gdbarch,
|
||||
types[rust_primitive_isize] = arch_integer_type (gdbarch, length, 0, "isize");
|
||||
types[rust_primitive_usize] = arch_integer_type (gdbarch, length, 1, "usize");
|
||||
|
||||
types[rust_primitive_f32] = arch_float_type (gdbarch, 32, "f32", NULL);
|
||||
types[rust_primitive_f64] = arch_float_type (gdbarch, 64, "f64", NULL);
|
||||
types[rust_primitive_f32] = arch_float_type (gdbarch, 32, "f32",
|
||||
floatformats_ieee_single);
|
||||
types[rust_primitive_f64] = arch_float_type (gdbarch, 64, "f64",
|
||||
floatformats_ieee_double);
|
||||
|
||||
types[rust_primitive_unit] = arch_integer_type (gdbarch, 0, 1, "()");
|
||||
|
||||
|
Reference in New Issue
Block a user