This is the mail archive of the gdb-patches@sourceware.cygnus.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: [rfc] For mips, sign-extended ecoff offsets


   Date: Fri, 23 Jun 2000 17:27:02 +1000
   From: Andrew Cagney <ac131313@cygnus.com>

   > This is all due to a long-ago decision to ship support for a 64-bit
   > MIPS chip using a 32-bit MIPS target.  I think that sign extending
   > pdr.ADR is probably right, since that is how 32 bit addresses are
   > treated by the relocation routines.

   Yes.

   >  But the real fix is to use a
   > 64-bit MIPS target.

   Kind of :-)  GDB can now be built to support (embedded only mind) the
   debugging of a fairly arbitrary MIPS ABI on 64 bit MIPS targets.  For
   instance, a single GDB executable can debug both ``gcc -mips2'' and
   ``gcc ...'' executables running on a 64 bit vr5000.  It might even
   eventually support that behavour under IRIX :-)

   Implementing this cleanly relies 32 bit MIPS addresses always being
   correctly sign extended.  At present they are not and things are
   suffering for it :-)

I don't understand that.  When gdb is debugging a 32 bit target, such
as gcc -mips2, it should handle all target addresses as 32 bit values.
Anything else would be a host/target confusion.  Sign extension or
lack thereof should be irrelevant.

The only issue here is that, for historical reasons, some 64 bit
targets use a 32 bit object file format.  If each 64 bit target used a
64 bit object file format, all would be well.

Ian

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