Rather than just dumping binary blocks for line info, we now pretty print individual line and column records.
To facilitate this, a couple of changes had to be made:
- ModuleSubstream got moved from DebugInfo/PDB to DebugInfo/CodeView, and various codeview related types are defined there. It turns out DebugInfo/CodeView/Line.h already defines many of these structures, but this is really old code that is not endian aware, doesn't interact well with StreamInterface and not very helpful for getting stuff out of a PDB. Eventually we should migrate the old readobj COFFDumper code to these new structures, or at least merge their functionality somehow.
- A ModuleSubstream visitor is introduced. Depending on where your module substream array comes from, different subsets of record types can be expected. We are already hand parsing these substream arrays in many places especially in COFFDumper.cpp. In the future we can migrate these paths to the visitor as well, which should reduce a lot of code in COFFDumper.cpp.
Thank you for these comments!