[llvm-pdbutil] Add an export subcommand.
authorZachary Turner <zturner@google.com>
Mon, 2 Apr 2018 18:35:21 +0000 (18:35 +0000)
committerZachary Turner <zturner@google.com>
Mon, 2 Apr 2018 18:35:21 +0000 (18:35 +0000)
commitd11328a1bbf6a4d6f62fe0d7b401e5760cafdf68
tree0d9095464223eae57adc5f78494ee624c8104242
parenta26755cd55cd4b6529a13245f43243c07fadddd2
[llvm-pdbutil] Add an export subcommand.

This command can dump the binary contents of a stream to a file.
This is useful when you want to do side-by-side comparisons of
a specific stream from two PDBs to examine the differences between
them.  You can export both of them to a file, then open them up
side by side in a hex editor (for example), so as to eliminate any
differences that might arise from the contents being on different
blocks in the PDB.

In subsequent patches I plan to improve the "explain" subcommand
so that you can explain the contents of a binary file that isn't
necessarily a full PDB, but one of these dumped streams, by telling
the subcommand how to interpret the contents.

llvm-svn: 329002
llvm/include/llvm/DebugInfo/PDB/Native/InfoStream.h
llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp
llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
llvm/test/tools/llvm-pdbdump/Inputs/tpi.bin [new file with mode: 0644]
llvm/test/tools/llvm-pdbdump/export-stream.test [new file with mode: 0644]
llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
llvm/tools/llvm-pdbutil/llvm-pdbutil.h