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]

Re: Should HOST_*_FORMAT be moved to NM_H file?


Andrew Cagney <ac131313@cygnus.com> writes:

> 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

Hi Andrew,

I don't think we should change the curren status quo.  And even if we
wanted to change things to make things a bit more consistent I think
moving the HOST_*_FORMAT stuff to NM_H is the wrong approach.  Instead
we should enforce this kind of consistency in GDB itself, and probably
make it possible for the user the select the behaviour he/she wants.

Mark


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