Hacker News new | ask | show | jobs
by flohofwoe 828 days ago
That's been my fallback solution too in C++ in the past and it kinda works (and Visual Studio has a special option /Zo since quite a while https://learn.microsoft.com/en-us/cpp/build/reference/zo-enh..., not sure though if that's actually used by cmake's "RelWithDebugInfo" config), but there's still downsides even when not using a debugger. Most importantly: if you have a crash/assert handler which logs out a callstack, that callstack may sometimes be quite misleading (depending on how much the optimiser passes have mangled the compiler output relative to the input source code).