Finally! We can write a real PDB file to the disk. There's still quite a bit of work to be done on this codepath, but in its current limited form, it can dump MSF headers and stream directory information to YAML, then read it back in and produce a PDB from that information, then dump the resulting PDB back to YAML and the dumped YAML is identical.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/llvm/DebugInfo/CodeView/StreamRef.h | ||
---|---|---|
96 ↗ | (On Diff #60316) | Is this different from the default copy assignment operator? |
include/llvm/DebugInfo/CodeView/StreamWriter.h | ||
44 ↗ | (On Diff #60316) | Can you use static_assert instead of enable_if_t? |
include/llvm/DebugInfo/PDB/Raw/PDBFile.h | ||
122 ↗ | (On Diff #60316) | ArrayRef<ArrayRef<support::ulittle32_t>> is probably better for consistency. |
lib/DebugInfo/PDB/Raw/PDBFile.cpp | ||
287 ↗ | (On Diff #60316) | We shouldn't meet the error conditions that we are checking in this function unless there's a bug in PDB producer code or YAML reader code (YAML reader should do reasonable semantic checking), so they should be asserts. |
include/llvm/DebugInfo/CodeView/StreamRef.h | ||
---|---|---|
96 ↗ | (On Diff #60316) | I don't think so, this might have slipped in accidentally. |
include/llvm/DebugInfo/CodeView/StreamWriter.h | ||
44 ↗ | (On Diff #60316) | Probably so, I will try it. |
lib/DebugInfo/PDB/Raw/PDBFile.cpp | ||
287 ↗ | (On Diff #60316) | Technically a PDB file is a program input, we could generate one through fuzzing for example. Also we can't assume we are the only producer of PDB files. And since this will be in library code, I don't know if I feel comfortable asserting on conditions of the program input. |