2 ms·
You can debug release builds with gcc/clang just fine. They don't generate debug information by default, but you can always request it ("-O3 -g" is a perfectly
by cyberax 10mo ago
You can debug release builds with gcc/clang just fine. They don't generate debug information by default, but you can always request it ("-O3 -g" is a perfectly fine combination of flags).
- pjmlp 10mo agoNot really, because some optimizations get the step through and such rather confusing. VC++ dynamic debugging pretends the code motion, inlining and similar optimizations aren't there and maps back to the original code as written. Unless this has been improved for gdb,lldb.
- cyberax 10mo agoAh, I see what you mean. GCC can now emit information that can be used to reconstruct the frame pointers for inlined functions: https://lwn.net/Articles/940686/ https://lwn.net/Articles/940686/ It's now filtering through various projects: https://sourceware.org/binutils/wiki/sframe https://sourceware.org/binutils/wiki/sframe It will not undo _all_ the transformations, but it will help a lot. I used it for backtraces, and it fixed the missing frame issues for me. This was possible with the earlier DWARF format (it's Turing-complete), and I think this is how VCC does it. Although I have not checked it.