This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA]: Fix FP handling for non-multiarched targets


Hi,

I'd like to propose the following patch.

While running the testsuite on ARM several FP errors happened,
which apparently were a result of forcing the wrong FP type
on `builtin_type_float' and friends.  This is a result of
three lines in gdbtype.c which override the target specific
types with another one.  Thanks to Andrew Cagney for helping
to track that down.

Corinna

2002-02-08  Andrew Cagney  <ac131313@redhat.com>
	    Corinna Vinschen  <vinschen@redhat.com>

	* gdbtypes.c (build_gdbtypes): Don't force a specific
	float format on builtin float types.

Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.40
diff -u -p -r1.40 gdbtypes.c
--- gdbtypes.c	2002/02/03 23:18:11	1.40
+++ gdbtypes.c	2002/02/08 15:32:20
@@ -3153,17 +3153,14 @@ 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,

-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]