This serie (#5 in PDB rewrite) actually starts the implementation of the i "new" PDB reader.
Basically, during the phase of migration from the "old" to the "new" PDB reader, both readers will be used at the same time (for every loaded module with PDB information).
So: - be ready to expect an increase in memory usage (as both will handle their own information), - in the process of migration, when possible, parts of the "old" reader will be disabled not to consume too much memory nor time,
Default will be to use the "new" reader. If you really want to use the "old" reader, set the WINE_DBGHELP_OLD_PDB env variable.
The integration of the "new" PDB reader is done through a set of methods attached to each debug format (1).
This serie: - sets the foundations of the "new" PDB reader (in a new pdb.c file), - use it to support the access to PFO unwinding information in PDB files (and this allows to unmap the PDB file, used by the all reader, when all information have been read by "old" reader), - introduces the methods vtable for each debug format.
Note 1: - "new" PDB reader will not support as many PDB variations as the "old" reader, - actually, PDB files come into two forms. The second form became the CL.EXE default in MSVC version 8, something like 30 years ago, (first format was very limited in the potential size of the PDB file), - also, the CodeView records in the PDB files exist in 3 versions: + V1: 2^16 types per image, identifiers as pascal string, 255 char max, + V2: 2^32 types per image, identifiers as pascal string, 255 char max, + V3: 2^32 types per image, identifiers as C-strings ("unlimited"), - for now, only support for the V3 CodeView records is included - I don't plan to add all the other variations as they are very obsolete, - for the record, this is aligned with clang design decisions for their PDB implementation,
Note 2: - "old" reader maps the whole PDB file in memory, then allocate memory chunks for each internal stream and reconstructs the stream by copying from the filemap into the stream buffer), - "new" reader access the PDB file through ReadFile,
[1] dwarf4/5 is a candidate to be moved to this new interface for the same reasons as PDB (not to load every debug information at module loading in dbghelp),