[eliz@is.elta.co.il: GDB: fine print in 387 info]

Stan Shebs shebs@cygnus.com
Wed Jul 7 18:17:00 GMT 1999


   Date: Wed, 7 Jul 1999 09:28:47 -0400 (EDT)
   From: Eli Zaretskii <eliz@delorie.com>

   IMHO, all the different versions of x87 support on the various platforms, 
   at least as far as GDB 4.18 sources go, are so close to one another that 
   they almost cry for unification.  I compared all of them at some point, 
   and they all seem like 95% cut-and-paste and 5% platform-dependent stuff.
   (And some of the platform-dependencies are just incompatibilities in the 
   order that the FP registers are enumerated in the header files.)

   I think it should be very easy to write a bunch of macros that would 
   hide any *real* platform-dependent aspects, like how you get the 
   registers from the debuggee, and use platform-independent code for 
   everything else.

I agree that we ought to be sharing some code here.  It's worth
considering whether this ought to be done with macros or with the new
architecture machinery; macros still make sense if the mods are purely
for native support, but you should use functions for anything that
might be used for cross-debugging.  Another way to look at it is -
suppose you were running a cross GDB hosted on djgpp targeting the
Hurd?  (Don't laugh, stranger configs have happened!)

   If people agree, the first step in the right direction would be to agree 
   on the layout of the information produced by "info float".  The new code 
   on i387-tdep.c is different from all the other platforms in this respect.

I can't think of a reason why users would want to have "info float"
display different things on different hosts, since it's supposed to
show info about the FPU, not the OS.  Unless someone can work up a
counterexample, let's define (and document) a single layout, and work
from that.

								Stan




More information about the Gdb-patches mailing list