This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

GDB 7.7 crashes on LTO-built executable


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


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