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]

Re: [rfa(arm)/rfc] Eliminate HOST_{FLOAT,DOUBLE,...}_FORMAT


> Date: Fri, 29 Jun 2001 02:04:12 -0400
> From: Andrew Cagney <ac131313@cygnus.com>
> 
> This patch eliminates the short cut.  Instead the conversion is always 
> routed through floatformat_{to,from}_doublest().  The most telling 
> comment and the reason this will probably catch a few eyebrows can be 
> found in i387-tdep.c:
> 
> !   /* Avoid call to floatformat_to_doublest if possible to preserve as
> !      much information as possible.  */
> 
> To me, the comment doesn't make sense.  If sizeof (host long double) == 
> size of (target long double) and information is still being lost then I 
> think floatformat_* has a bug.

You could lose information if the original value's bit pattern is not
a valid FP number.  Does floatformat_to_doublest handle these
situations 110% correctly?  I see at least one FIXME comment in the
code there.

If there are some pitfalls in what floatformat_to_doublest do, then I
think it's justified to favor native debugging by avoiding those
pitfalls.


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