Release build generates ~30% fewer debug symbol entries than debug build #6992
Labels
compiler:debug-info
Debug Info support in the compiler
compiler
General compiler. Should eventually become more specific as the issue is triaged
team:compiler
Compiler Team
Description
When comparing debug symbols generated with -g in debug vs release mode, the release build produces significantly fewer symbol entries (~30% less). Both builds include all DWARF debug sections, but release mode maps fewer positions in the source code.
Expected Behaviour
If
-g
is specified, debug symbols should be complete in both debug and release builds, or the difference in coverage should be documented.Steps to Reproduce
Observations
Debug map has 39 entries, release map has 28 entries
Debug has 33 entries mapping to main.sw, release has 23
We can also notive a difference if we generate the dwarf files and inspect them using
llvm-dwarfdump
DWARF line table differences:
Full DWARF dump comparison provided below:
The text was updated successfully, but these errors were encountered: