Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: MIPS: 64-bit DWARF
Date: Fri, 16 Jul 2010 14:44:00 -0000	[thread overview]
Message-ID: <alpine.DEB.1.10.1007161526440.29495@tp.orcam.me.uk> (raw)
In-Reply-To: <m31vb4n3u6.fsf@fleche.redhat.com>

On Thu, 15 Jul 2010, Tom Tromey wrote:

> Maciej> GDB as of 6.8 didn't cope at all with 64-bit DWARF records that
> Maciej> were generated for n64 binaries before the switch (for the MIPS
> Maciej> platform, that is -- I'd expect it to work for some others,
> Maciej> especially ones that have always been 64-bit like the Alpha) --
> Maciej> the usual symptom was a complete exhaustion of the stack space
> Maciej> followed by a crash (tested natively only).
> 
> Could you try a newer gdb?  And, if it still fails, file a bug report?

 I'm not ready for an upgrade at the moment, sorry.  I'll try to remember 
to test this stuff when I am -- I keep old toolchains around, so I may be 
able to get a test case easily.

 I would have debugged the problem originally myself, but obviously GDB 
crashed with 64-bit-annotated GDB as it did with any other binary.

> gdb isn't fully ready for 64 bit DWARF (e.g., CU offsets are still just
> unsigned ints), but it shouldn't crash.

 Well, it recursed till the end of the stack, at which point IIRC the 
kernel would kill the process.  So a resource exhaustion rather a usual 
segfault or suchlike, though the end result was effectively the same.  
Clearly it must have got rather confused, but with the immaturity of the 
n64 toolchain back when I started looking into it that could have been 
anything up to a compiler or binutils bug.

> Maciej>  TE_IRIX refers to the original 64-bit DWARF stuff invented by
> Maciej> SGI that predates DWARF-3 and differs slightly from the latter.
> Maciej> This may perhaps be the reason of the GDB crash -- it may have
> Maciej> this SGI variant hardcoded for the MIPS target or suchlike.
> 
> gdb's dwarf reader doesn't use the target for this.  It just recognizes
> the SGI approach unconditionally.  See dwarf2read.c:read_initial_length.

 I see.  Somehow I thought there were some target-dependent hooks involved 
as well.  Thanks for your clarification.

  Maciej


  reply	other threads:[~2010-07-16 14:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05 12:48 debug problem with prelinked libraries Andrew Stubbs
2010-05-05 14:35 ` Daniel Jacobowitz
2010-05-05 14:59   ` Andrew Stubbs
2010-05-07 13:23     ` Jan Kratochvil
2010-05-07 13:26       ` Andrew Stubbs
2010-07-01 15:43       ` Thomas Schwinge
2010-07-06  9:59         ` MIPS: 64-bit DWARF (was: debug problem with prelinked libraries) Thomas Schwinge
2010-07-14  8:50           ` MIPS: 64-bit DWARF Thomas Schwinge
2010-07-14 16:56             ` David Daney
2010-07-14 18:44               ` Maciej W. Rozycki
2010-07-15 15:48                 ` Tom Tromey
2010-07-16 14:44                   ` Maciej W. Rozycki [this message]
2010-07-21 22:54                   ` Joseph S. Myers
2010-07-22  5:28                     ` Tom Tromey
2010-07-16 11:22                 ` Thomas Schwinge
2010-07-19 20:00             ` Richard Sandiford
2010-07-22  7:41               ` Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.10.1007161526440.29495@tp.orcam.me.uk \
    --to=macro@codesourcery.com \
    --cc=gdb@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox