Blame SOURCES/gdb-rhbz1320945-float128-8of9.patch

2c2fa1
commit 9b790ce7227fa346d08a41462119e9a3e93f5e80
2c2fa1
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2c2fa1
Date:   Tue Sep 6 17:31:53 2016 +0200
2c2fa1
2c2fa1
    Add gdbarch callback to provide formats for debug info float types
2c2fa1
    
2c2fa1
    At this point, all TYPE_CODE_FLT types carry their floating-point format,
2c2fa1
    except for those creating from reading DWARF or stabs debug info.  Those
2c2fa1
    will be addressed by this commit.
2c2fa1
    
2c2fa1
    The main issue here is that we actually have to determine which floating-
2c2fa1
    point format to use.  Currently, we only have the type length as input
2c2fa1
    to this decision.  In the future, we may hopefully get --at least in
2c2fa1
    DWARF-- additional information to help disambiguate multiple different
2c2fa1
    formats of the same length.  For now, we can still look at the type name
2c2fa1
    as a hint.
2c2fa1
    
2c2fa1
    This decision logic is encapsulated in a gdbarch callback to allow
2c2fa1
    platform-specific overrides.  The default implementation use the same
2c2fa1
    logic (compare type length against the various gdbarch_..._bit sizes)
2c2fa1
    that is currently implemented in floatformat_from_length.
2c2fa1
    
2c2fa1
    With this commit, all platforms still use the default logic, so there
2c2fa1
    should be no actual change in behavior.  A follow-on commit will add
2c2fa1
    support for __float128 on Intel and Power.
2c2fa1
    
2c2fa1
    Once dwarf2read.c and stabsread.c make use of the new callback to
2c2fa1
    determine floating-point formats, we're now sure every TYPE_CODE_FLT
2c2fa1
    type will always carry its format.  The commit therefore adds asserts
2c2fa1
    to verify_floatformat to ensure new code will continue to always
2c2fa1
    provide formats, and removes the code in floatformat_from_type that
2c2fa1
    used to handle types with a NULL TYPE_FLOATFORMAT.
2c2fa1
    
2c2fa1
    gdb/ChangeLog:
2c2fa1
    
2c2fa1
            * gdbarch.sh (floatformat_for_type): New gdbarch callback.
2c2fa1
            * gdbarch.h, gdbarch.c: Re-generate.
2c2fa1
            * arch-utils.h (default_floatformat_for_type): New prototype.
2c2fa1
            * arch-utils.c (default_floatformat_for_type): New function.
2c2fa1
    
2c2fa1
            * doublest.c (floatformat_from_length): Remove.
2c2fa1
            (floatformat_from_type): Assume TYPE_FLOATFORMAT is non-NULL.
2c2fa1
            * gdbtypes.c (verify_floatformat): Require non-NULL format.
2c2fa1
    
2c2fa1
            * dwarf2read.c (dwarf2_init_float_type): New function.
2c2fa1
            (read_base_type): Use it.
2c2fa1
            * stabsread.c (dbx_init_float_type): New function.
2c2fa1
            (read_sun_floating_type): Use it.
2c2fa1
            (read_range_type): Likewise.
2c2fa1
    
2c2fa1
    Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2c2fa1
2c2fa1
### a/gdb/ChangeLog
2c2fa1
### b/gdb/ChangeLog
2c2fa1
## -1,5 +1,22 @@
2c2fa1
 2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
2c2fa1
 
2c2fa1
+	* gdbarch.sh (floatformat_for_type): New gdbarch callback.
2c2fa1
+	* gdbarch.h, gdbarch.c: Re-generate.
2c2fa1
+	* arch-utils.h (default_floatformat_for_type): New prototype.
2c2fa1
+	* arch-utils.c (default_floatformat_for_type): New function.
2c2fa1
+
2c2fa1
+	* doublest.c (floatformat_from_length): Remove.
2c2fa1
+	(floatformat_from_type): Assume TYPE_FLOATFORMAT is non-NULL.
2c2fa1
+	* gdbtypes.c (verify_floatformat): Require non-NULL format.
2c2fa1
+
2c2fa1
+	* dwarf2read.c (dwarf2_init_float_type): New function.
2c2fa1
+	(read_base_type): Use it.
2c2fa1
+	* stabsread.c (dbx_init_float_type): New function.
2c2fa1
+	(read_sun_floating_type): Use it.
2c2fa1
+	(read_range_type): Likewise.
2c2fa1
+
2c2fa1
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
2c2fa1
+
2c2fa1
 	* ada-lang.c (ada_language_arch_info): Use gdbarch-provided
