Module: wine Branch: master Commit: d12d5c7245635c9df26505c8b1aa3080404ca616 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d12d5c7245635c9df26505c8b...
Author: Eric Pouech eric.pouech@gmail.com Date: Wed Jun 22 16:28:09 2022 +0200
dbghelp: Preserve PDB's partial order for types of same name.
The PDB types can contain several times a type definition with an identical name. It seems to appear when modifying a type in source (like adding new fields to a struct): - as the PDB file (generated from first compilation) is updated (and not fully rewritten), the debug information for the old type is not flushed; a new record (for the same struct name) is emitted, and inserted before the old one in the hash table (bucket list).
Even if dbghelp's hash table is different from PDB's internal one (ie number of buckets & bucket lists are different), we must maintain the order of records of identical names (they end up in the same bucket) as a lookup by name *must* return the first record in PDB's order. Lookup by name is used: - when resolving a forward definition (to get the full UDT definition including for example a struct/class fields's list) - when searching by type name from dbghelp APIs, like SymGetTypeFromName()
This patch implements the preservation of that order.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
---
dlls/dbghelp/msc.c | 373 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 284 insertions(+), 89 deletions(-)
Diff: https://source.winehq.org/git/wine.git/?a=commitdiff;h=d12d5c7245635c9df2650...