General Discussion

PDB Format is truly a nightmare

Started by tomtrias on 2,701 views

I have started trying to remember to use different variable names in the various scoped in a method just so I can see debugging information in NCrunch, or better still providing decent logging during operation so even using the debugger directly becomes unnecessary. I've kept up with the forum posts about the issue and recently decided to take a look at the nature of the Program Database format. It makes MSI look like a cakewalk by comparison, and is even more sparsely documented. LLVM has some rather weighty reference material on the subject.
Yes. Yes it absolutely is!!!

At least, the old Win32 PDBs are. The new portable PDBs introduced with .NET Core are a much cleaner design and are much easier to work with.

The main problem with the old PDBs is that they were clearly only ever intended to be an internal format. It's generally best to interface with the files using the old COM based service calls (i.e. ISymUnmanagedWriter3) rather than interact with them yourself. However, if you're up for the challenge, the Mono.Cecil project has a managed PDB reader that can read all the essentials by leveraging the old CCI code.

Generally, I would recommend against investing time in learning this file format unless you have a good reason to do so. It wouldn't surprise me if MS decided to deprecate the format entirely and move everything to portable PDBs. You can imagine that they don't enjoy interacting with that old stuff any more than we do.
This post has been deleted.
This post has been deleted.

Post a reply

Log in to reply.