1. 30 Jun, 2022 10 commits
  2. 29 Jun, 2022 24 commits
  3. 28 Jun, 2022 6 commits
    • Eric Pouech's avatar
      dbghelp: Use remap table from PDB hash stream. · 29dd8444
      Eric Pouech authored
      The PDB hash stream from TPI header contains information to force a remap
      to a given type record (whatever the order in the bucket hash list).
      This is generated by the incremental linker in some occasions.
      
      Use that information to remap the corresponding types.
      Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
      29dd8444
    • Eric Pouech's avatar
      dbghelp: Preserve PDB's partial order for types of same name. · d12d5c72
      Eric Pouech authored
      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: 's avatarEric Pouech <eric.pouech@gmail.com>
      d12d5c72
    • Eric Pouech's avatar
      dbghelp: Clearly separate the type loading into two passes. · ddbd341b
      Eric Pouech authored
      - create (contentless) UDT & enum in first pass
      - fill UDT&enum content and load the rest of types in second pass.
      Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
      ddbd341b
    • Eric Pouech's avatar
      mscvpdb.h: Redefine property with bitfields. · eb14fad7
      Eric Pouech authored
      Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
      eb14fad7
    • Eric Pouech's avatar
      dbghelp: Rely on first/last type index from type header. · b7c231c7
      Eric Pouech authored
      Code now follows these guidelines:
      - define PDB & Codeview internals in cvconst.h and mscvinfo.h (instead
        of having definitions in .c files, some of them being duplicate of .h
        content, and their "duplicate" values eventually diverged over time)
      - index of first type comes from PDB type header (instead of always being
        hardcoded as FIRST_DEFINABLE_TYPE)
      - use index of last typex from type header (instead of guessing the right
        value while parsing types, which also allows a single allocation
        instead of enlarging buffer while parsing).
      Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
      b7c231c7
    • Eric Pouech's avatar
      winedump: Explore a bit more TPI hash elements. · ba12b5ae
      Eric Pouech authored
      Rename a couple of fields in PDB structures for clarity.
      Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
      ba12b5ae