Open
Description
Problems
Currently, at least for GDB, demangling for variable names and function names are not supported by the debuginfo generated in cg_gcc.
Causes
For the short test program, https://github.com/rust-lang/rustc_codegen_gcc/blob/b5d61f1c9e2177f66f2c80c63ced76d8cc66d3db/example/std_example.rs, cg_gcc-generated debuginfo, as is dumped by abi-dumper:
ABI_gcc.txt
While in LLVM:
ABI_llvm.txt
Upon inspection, it's evident that the current debuginfo generation treats mangled names as short names in the DWARF file.
Potential Solutions
Add a new function to generate a Location
from mangled names and change the internal representation of Location
in gccjit
to allow storage of names as demangled ones.