This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to debug lto1 ICE?
- From: Rafael Espindola <espindola at google dot com>
- To: Basile STARYNKEVITCH <basile at starynkevitch dot net>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Tue, 3 Nov 2009 16:12:36 -0500
- Subject: Re: How to debug lto1 ICE?
- References: <4AF0990B.6040204@starynkevitch.net>
> But with the above details, how can I figure out how to run gdb, ie what
> arguments to give to gdb --args?
This is an area that needs some improvement :-(
What I do is pass -Wl,-debug to gcc. That will make collect2 print the
call to ld. Add a -plugin-opt=-debug to it and it should print the
call to lto-wrapper.
> I suppose the offending process is probably
> /usr/local/libexec/gcc-trunk/gcc/x86_64-unknown-linux-gnu/4.5.0/lto1 -quiet
> -dumpbase interp.pic.o -mtune=generic -auxbase-strip /tmp/ccKdeyrC.lto.o -O2
> -version @/tmp/ccJMSLwC -o /tmp/ccODq2S4.s
>
> But I am not sure to understand correctly, in particular the @/tmp/ccJMSLwC
> argument puzzles me. Apparently, some program arguments are collected in
> some temporary files....
That is correct. This is to avoid command lines that are too large. We
currently delete those files during the plugin cleanup. I will send a
patch disabling cleanup if -debug is given.
> So how do I run lto1 under GDB, knowing the faulty gcc invocation?
Given the lto-wrapper line above, add -debug to it and it will print
the lto1 invocation.
> Regards.
>
Cheers,
--
Rafael Ãvila de EspÃndola