You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the compilation option is set to -DCMAKE_BUILD_TYPE=RelWithDebInfo, cpptrace cannot collect specific stack information, but gdb can. However, when set to -DCMAKE_BUILD_TYPE=DEBUG, both cpptrace and gdb can collect the stack information. Why is this the case?
The text was updated successfully, but these errors were encountered:
Hi,
I threw a quick test together locally but I see traces produced as expected -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCPPTRACE_BUILD_SHARED=ON -DCPPTRACE_UNWIND_WITH_UNWIND=ON -DCPPTRACE_DEMANGLE_WITH_CXXABI=ON:
Could you provide some more information?
I see in your followup comment you mentioned
-DCMAKE_BUILD_TYPE=Release
It's not unexpected that a stack trace would be empty under -DCMAKE_BUILD_TYPE=Release as debug symbols aren't included by default under Release.
The option -DCMAKE_BUILD_TYPE=Release is used to compile the cpptrace dynamic library, while the executable is linked with cpptrace using -DCMAKE_BUILD_TYPE=RelWithDebInfo.
When the compilation option is set to -DCMAKE_BUILD_TYPE=RelWithDebInfo, cpptrace cannot collect specific stack information, but gdb can. However, when set to -DCMAKE_BUILD_TYPE=DEBUG, both cpptrace and gdb can collect the stack information. Why is this the case?
The text was updated successfully, but these errors were encountered: