Debug info with C macros (-g3) not honoured in LTO builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all:

I am using a self-built GCC 8.3.0 cross-compiler for ARM Cortex-M4F on Ubuntu 18.04.4 LTS.

I have several Autoconf projects that generate debug builds, release builds and release builds with LTO.

I have turned debug information on with level 3 with -g3. The expectation is that C preprocessor macros (#define symbols) get included in the debug information.

I can test it within GDB with commands "print MY_MACRO" and "info macro MY_MACRO".

The trouble is, as soon as I build with LTO, the preprocessor macros do not get included in the debug information. Other debug information works fine. It feels like -g2 is in place, instead of -g3 .

I am passing the same flags when linking as when compiling. The only change I make is adding "-flto" to the CFLAGS and CXXFLAGS. Other than that, LTO builds seem to be fine.

Is this kind of problem with -g3 and LTO already known? I couldn't find anything on this.

Thanks in advance,
  rdiez



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux