While trying to load symbols for a program compiled with an old version of MSVC (can’t say which exactly, between VC++6.0 and 2008), IDA Pro often fails to load PDB or types from the PDB due to Failed to calculate struct member alignments error. This doesn’t happen with modern MSVC (yes, many people still use old MSVC for legacy development or for retro gaming modding). Please fix this.
Please submit a support ticket with the sample file + PDB. Thank you.
For now I can’t quite find a simpler reproducible for you to share, but it appears IDA simply refuses to load old PDBs and just delegates it to msdia140.dll, which feeds info to IDA and then msdia140.dll fails to correctly layout data for IDA (I assume PDB loader wasn’t updated for a while and there has been a mismatch in how IDA handles data from msdia)
PDB: using PDBIDA provider
PDB: Input file has an unsupported signature: Microsoft C/C++ program database 2.00
PDB: the next try will be done with MSDIA provider
PDB: using MSDIA provider
PDB: using DIA dll "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\msdia140.dll"
PDB: DIA interface version 14.0
PDB: using load address 400000
PDB: loaded 22338 types
So I assume something is broken on either IDA side or Microsoft dll side that breaks the thing. Maybe I can somehow specify older msdia version to work with older MSVC symbols? In that case, I would like to request the feature so that you can pick specific msdia.dll (for example msdia80.dll)
Or maybe IDA can start supporting older MSVC symbols because they are not that different and would greatly improve user experience as Microsoft dll appears to be buggy.
Is ida-sdk/src/plugins/pdb at main · HexRaysSA/ida-sdk · GitHub
the full source code for plugin handling pdb-s in IDA Pro? Can I create a pull request to add those features?