2c2fa1
 	platform ABI floating-point formats for built-in types.
2c2fa1
 	* d-lang.c (build_d_types): Likewise.
2c2fa1
Index: gdb-7.6.1/gdb/arch-utils.c
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/arch-utils.c	2017-03-11 21:42:26.681253106 +0100
2c2fa1
+++ gdb-7.6.1/gdb/arch-utils.c	2017-03-11 21:48:54.872873908 +0100
2c2fa1
@@ -216,6 +216,34 @@
2c2fa1
   *frame_offset = 0;
2c2fa1
 }
2c2fa1
 
2c2fa1
+/* Return a floating-point format for a floating-point variable of
2c2fa1
+   length LEN in bits.  If non-NULL, NAME is the name of its type.
2c2fa1
+   If no suitable type is found, return NULL.  */
2c2fa1
+
2c2fa1
+const struct floatformat **
2c2fa1
+default_floatformat_for_type (struct gdbarch *gdbarch,
2c2fa1
+			      const char *name, int len)
2c2fa1
+{
2c2fa1
+  const struct floatformat **format = NULL;
2c2fa1
+
2c2fa1
+  if (len == gdbarch_half_bit (gdbarch))
2c2fa1
+    format = gdbarch_half_format (gdbarch);
2c2fa1
+  else if (len == gdbarch_float_bit (gdbarch))
2c2fa1
+    format = gdbarch_float_format (gdbarch);
2c2fa1
+  else if (len == gdbarch_double_bit (gdbarch))
2c2fa1
+    format = gdbarch_double_format (gdbarch);
2c2fa1
+  else if (len == gdbarch_long_double_bit (gdbarch))
2c2fa1
+    format = gdbarch_long_double_format (gdbarch);
2c2fa1
+  /* On i386 the 'long double' type takes 96 bits,
2c2fa1
+     while the real number of used bits is only 80,
2c2fa1
+     both in processor and in memory.
2c2fa1
+     The code below accepts the real bit size.  */
2c2fa1
+  else if (gdbarch_long_double_format (gdbarch) != NULL
2c2fa1
+	   && len == gdbarch_long_double_format (gdbarch)[0]->totalsize)
2c2fa1
+    format = gdbarch_long_double_format (gdbarch);
2c2fa1
+
2c2fa1
+  return format;
2c2fa1
+}
2c2fa1
 
2c2fa1
 int
2c2fa1
 generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
2c2fa1
Index: gdb-7.6.1/gdb/arch-utils.h
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/arch-utils.h	2017-03-11 21:42:26.681253106 +0100
2c2fa1
+++ gdb-7.6.1/gdb/arch-utils.h	2017-03-11 21:48:54.872873908 +0100
2c2fa1
@@ -88,6 +88,11 @@
2c2fa1
 
2c2fa1
 extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer;
2c2fa1
 
2c2fa1
+/* Default implementation of gdbarch_floatformat_for_type.  */
2c2fa1
+extern const struct floatformat **
2c2fa1
+  default_floatformat_for_type (struct gdbarch *gdbarch,
2c2fa1
+				const char *name, int len);
2c2fa1
+
2c2fa1
 extern CORE_ADDR generic_skip_trampoline_code (struct frame_info *frame,
2c2fa1
 					       CORE_ADDR pc);
2c2fa1
 
2c2fa1
Index: gdb-7.6.1/gdb/doublest.c
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/doublest.c	2017-03-11 21:42:26.681253106 +0100
2c2fa1
+++ gdb-7.6.1/gdb/doublest.c	2017-03-11 21:51:53.062063411 +0100
2c2fa1
@@ -800,63 +800,16 @@
2c2fa1
 }
2c2fa1
 
2c2fa1
 
