llvm-project
19e05e62 - [LLVM][PDB] Add missing type/symbol IDs (#182743)

Commit
69 days ago
[LLVM][PDB] Add missing type/symbol IDs (#182743) This adds all missing `LF_` and `S_` constants found in `msdia140.dll`/`mspdbcore.dll`. It doesn't add the record definitions. Most of them are unknown. Some definitions would be great to have: - `LF_{CLASS,STRUCTURE,UNION,INTERFACE}2` The structure is similar to the versions without `2`. See https://redirect.github.com/microsoft/microsoft-pdb/issues/50#issuecomment-737890766 and https://github.com/microsoft/pdb-rs/blob/23def87dfed8cb78dd2916c9607a0caa19e8e549/codeview/src/types/visitor.rs#L518-L523. We'll probably need to duplicate `ClassRecord` and friends for this. From the comment, it sounded like MSVC would generate these, but I haven't been successful in getting it to generate these. - `S_ASSOCIATION` is generated when compiling C++ 20 coroutines. - `S_REGREL32_INDIR` (and similar) also generated in C++ 20 coroutines and for (unoptimized) structured bindings (#34392). Seems to correspond to [`LocationType::LocIsRegRelAliasIndir`](https://learn.microsoft.com/en-us/visualstudio/debugger/debug-interface-access/locationtype?view=visualstudio) ([Symbol Locations](https://learn.microsoft.com/en-us/visualstudio/debugger/debug-interface-access/symbol-locations?view=visualstudio)) from the DIA SDK. If I understand correctly, this is just `S_REGREL32` except that you'd add `offsetInUDT` to the offset. Example: ``` 40000000 13100000 00000000 4F01 5F5F 636F726F 5F667261 6D655F70 74720000 offset | type |off. in | reg| name (0-terminated) UDT ``` I'm guessing the others are similar, but I don't have any example. We're also missing some x86 and arm64 sub-registers for XMM/YMM that are present in `cvconst.h`.
Author
Parents
Loading