im tring to build a rust uefi app and when i try to open it in a debugger (lldb) i cannot load any debug symbols
when i use codelldb: (with a laucnh config i found in osdev forums)
{
"type": "lldb",
"request": "custom",
"name": "Custom launch",
"targetCreateCommands": [
"target create --no-dependents ${workspaceFolder}/target/x86_64-unknown-uefi/debug/os.efi --symfile ${workspaceFolder}/target/x86_64-unknown-uefi/debug/os.pdb"
],
"processCreateCommands": ["gdb-remote localhost:1234"]
}
it does not seem to load any symbols and when i try to use the normal lldb it just crushes with this trace
(lldb) target create c:\Users\aylon\Documents\os\target\x86_64-unknown-uefi\debug\os.efi
(lldb) Current executable set to 'c:\Users\aylon\Documents\os\target\x86_64-unknown-uefi\debug\os.efi' (x86_64).
(lldb) target symbols add c:\Users\aylon\Documents\os\target\x86_64-unknown-uefi\debug\os.pdb
error: Assertion failed: (obj_load_address && obj_load_address != LLDB_INVALID_ADDRESS), function InitializeObject, file SymbolFilePDB.cpp, line 204
#0 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\liblldb.dll 0x57d3f7 C:\Program Files\LLVM\bin\liblldb.dll 0x38e2a6
#1 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\liblldb.dll 0x53995e C:\Program Files\LLVM\bin\liblldb.dll 0xc66a21
#2 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\liblldb.dll 0x8e7dc0 C:\Program Files\LLVM\bin\liblldb.dll 0x8e7ce5
#3 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\liblldb.dll 0x25dac8 C:\Program Files\LLVM\bin\liblldb.dll 0x991dbe
#4 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\liblldb.dll 0x98ff3d C:\Program Files\LLVM\bin\liblldb.dll 0x29390d
#5 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\liblldb.dll 0x2a98d5 C:\Program Files\LLVM\bin\liblldb.dll 0x2adb50
#6 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\liblldb.dll 0x834c52 C:\Program Files\LLVM\bin\liblldb.dll 0x222cae
#7 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\liblldb.dll 0x2af881 C:\Program Files\LLVM\bin\liblldb.dll 0x3fe52
#8 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\lldb.exe 0x4568 C:\Program Files\LLVM\bin\lldb.exe 0x52a9
#9 0x00007ffda8c2d3f7 C:\Program Files\LLVM\bin\lldb.exe 0x2adb4 (C:\Program Files\LLVM\bin\liblldb.dll+0x57d3f7)
#10 0x00007ffda8c2d3f7
#11 0x00007ffda8c2d3f7 (C:\Program Files\LLVM\bin\liblldb.dll+0x57d3f7)
0x00007FFDA8C2D3F7, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x57D3F7 byte(s), PyInit__lldb() + 0x48E937 byte(s)
0x00007FFDA8A3E2A6, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x38E2A6 byte(s), PyInit__lldb() + 0x29F7E6 byte(s)
0x00007FFDA8BE995E, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x53995E byte(s), PyInit__lldb() + 0x44AE9E byte(s)
0x00007FFDA9316A21, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0xC66A21 byte(s), PyInit__lldb() + 0xB77F61 byte(s)
0x00007FFDA8F97DC0, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x8E7DC0 byte(s), PyInit__lldb() + 0x7F9300 byte(s)
0x00007FFDA8F97CE5, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x8E7CE5 byte(s), PyInit__lldb() + 0x7F9225 byte(s)
0x00007FFDA890DAC8, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x25DAC8 byte(s), PyInit__lldb() + 0x16F008 byte(s)
0x00007FFDA9041DBE, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x991DBE byte(s), PyInit__lldb() + 0x8A32FE byte(s)
0x00007FFDA903FF3D, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x98FF3D byte(s), PyInit__lldb() + 0x8A147D byte(s)
0x00007FFDA894390D, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x29390D byte(s), PyInit__lldb() + 0x1A4E4D byte(s)
0x00007FFDA89598D5, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x2A98D5 byte(s), PyInit__lldb() + 0x1BAE15 byte(s)
0x00007FFDA895DB50, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x2ADB50 byte(s), PyInit__lldb() + 0x1BF090 byte(s)
0x00007FFDA8EE4C52, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x834C52 byte(s), PyInit__lldb() + 0x746192 byte(s)
0x00007FFDA88D2CAE, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x222CAE byte(s), PyInit__lldb() + 0x1341EE byte(s)
0x00007FFDA895F881, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x2AF881 byte(s), PyInit__lldb() + 0x1C0DC1 byte(s)
0x00007FFDA86EFE52, C:\Program Files\LLVM\bin\liblldb.dll(0x00007FFDA86B0000) + 0x3FE52 byte(s), ?RunCommandInterpreter@SBDebugger@lldb@@QEAAX_N0@Z() + 0xF2 byte(s)
0x00007FF68ED74568, C:\Program Files\LLVM\bin\lldb.exe(0x00007FF68ED70000) + 0x4568 byte(s)
0x00007FF68ED752A9, C:\Program Files\LLVM\bin\lldb.exe(0x00007FF68ED70000) + 0x52A9 byte(s)
0x00007FF68ED9ADB4, C:\Program Files\LLVM\bin\lldb.exe(0x00007FF68ED70000) + 0x2ADB4 byte(s)
0x00007FFEBA29257D, C:\WINDOWS\System32\KERNEL32.DLL(0x00007FFEBA280000) + 0x1257D byte(s), BaseThreadInitThunk() + 0x1D byte(s)
0x00007FFEBB76AA48, C:\WINDOWS\SYSTEM32\ntdll.dll(0x00007FFEBB710000) + 0x5AA48 byte(s), RtlUserThreadStart() + 0x28 byte(s)
Please file a bug report against lldb reporting this failure log, and as many details as possible
(lldb) symbol file 'c:\Users\aylon\Documents\os\target\x86_64-unknown-uefi\debug\os.pdb' has been added to 'c:\Users\aylon\Documents\os\target\x86_64-unknown-uefi\debug\os.efi'
this happens in windows and when i try wsl2 it looks like its loading fine but there are still no symbols to be found.
(lldb) image dump symfile
Dumping debug symbols for 1 modules.
SymbolFile pdb (c:\Users\aylon\Documents\os\target\x86_64-unknown-uefi\debug\os.efi)
Types:
Compile units:
Symtab, file = c:\Users\aylon\Documents\os\target\x86_64-unknown-uefi\debug\os.efi, num_symbols = 0
i also tried building with RUSTFLAGS="-C debuginfo=2" and still no succsess.
when i looked at the pdb file with llvm-pdbutil it seems fine (at least as much as i know)