2c2fa1
-/* Return a floating-point format for a floating-point variable of
2c2fa1
-   length LEN.  If no suitable floating-point format is found, an
2c2fa1
-   error is thrown.
2c2fa1
-
2c2fa1
-   We need this functionality since information about the
2c2fa1
-   floating-point format of a type is not always available to GDB; the
2c2fa1
-   debug information typically only tells us the size of a
2c2fa1
-   floating-point type.
2c2fa1
-
2c2fa1
-   FIXME: kettenis/2001-10-28: In many places, particularly in
2c2fa1
-   target-dependent code, the format of floating-point types is known,
2c2fa1
-   but not passed on by GDB.  This should be fixed.  */
2c2fa1
-
2c2fa1
-static const struct floatformat *
2c2fa1
-floatformat_from_length (struct gdbarch *gdbarch, LONGEST len)
2c2fa1
-{
2c2fa1
-  const struct floatformat *format;
2c2fa1
-
2c2fa1
-  if (len * TARGET_CHAR_BIT == gdbarch_half_bit (gdbarch))
2c2fa1
-    format = gdbarch_half_format (gdbarch)
2c2fa1
-	       [gdbarch_byte_order (gdbarch)];
2c2fa1
-  else if (len * TARGET_CHAR_BIT == gdbarch_float_bit (gdbarch))
2c2fa1
-    format = gdbarch_float_format (gdbarch)
2c2fa1
-	       [gdbarch_byte_order (gdbarch)];
2c2fa1
-  else if (len * TARGET_CHAR_BIT == gdbarch_double_bit (gdbarch))
2c2fa1
-    format = gdbarch_double_format (gdbarch)
2c2fa1
-	       [gdbarch_byte_order (gdbarch)];
2c2fa1
-  else if (len * TARGET_CHAR_BIT == gdbarch_long_double_bit (gdbarch))
2c2fa1
-    format = gdbarch_long_double_format (gdbarch)
2c2fa1
-	       [gdbarch_byte_order (gdbarch)];
2c2fa1
-  /* On i386 the 'long double' type takes 96 bits,
2c2fa1
-     while the real number of used bits is only 80,
2c2fa1
-     both in processor and in memory.
2c2fa1
-     The code below accepts the real bit size.  */ 
2c2fa1
-  else if ((gdbarch_long_double_format (gdbarch) != NULL)
2c2fa1
-	   && (len * TARGET_CHAR_BIT
2c2fa1
-               == gdbarch_long_double_format (gdbarch)[0]->totalsize))
2c2fa1
-    format = gdbarch_long_double_format (gdbarch)
2c2fa1
-	       [gdbarch_byte_order (gdbarch)];
2c2fa1
-  else
2c2fa1
-    format = NULL;
2c2fa1
-  if (format == NULL)
2c2fa1
-    error (_("Unrecognized %s-bit floating-point type."),
2c2fa1
-	   plongest (len * TARGET_CHAR_BIT));
2c2fa1
-  return format;
2c2fa1
-}
2c2fa1
+/* Return the floating-point format for a floating-point variable of
2c2fa1
+   type TYPE.  */
2c2fa1
 
2c2fa1
 const struct floatformat *
2c2fa1
 floatformat_from_type (const struct type *type)
2c2fa1
 {
2c2fa1
   struct gdbarch *gdbarch = get_type_arch (type);
2c2fa1
 
2c2fa1
-  gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT);
2c2fa1
-  if (TYPE_FLOATFORMAT (type) != NULL)
2c2fa1
-    return TYPE_FLOATFORMAT (type)[gdbarch_byte_order (gdbarch)];
2c2fa1
-  else
2c2fa1
-    return floatformat_from_length (gdbarch, TYPE_LENGTH (type));
2c2fa1
+  gdb_assert (TYPE_FLOATFORMAT (type));
2c2fa1
+  return TYPE_FLOATFORMAT (type)[gdbarch_byte_order (gdbarch)];
2c2fa1
 }
2c2fa1
 
