This is the mail archive of the gdb@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]

Should HOST_*_FORMAT be moved to NM_H file?


Hello,

I'm thinking out loud :-)

At present targets, such as the x86 define the HOST_*_FORMAT macros in 
their XM_H file.  These macros are then used.by doublest.c to more 
exactly (well according to the host :-) manipulate floating-point values.

There is, however, a problem.  The HOST_*_FORMAT values only get used 
when HOST==TARGET floating-point format.  If they are different, due to 
byte-order, say, GDB reverts to software floating point conversion code. 
This leads to the somewhat querky behavour of GDB behaving differently 
(for an identical target) when the host changes.

Given this, it occures to me that HOST_*_FORMAT should instead be moved 
to the NM_H file (where HOST==TARGET is 100% guarenteed).  That way, a 
cross GDB would always use software floating-point (no NM_H), while a 
native GDB would exploit the hosts floating-point.

This, unfortunatly, is also going to lead to querky behavour. 
Eventually a GDB will support both native and cross debugging.  At that 
point, we're back to the original problem as, dependant on the 
host/target, GDB may or may-not exploit the hosts floating point.  Ulgh!

So?  Well, the status quo gets to stay (unless somewone things otherwize 
:-).  GDB, binutils and GCC simply need a portable floating-point 
emulation library.

	Andrew


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