LTO debugging with GDB

Peryt, Sebastian sebastian.peryt@intel.com
Thu Jun 22 12:43:00 GMT 2017


Hi,

I'm trying to debug issue related to PR79920 comment #5, which from what I gathered so far is related to LTO. I've already tried 
multiple approaches to use GDB for this, but it still "slips" through linker stage. In GCC Wiki in DebuggingGCC there is
a link to question about options that should be passed to return required invocation. As a result of this discussion I am using:
-Wl,-debug,-plugin-opt=-debug -save-temps

Thanks to the above line I'm getting what I assume is proper invocation:
/undertest_gcc/install/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper @/tmp/ccEPkH9K

Which I am using later with gdb this way:
gdb --args /undertest_gcc/install/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper @/tmp/ccEPkH9K

Unfortunately, despite adding even breakpoints at places where the crash happens and running inside gcc directory (so gdbinit is used)
it never stops it's execution and just exits smoothly still producing ICE.

Is there any other way to run it to be able to follow the execution?

Thanks,
Sebastian



More information about the Gcc-help mailing list