This is the mail archive of the
mailing list for the GDB project.
RE: Build root location affects debugging on PowerPC
- From: Lassi Niemistö <lassi dot niemisto at wapice dot com>
- To: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 30 Aug 2017 12:18:32 +0000
- Subject: RE: Build root location affects debugging on PowerPC
- Authentication-results: sourceware.org; auth=none
- References: <659baa98c7344fd2af55c359c1133681@EDB3.wapice.localdomain>
Answering to myself:
Root cause for debugging to fail on PowerPC were the rpaths auto-planted into my binaries by CMake. After using set(CMAKE_SKIP_BUILD_RPATH TRUE), the debugging started working as it should independent from the build root location. Not sure why it was not an issue on my x86 build, maybe because there I add some rpaths manually and this may stop CMake from autoplanting them.
Tried my best to make the build completely deterministic but hitting the bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65015 and thus the CRC part of --add-gnu-debuglink will still change my binary a little bit every time I build.
Another non-determinism is the LTO I use for some small binaries, but that is another discussion.
I am splitting the debug information to separate debug file using objcopy and thus have used --add-gnu-debuglink. If someone knows a way to allow the debugging without the link, I am interested.
> will file a bug report about the 8.0
It existed already, so just posted some material for easy recreation on any PC: https://sourceware.org/bugzilla/show_bug.cgi?id=21603