Closed camden-smallwood closed 3 years ago
Thanks for the report!
There seems to be a difference between LF_UDT_SRC_LINE
and LF_UDT_MOD_SRC_LINE
that we missed in the initial implementation.
I currently don't have PDBs at hand to verify this, but it looks like we either need to split this into two types, or we create an enum field for the file reference that can either be a IdIndex
or a (u16, StringRef)
.
The
source_file
field in theUserDefinedTypeSourceId
struct is of typeIdIndex
, but it should be of typeStringRef
. Currently I have to manually de/reconstruct it by hand. Fortunately theIdIndex
andStringRef
types both have public fields and there is a workaround, but this should not be necessary:https://github.com/willglynn/pdb/blob/3d394eaf547998eeebc7c08ac5788d83d98a1caa/src/tpi/id.rs#L163