cmd/compile: generate correct DW_AT_external flag #22399
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
Debugging
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
The current (1.9) Go compiler emits DWARF records for subprograms and variables that contain the "DW_AT_external" attribute, a flag which DWARF defines as:
If the name of the subroutine described by an entry with the tag ... is visible
outside of its containing compilation unit, that entry has a DW_AT_external attribute,
which is a flag.
The compiler is assigning a value to DW_AT_external based on whether the LSym in question is marked as static (AttrStatic), which I don't think is the same as the definition above. When I look at the generated DWARF for things like the Go compiler, the only things being marked as non-external are a small number of vars and functions from assembly files.
Not sure this makes a huge amount of difference (as far as I can tell there is no degradation to the debugging experience as a result of package-local functions being marked as external), but it might be worth fixing this up just for consistency / POLA.
The text was updated successfully, but these errors were encountered: