I’m somewhat puzzled by the plug-ins in LLDB, specifically on Windows.
When examining the lib directory after building LLVM/LLDB, I noticed at lot of lldbPlugin*.lib files. However, it’s not clear if or how these are included in LLDB.
Here’s one example:
Are these compiled into lldb.exe and if so, how are they invoked? I’m trying to determine if PDB symbols are currently working, and if not, what would be required to make them work.
Plugin is a bit misleading. All “plugins” are compiled into lldb. Plugins are really just a layering abstraction.
To answer your question, pdb works currently but is limited in functionality. First, it only supports limited usage scenarios, and second it requires Windows. It’s currently built on top of DIA. If you need PDB support on non Windows it will be quite a bit of work (although there’s people making gradual progress on it). If you need it on Windows it basically works but you’ll have to fill in some missing pieces. Several other people have been submitting patches in this area as well recently
Ahh ok, thanks for your quick response.
I was hoping to use LLDB on Windows (to debug Go code), which I know is DWARF based (and I thought would work on Windows), but since I couldn’t seem to set a breakpoint in C/C++/Go, so I thought perhaps plug-ins weren’t being loaded (although it’s not possible to ‘load’ a .lib file, they have to be included during link time).
However, longer term I’m also hoping to replace the kernel debugger for my own operating system (a personal OS written from scratch) with LLDB. My OS uses the PE file format and has PDBs too – currently compiled on Windows using a very old version of the Windows DDK. I’m in the process of moving to a new build system using clang. I was using DIA to some degree and debugging from Windows, but I eventually hope to be able to debug one system from another also running the OS, so non-Windows support would be good.
Any idea which pieces are missing on Windows? I’m probably going to start debugging lldb to figure it out, but knowing what is needed would help significantly.
It’s been a while since i was close to this code, so adding people who have been in there more recently
Is it? If lldb is totally broken without that patch we should upstream it no?
Hi Aaron, thanks.
I’ll take a look in the morning (currently 1:47am).
Just a quick question though, is this fix for lldb compiled with native PDB support or with DIA support?
As for getting the module addresses, I’m familiar with the PE image layout (having worked on the Windows Kernel team in the past and having built my own PE based OS – including a hand written x86-64 assembly PE loader from scratch) and with DIA (to some degree), so I will have a look at what’s required to potentially get that working.