moyix / pdbparse

Python code to parse Microsoft PDB files
Other
309 stars 83 forks source link

Updating to support Construct-2.9 #46

Closed ikelos closed 5 years ago

ikelos commented 5 years ago

Most of this is straight-forward following the transition guides for construct -2.8 and -2.9.

There was one tricky part that was pointed out in issue #45 , which was the combination of Embedding and Switches, as well as the Tunnelling. Tunnelling is replaced by RestreamData and there is a thing called an EmbeddedSwitch, but unfortunately the current contributor supporting Construct won't touch Embedding with a barge pole (and I can't blame them), so I had to include a solution that takes the output and does the embedding/flattening of the hierarchy quite manually after the parsing. This does however seem to work, negates the need for the EmbeddedSwitch (which returned different results from just Switch) and I believe the sections, globals and TPI data all works.

I haven't test much else, but do please shout if there's additional issues, I'm happy to help try to get this up to speed with the latest construct (since it sounds as though it's going unsupported and therefore won't need converting again in the future).

I've also added .gitignore and a yapf style file (which reformatted a great deal of the code). Hopefully that's not too problematic, and will keep the code in neater order if there are contributions in the future.

moyix commented 5 years ago

Excellent and much-needed change. Thanks so much for putting this together!