Just updated my system including gcc to release 13. To my dismay, the executable produced is not well digested by the Debugger when built in debug mode. Not anymore.
gcc13 may now default to a newer version of DWARF like 5 maybe but the release notes for gcc11 reads it defaults to version 5 as well.
Nevertheless, -gdwarf-3 fixes it for gcc (we already know that clang needed this regardless).
I think there’s something more complicated going on. Variables still show up in the “Variables” view in Debugger, complete with enum descriptors, struct contents, etc. It’s just source code that doesn’t show up. So, something’s changed specifically related to that, it appears.
Ah, no, it just seems to be some problem with GCC after all. The problem is encountered in Debugger’s DwarfFile.cpp; the version check in _ParseLineInfo fails (it’s 5, not 2 or 3.)
I agree this would be the best option after all. Perhaps, we should proceed step by step and implement v4 first? I don’t have a clue of the effort required to transition to v5.
Best to follow GCC/GDB parsing with DWARF v5. This helps keep things in a cross-compatibility debugging state if local/remote debugging with Clang/LLDB across various platforms like macOS.