2c2fa1
 /* Extract a floating-point number of type TYPE from a target-order
2c2fa1
Index: gdb-7.6.1/gdb/dwarf2read.c
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/dwarf2read.c	2017-03-11 21:45:39.098565504 +0100
2c2fa1
+++ gdb-7.6.1/gdb/dwarf2read.c	2017-03-11 21:48:54.877873941 +0100
2c2fa1
@@ -12901,6 +12901,27 @@
2c2fa1
   return this_type;
2c2fa1
 }
2c2fa1
 
2c2fa1
+/* Allocate a floating-point type of size BITS and name NAME.  Pass NAME_HINT
2c2fa1
+   (which may be different from NAME) to the architecture back-end to allow
2c2fa1
+   it to guess the correct format if necessary.  */
2c2fa1
+
2c2fa1
+static struct type *
2c2fa1
+dwarf2_init_float_type (struct objfile *objfile, int bits, const char *name,
2c2fa1
+			const char *name_hint)
2c2fa1
+{
2c2fa1
+  struct gdbarch *gdbarch = get_objfile_arch (objfile);
2c2fa1
+  const struct floatformat **format;
2c2fa1
+  struct type *type;
2c2fa1
+
2c2fa1
+  format = gdbarch_floatformat_for_type (gdbarch, name_hint, bits);
2c2fa1
+  if (format)
2c2fa1
+    type = init_float_type (objfile, bits, name, format);
2c2fa1
+  else
2c2fa1
+    type = init_type (objfile, TYPE_CODE_ERROR, bits / TARGET_CHAR_BIT, name);
2c2fa1
+
2c2fa1
+  return type;
2c2fa1
+}
2c2fa1
+
2c2fa1
 /* Find a representation of a given base type and install
2c2fa1
    it in the TYPE field of the die.  */
2c2fa1
 
2c2fa1
@@ -12941,14 +12962,14 @@
2c2fa1
 	type = init_boolean_type (objfile, bits, 1, name);
2c2fa1
 	break;
2c2fa1
       case DW_ATE_complex_float:
2c2fa1
-	type = init_float_type (objfile, bits / 2, NULL, NULL);
2c2fa1
+	type = dwarf2_init_float_type (objfile, bits / 2, NULL, name);
2c2fa1
 	type = init_complex_type (objfile, name, type);
2c2fa1
 	break;
2c2fa1
       case DW_ATE_decimal_float:
2c2fa1
 	type = init_decfloat_type (objfile, bits, name);
2c2fa1
 	break;
2c2fa1
       case DW_ATE_float:
2c2fa1
-	type = init_float_type (objfile, bits, name, NULL);
2c2fa1
+	type = dwarf2_init_float_type (objfile, bits, name, name);
2c2fa1
 	break;
2c2fa1
       case DW_ATE_signed:
2c2fa1
 	type = init_integer_type (objfile, bits, 0, name);
2c2fa1
Index: gdb-7.6.1/gdb/gdbarch.c
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/gdbarch.c	2017-03-11 21:42:26.681253106 +0100
2c2fa1
+++ gdb-7.6.1/gdb/gdbarch.c	2017-03-11 21:49:55.628279481 +0100
2c2fa1
@@ -181,6 +181,7 @@
2c2fa1
   const struct floatformat ** double_format;
2c2fa1
   int long_double_bit;
2c2fa1
   const struct floatformat ** long_double_format;
2c2fa1
+  gdbarch_floatformat_for_type_ftype *floatformat_for_type;
2c2fa1
   int ptr_bit;
2c2fa1
   int addr_bit;
2c2fa1
   int dwarf2_addr_size;
2c2fa1
@@ -353,6 +354,7 @@
2c2fa1
   0,  /* double_format */
2c2fa1
   8 * sizeof (long double),  /* long_double_bit */
2c2fa1
   0,  /* long_double_format */
2c2fa1
+  default_floatformat_for_type,  /* floatformat_for_type */
2c2fa1
   8 * sizeof (void*),  /* ptr_bit */
2c2fa1
   8 * sizeof (void*),  /* addr_bit */
2c2fa1
   sizeof (void*),  /* dwarf2_addr_size */
2c2fa1
@@ -438,7 +440,7 @@
2c2fa1
   default_register_reggroup_p,  /* register_reggroup_p */
2c2fa1
   0,  /* fetch_pointer_argument */
2c2fa1
   0,  /* regset_from_core_section */
2c2fa1
-  0,  /* core_regset_sections */
2c2fa1
+  0,  /* iterate_over_regset_sections */
2c2fa1
   0,  /* make_corefile_notes */
2c2fa1
   0,  /* elfcore_write_linux_prpsinfo */
2c2fa1
   0,  /* find_memory_regions */
