lesderid / gdb-msvc

GDB with patches for debugging MSVC binaries
https://github.com/lesderid/gdb-msvc/
GNU General Public License v2.0
13 stars 2 forks source link

PDB debug symbol loading using LLVM #7

Open lesderid opened 4 years ago

lesderid commented 4 years ago

Replaces: #5

I was originally under the impression that bfd should be responsible for PDB debug symbol loading. This seems to have been incorrect: GDB does all the debug symbol loading for other debug formats, and only relies on bfd to set up the file for reading.

This means the next step is to start implementing PDB debug symbol loading using LLVM in GDB. We use bfd to do the initial parsing of the PDB file headers and to initialise the section info.

foerdi commented 3 years ago

Hi,

how is the status of this issue? I tried the llvm-symbols branch but unfortunately, this gdb cannot find any debugging symbols in my pdb files. (On Windows vs and vs-code can find debug symbols) Btw my code base is a D project and I am using ldc (an llvm based d compiler).

It would be great if I can use this debugger for my project, so if I can help you let me know (maybe with a minimal test case?)

-- foerdi

lesderid commented 3 years ago

Hi,

how is the status of this issue? I tried the llvm-symbols branch but unfortunately, this gdb cannot find any debugging symbols in my pdb files. (On Windows vs and vs-code can find debug symbols) Btw my code base is a D project and I am using ldc (an llvm based d compiler).

It would be great if I can use this debugger for my project, so if I can help you let me know (maybe with a minimal test case?)

-- foerdi

Sorry, I haven't worked on this project much in the last few months, but I hope to pick it up again soon. The llvm-symbols branch doesn't work yet. You can try the master branch for some very basic symbol loading, but it's not great.

By the way, if you're developing D code on Windows, I recommend trying Visual Studio + VisualD with Visual Studio's debugger. I've been using it lately and it mostly works just fine.

foerdi commented 3 years ago

Thank you for the quick response. The master branch is not building on my system, I will open an issue.

By the way, if you're developing D code on Windows, I recommend trying Visual Studio + VisualD with Visual Studio's debugger. I've been using it lately and it mostly works just fine.

Linux is my main System. I hope that I don't have to start my Windows VM to debug my project. My plan is to use winedbg --gdb --no-start app.exe and connect this debugger. This works great for a separate MinGW project.