For my project, the release version (compiled with the -O2
flag) has higher performance than the debug version (compiled with the -g -O0
flag).
So I have to use the release version.
However, in the production environment, the release program sometimes produces core dumps.
I then use gdb xxx core
to debug the core dump file, but there is not enough information for me.
I don't care about the size of the program or any other file. I want the best performance and the most detailed possible debug info.
What should I do?