This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Should HOST_*_FORMAT be moved to NM_H file?
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: Should HOST_*_FORMAT be moved to NM_H file?
- From: Mark Kettenis <kettenis at science dot uva dot nl>
- Date: 22 Aug 2001 12:35:49 +0200
- Cc: gdb at sources dot redhat dot com
- References: <3B81F44F.10405@cygnus.com>
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