Reputation: 76509
I am developing an app with GCC, mostly on Windows, until I got a crash that couldn't be debugged with the MinGW toolchain build I have. I installed a Linux VM, and debugged it there, which was possible, because the libstdc++ had the symbols I required.
I'm sure the Linux build of libstdc++ was a release (optimized version), because this would be normal to be installed for all apps to use. Same with the Windows version. But how can the Linux version have the necessary debug symbols built in, or if I ask the question I really want an answer to: how can I build GCC's libstdc++ so that I can get a useful stacktrace out of it, and still have it optimized? (note: I am able to recompile GCC/MinGW, so that's not an issue)
I know visual studio has both debug and release versions, but never heard of something like that for Linux. The debug symbols are always in seperate packages as I remember.
Info: I was using Arch linux with the plain GCC packages installed (no special debug versions explicitly selected).
Upvotes: 3
Views: 1121
Reputation: 76509
I'll answer this one myself: you need to configure with
--with-stdcxx-debug
This will place a in lib/bin and lib/debug a shared and import library, which contains debug info.
Upvotes: 2