Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for .NET PDBs #145

Open
michal-kapala opened this issue Feb 10, 2023 · 2 comments
Open

Support for .NET PDBs #145

michal-kapala opened this issue Feb 10, 2023 · 2 comments

Comments

@michal-kapala
Copy link

michal-kapala commented Feb 10, 2023

Out of curiosity I tried using pdb_symbols example to parse a custom-made C# dll, sadly nothing but module addresses could be parsed.

For my example the following symbol kinds appeared as not implemented:

Implementing the above symbols would be a fair step for supporting .NET binaries (at least those built with standard Visual Studio Build Tools).
I'd gladly contribute these though I'm not familiar with the inner PDB format, I assume it's just taken off Microsoft/microsoft-pdb. If there's any other source of guidance on the used format I would appreciate that a lot.

@mitsuhiko
Copy link
Member

Some limited support is in symbolic. If there is appetite it could be moved into the PDB crate but the formats and the use is rather different. https://docs.rs/symbolic/12.4.1/symbolic/debuginfo/ppdb/index.html

@michal-kapala
Copy link
Author

michal-kapala commented Oct 2, 2023

I submitted #146 with .NET-specific symbol reading, S_OEM is missing proper buffer reading but other than that i think the changes are ready. The changes are testable with pdb_symbols.rs example (i only included managed procedures and slots aka methods and their local variables), i'd appreciate a review/merge.

I tested on PDBs targeting .NET Framework 4.8, attempts to parse .NET 6 symbols resulted in error dumping PDB: UnrecognizedFileFormat. Below you can see an example output with the source code of a corresponding C# method.

example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants