getsentry / pdb

A parser for Microsoft PDB (Program Database) debugging information
https://docs.rs/pdb/
Apache License 2.0
368 stars 68 forks source link

Support for anonymous structs/unions in `FieldList` #104

Open qwerty01 opened 3 years ago

qwerty01 commented 3 years ago

Currently there doesn't seem to be a way to determine whether a MemberType is directly part of the type it corresponds to or is part of an anonymous struct/union. If the PDB format includes some kind of tag specifying anonymous types, it would be useful to have that included. If not, a heuristic that seems to work is to track the offsets, lengths, and positions of each field, and use them as constraints for determining the anonymous struct/union layout.