Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* GDB 7.7 crashes on LTO-built executable
@ 2014-02-12 17:37 Eli Zaretskii
  2014-02-12 17:47 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2014-02-12 17:37 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-02-15 16:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 17:37 GDB 7.7 crashes on LTO-built executable Eli Zaretskii
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox