According to lothar's answer at How to generate gcc debug symbol outside the build target, I can create a two part executable - the stripped executable and the debug information file.
After creating the stripped executable and the debug information file, I install the executable as normal (with make install
). But I'm not sure what to do with the debug information file for Red Hat/Fedora.
I have two questions related to debugging the executable with GDB or LLDB (if debugging is needed):
What is the name of the debug information file on Red Hat/Fedora? Is there a convention to follow so the debugger associates them with the executable automatically?
Where do I place the the debug information file on Red Hat/Fedora? What is the location so the debugger finds them when debugging the executable?
Here's a related question for a different platform: Debug information file conventions for Debian/Ubuntu? It would also be helpful to know the same for OS X since I work on it on occasion.