2c2fa1
@@ -530,6 +532,7 @@
2c2fa1
   gdbarch->float_bit = 4*TARGET_CHAR_BIT;
2c2fa1
   gdbarch->double_bit = 8*TARGET_CHAR_BIT;
2c2fa1
   gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
2c2fa1
+  gdbarch->floatformat_for_type = default_floatformat_for_type;
2c2fa1
   gdbarch->ptr_bit = gdbarch->int_bit;
2c2fa1
   gdbarch->char_signed = -1;
2c2fa1
   gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
2c2fa1
@@ -652,6 +655,7 @@
2c2fa1
   /* Skip verify of long_double_bit, invalid_p == 0 */
2c2fa1
   if (gdbarch->long_double_format == 0)
2c2fa1
     gdbarch->long_double_format = floatformats_ieee_double;
2c2fa1
+  /* Skip verify of floatformat_for_type, invalid_p == 0 */
2c2fa1
   /* Skip verify of ptr_bit, invalid_p == 0 */
2c2fa1
   if (gdbarch->addr_bit == 0)
2c2fa1
     gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
2c2fa1
@@ -1021,6 +1025,9 @@
2c2fa1
                       "gdbarch_dump: float_format = %s\n",
2c2fa1
                       pformat (gdbarch->float_format));
2c2fa1
   fprintf_unfiltered (file,
2c2fa1
+                      "gdbarch_dump: floatformat_for_type = <%s>\n",
2c2fa1
+                      host_address_to_string (gdbarch->floatformat_for_type));
2c2fa1
+  fprintf_unfiltered (file,
2c2fa1
                       "gdbarch_dump: fp0_regnum = %s\n",
2c2fa1
                       plongest (gdbarch->fp0_regnum));
2c2fa1
   fprintf_unfiltered (file,
2c2fa1
@@ -1738,6 +1745,23 @@
2c2fa1
   gdbarch->long_double_format = long_double_format;
2c2fa1
 }
2c2fa1
 
2c2fa1
+const struct floatformat **
2c2fa1
+gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length)
2c2fa1
+{
2c2fa1
+  gdb_assert (gdbarch != NULL);
2c2fa1
+  gdb_assert (gdbarch->floatformat_for_type != NULL);
2c2fa1
+  if (gdbarch_debug >= 2)
2c2fa1
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_floatformat_for_type called\n");
2c2fa1
+  return gdbarch->floatformat_for_type (gdbarch, name, length);
2c2fa1
+}
2c2fa1
+
2c2fa1
+void
2c2fa1
+set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch,
2c2fa1
+                                  gdbarch_floatformat_for_type_ftype floatformat_for_type)
2c2fa1
+{
2c2fa1
+  gdbarch->floatformat_for_type = floatformat_for_type;
2c2fa1
+}
2c2fa1
+
2c2fa1
 int
2c2fa1
 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2c2fa1
 {
2c2fa1
Index: gdb-7.6.1/gdb/gdbarch.h
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/gdbarch.h	2017-03-11 21:42:26.681253106 +0100
2c2fa1
+++ gdb-7.6.1/gdb/gdbarch.h	2017-03-11 21:48:54.879873955 +0100
2c2fa1
@@ -176,6 +176,14 @@
2c2fa1
 extern const struct floatformat ** gdbarch_long_double_format (struct gdbarch *gdbarch);
2c2fa1
 extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struct floatformat ** long_double_format);
2c2fa1
 
