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

Add support for small MSF file format #150

Open
gtker opened this issue Dec 22, 2023 · 5 comments
Open

Add support for small MSF file format #150

gtker opened this issue Dec 22, 2023 · 5 comments

Comments

@gtker
Copy link

gtker commented Dec 22, 2023

Currently it's just a hard error.

The specific use case is writing a utility for assisting in decompiling applications compiled with Visual Studio C++ 6.0. Currently it seems the only other Rust option is to parse the output of various Windows-only PDB parser executables without source code available.

Let me know if example files are needed, and what they should contain.

@jon-zu
Copy link

jon-zu commented Jan 22, 2024

I'd also be interested into this, do you have any public test files in mind to write an implementation against? From reading the Wikipedia page(https://en.wikipedia.org/wiki/Program_database) It seems It's mostly just the header which is different, and the streams are the same.

@gtker
Copy link
Author

gtker commented Jan 22, 2024

Storm.zip

This .pdb and associated .dll exhibits the error.

I think in reality everything compiled using Visual C++ 6.0 has this.

A portable version can be found here.

On windows you can call VC98\Bin\VCVARS32.BAT and then generate build files with Cmake like normal: cmake -S -B build_dir && cmake --build build_dir .

@jon-zu
Copy link

jon-zu commented Jan 29, 2024

I've been able to implement the Msf Trait for small/2.00 files. I'll try to make some test cases and then create a pull request.

@jon-zu
Copy link

jon-zu commented Feb 2, 2024

You can check it out here: https://github.com/jon-zu/pdb-rs/tree/jz/version2
I've tried It with resym, and It seems to work fine, but since It contains a few more patches from the Vector35 Fork and support for utf8 chars I'd probably need to split those up for a merge request.

@ergrelet
Copy link

ergrelet commented Mar 8, 2024

Hey @jon-zu, thanks for the work done on that! FYI, I merged your commits into resym's fork of the pdb crate and resym's master branch now includes those changes, so people should be able to open small MSF files with resym using your changes 😉

For pdb maintainers: the changes proposed by @jon-zu seem to be a good start, although some more work will be needed to fully support this version of the format. For example I get Unimplemented PDB feature: Unsupported symbol data format errors when trying to parse symbol data on some PDBs of mine.

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

3 participants