diff options
author | Zachary Turner <zturner@google.com> | 2018-04-02 18:35:21 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-04-02 18:35:21 +0000 |
commit | d11328a1bbf6a4d6f62fe0d7b401e5760cafdf68 (patch) | |
tree | 0d9095464223eae57adc5f78494ee624c8104242 /llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp | |
parent | a26755cd55cd4b6529a13245f43243c07fadddd2 (diff) | |
download | bcm5719-llvm-d11328a1bbf6a4d6f62fe0d7b401e5760cafdf68.tar.gz bcm5719-llvm-d11328a1bbf6a4d6f62fe0d7b401e5760cafdf68.zip |
[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
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp b/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp index e9ae5a1a193..0bb543e8c64 100644 --- a/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp @@ -86,10 +86,10 @@ Error InfoStream::reload() { uint32_t InfoStream::getStreamSize() const { return Stream->getLength(); } -uint32_t InfoStream::getNamedStreamIndex(llvm::StringRef Name) const { +Expected<uint32_t> InfoStream::getNamedStreamIndex(llvm::StringRef Name) const { uint32_t Result; if (!NamedStreams.get(Name, Result)) - return 0; + return make_error<RawError>(raw_error_code::no_stream); return Result; } |