2c2fa1
+/* Returns the floating-point format to be used for values of length LENGTH.
2c2fa1
+   NAME, if non-NULL, is the type name, which may be used to distinguish
2c2fa1
+   different target formats of the same length. */
2c2fa1
+
2c2fa1
+typedef const struct floatformat ** (gdbarch_floatformat_for_type_ftype) (struct gdbarch *gdbarch, const char *name, int length);
2c2fa1
+extern const struct floatformat ** gdbarch_floatformat_for_type (struct gdbarch *gdbarch, const char *name, int length);
2c2fa1
+extern void set_gdbarch_floatformat_for_type (struct gdbarch *gdbarch, gdbarch_floatformat_for_type_ftype *floatformat_for_type);
2c2fa1
+
2c2fa1
 /* For most targets, a pointer on the target and its representation as an
2c2fa1
    address in GDB have the same size and "look the same".  For such a
2c2fa1
    target, you need only set gdbarch_ptr_bit and gdbarch_addr_bit
2c2fa1
Index: gdb-7.6.1/gdb/gdbarch.sh
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/gdbarch.sh	2017-03-11 21:42:26.681253106 +0100
2c2fa1
+++ gdb-7.6.1/gdb/gdbarch.sh	2017-03-11 21:48:54.880873961 +0100
2c2fa1
@@ -383,6 +383,11 @@
2c2fa1
 v:int:long_double_bit:::8 * sizeof (long double):8*TARGET_CHAR_BIT::0
2c2fa1
 v:const struct floatformat **:long_double_format:::::floatformats_ieee_double::pformat (gdbarch->long_double_format)
2c2fa1
 
2c2fa1
+# Returns the floating-point format to be used for values of length LENGTH.
2c2fa1
+# NAME, if non-NULL, is the type name, which may be used to distinguish
2c2fa1
+# different target formats of the same length.
2c2fa1
+m:const struct floatformat **:floatformat_for_type:const char *name, int length:name, length:0:default_floatformat_for_type::0
2c2fa1
+
2c2fa1
 # For most targets, a pointer on the target and its representation as an
2c2fa1
 # address in GDB have the same size and "look the same".  For such a
2c2fa1
 # target, you need only set gdbarch_ptr_bit and gdbarch_addr_bit
2c2fa1
Index: gdb-7.6.1/gdb/stabsread.c
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/stabsread.c	2017-03-11 21:48:47.133822245 +0100
2c2fa1
+++ gdb-7.6.1/gdb/stabsread.c	2017-03-11 21:48:54.881873968 +0100
2c2fa1
@@ -338,6 +338,24 @@
2c2fa1
   return (*type_addr);
2c2fa1
 }
2c2fa1
 
2c2fa1
+/* Allocate a floating-point type of size BITS.  */
2c2fa1
+
2c2fa1
+static struct type *
2c2fa1
+dbx_init_float_type (struct objfile *objfile, int bits)
2c2fa1
+{
2c2fa1
+  struct gdbarch *gdbarch = get_objfile_arch (objfile);
2c2fa1
+  const struct floatformat **format;
2c2fa1
+  struct type *type;
2c2fa1
+
2c2fa1
+  format = gdbarch_floatformat_for_type (gdbarch, NULL, bits);
2c2fa1
+  if (format)
2c2fa1
+    type = init_float_type (objfile, bits, NULL, format);
2c2fa1
+  else
2c2fa1
+    type = init_type (objfile, TYPE_CODE_ERROR, bits / TARGET_CHAR_BIT, NULL);
2c2fa1
+
2c2fa1
+  return type;
2c2fa1
+}
2c2fa1
+
2c2fa1
 /* for all the stabs in a given stab vector, build appropriate types 
2c2fa1
    and fix their symbols in given symbol vector.  */
2c2fa1
 
2c2fa1
@@ -3842,11 +3860,11 @@
2c2fa1
   if (details == NF_COMPLEX || details == NF_COMPLEX16
2c2fa1
       || details == NF_COMPLEX32)
2c2fa1
     {
2c2fa1
-      rettype = init_float_type (objfile, nbits / 2, NULL, NULL);
2c2fa1
+      rettype = dbx_init_float_type (objfile, nbits / 2);
2c2fa1
       return init_complex_type (objfile, NULL, rettype);
2c2fa1
     }
2c2fa1
 
2c2fa1
-  return init_float_type (objfile, nbits, NULL, NULL);
2c2fa1
+  return dbx_init_float_type (objfile, nbits);
2c2fa1
 }
2c2fa1
 
2c2fa1
 /* Read a number from the string pointed to by *PP.
2c2fa1
@@ -4133,7 +4151,7 @@
2c2fa1
   if (n3 == 0 && n2 > 0)
2c2fa1
     {
2c2fa1
       struct type *float_type
2c2fa1
-	= init_float_type (objfile, n2 * TARGET_CHAR_BIT, NULL, NULL);
2c2fa1
+	= dbx_init_float_type (objfile, n2 * TARGET_CHAR_BIT);
2c2fa1
 
2c2fa1
       if (self_subrange)
2c2fa1
 	return init_complex_type (objfile, NULL, float_type);