I have the following LLVM IR function:
define internal void @"_ZN$SN&4ArgsCv9806ClsE&9to_vectorCv9942SaA1_ZN$SN&4ArgsCv9806ClsE.rFnE"(...)) ... !dbg !2010 {
that has the following Debug Info Subprogram attatched to it.
!2010 = distinct !DISubprogram(name: "std::env::Args::to_vector", linkageName: "_ZN$SN&4ArgsCv9806ClsE&9to_vectorCv9942SaA1_ZN$SN&4ArgsCv9806ClsE.rFnE", ..., flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition ...)
Instead of showing the pretty name on debuggers, we only get the mangled names (using gdb and lldb).
This is weird because it does show type names with their pretty names and also global variables so I don't know why it doesn't do it with functions:
Reading symbols from ./.sn/bin/snowball-output...
(gdb) br env.sn:119
Breakpoint 1 at 0x41e1f5: file /home/mauro/work/snowball/stdlib/env.sn, line 119.
(gdb) r
Starting program: /home/mauro/work/snowball/.sn/bin/snowball-output
This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.neon.kde.org/:
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, _ZN$SN&4ArgsCv9806ClsE&9to_vectorCv9942SaA1_ZN$SN&4ArgsCv9806ClsE.rFnE (self=...) at /home/mauro/work/snowball/stdlib/env.sn:119
119 func to_vector() Vector<String> {
(gdb) p self
$1 = (std::env::Args &) @0x7fffffffda20: {args = {capacity = 1, length = 1, buffer = {value = 0x176b170}, iter_index = -1}, iter_index = 0}
I was expecting a pretty name (just like the type of self) but got a mangled name from it