Previously, the yaml2pdb subcommand of llvm-pdbdump only
included object file names in module info if a module info stream was
present. This change makes it so that we include the object file name
even if there is no module info stream for the module. As a result,
running
llvm-pdbdump pdb2yaml -dbi-module-info original.pdb > original.yaml &&
llvm-pdbdump yaml2pdb -pdb=new.pdb original.yaml && llvm-pdbdump
pdb2yaml -dbi-module-info new.pdb > new.yaml now produces identical
original.yaml and new.yaml files.
Details
Diff Detail
- Build Status
Buildable 6741 Build 6741: arc lint + arc unit
Event Timeline
Can you add a test for this? It's really easy to generate yaml -> pdb tests now, just write a yaml file with everything cut out except for the fields you care about. It should pick up default values for everything else. Take a look at test\DebugInfo\PDB\Inputs\one-symbol.yaml for an example.
test/DebugInfo/PDB/pdbdump-objfilename.yaml | ||
---|---|---|
5–6 | Seems better to check the entire text rather than just one field, which would match regardless of what the output looked like, as long as that text appeared. How about: CHECK: DbiStream CHECK-NEXT: Modules CHECK-NEXT: - Module:[[ *]]'C:\src\test.obj' CHECK-NEXT: ObjFile:[[ *]]'C:\src\test.obj' |
test/DebugInfo/PDB/pdbdump-objfilename.yaml | ||
---|---|---|
5–6 | I made the check a little stricter. "Modules:" is still CHECK instead of CHECK-NEXT, because otherwise we would fail because of other fields that I don't think we care about in this test. |
Seems better to check the entire text rather than just one field, which would match regardless of what the output looked like, as long as that text appeared. How about: