DWARF: no_mangle
items are given mangled linkage_name
s and namespace scopes
#46487
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
This technically subsumes:
#33172
The problem is:
no_mangle
is given a mangledlinkage_name
no_mangle
is given a dwarf namespace scopeSo basically, it's not correct at all.
On linux gdb this manifests in various ways, usually reporting the "symbol is in a file with no debugging information", and on lldb (tested on osx) the only way to disassemble a function, for example, is to namespace the mangled function like
disass -n main::unmangled_function
, which is obviously counter-intuitive.According to the dwarf standard:
So I think the right thing to do here is not omit a
linkage_name
at all.The PR in #46457 fixes this for statics; the change for functions and any other relevant
no_mangle
items should be relatively straightforward after.The text was updated successfully, but these errors were encountered: