MIPS: 64-bit DWARF

Maciej W. Rozycki macro@codesourcery.com
Wed Jul 14 18:44:00 GMT 2010

On Wed, 14 Jul 2010, David Daney wrote:

> > Here is the patch that I tested for (a non-HEAD version of) binutils.
> > This makes prelink happy, and there are no regressions in the GDB
> > testsuite.  (Anything else to test?)  I left in the 64-bit stuff for
> > TE_IRIX, as I have no idea about it.
> How was it tested?  Have you tested mips64-linux-gnu with -mabi=64?

 GCC switched to emitting 32-bit DWARF records on the MIPS/Linux/n64 
platform a couple of years ago.  GDB as of 6.8 didn't cope at all with 
64-bit DWARF records that were generated for n64 binaries before the 
switch (for the MIPS platform, that is -- I'd expect it to work for some 
others, especially ones that have always been 64-bit like the Alpha) -- 
the usual symptom was a complete exhaustion of the stack space followed by 
a crash (tested natively only).  I am strongly convinced GAS should 
follow, for consistency if nothing else, and I am rather surprised both 
tools were not updated at once.

 TE_IRIX refers to the original 64-bit DWARF stuff invented by SGI that 
predates DWARF-3 and differs slightly from the latter.  This may perhaps 
be the reason of the GDB crash -- it may have this SGI variant hardcoded 
for the MIPS target or suchlike.  Having noticed the GCC switch I have not 
investigated it further.

 The change needs to be properly tested of course to see if it does not 
uncover an odd bug somewhere, but in principle I consider it the right and 
necessary move.


More information about the Gdb mailing list