Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: gdb-patches@sourceware.org
Subject: GDB 7.7 crashes on LTO-built executable
Date: Wed, 12 Feb 2014 17:37:00 -0000	[thread overview]
Message-ID: <83lhxgs05d.fsf@gnu.org> (raw)

I compiled a simple test program with -flto using MinGW GCC 4.7.2, and
tried to debug it with GDB 7.7.  However, "info source" crashed with
SIGSEGV.  It turns out that source_info was trying to output this
line:

  printf_filtered (_("Compiled with %s debugging format.\n"), s->debugformat);

and s->debugformat was a NULL pointer.

Looking around, it sounds like when GDB iterates over objfiles, it
gets a weird file name, something like $TMPDIR/ccN8FPgQ.ltrans0.o,
instead of the expected name of the (single) object file name for this
program.  The real objfile then ends up with a NULL pointer instead of
its debugformat field.

Is this expected with LTO programs?  Is there a better way than saying
"unknown" when s->debugformat is NULL?

TIA


             reply	other threads:[~2014-02-12 17:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 17:37 Eli Zaretskii [this message]
2014-02-12 17:47 ` Eli Zaretskii
2014-02-12 19:22   ` Tom Tromey
2014-02-12 19:43     ` Eli Zaretskii
2014-02-12 20:05       ` Tom Tromey
2014-02-12 20:11         ` Eli Zaretskii
2014-02-15 16:58           ` Eli Zaretskii
2014-02-12 20:08       ` Eli Zaretskii

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=83lhxgs05d.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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