summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-05-25 05:49:48 +0000
committerZachary Turner <zturner@google.com>2016-05-25 05:49:48 +0000
commitd3076ab36ff43a8847df3512926ad5e2ef0494d2 (patch)
tree5d29e0f0a00df6b032c682b67b2f8646d869ed95 /llvm/lib/DebugInfo/PDB
parent546e64affd01a54d59f1af7d88db719a37bc28bc (diff)
downloadbcm5719-llvm-d3076ab36ff43a8847df3512926ad5e2ef0494d2.tar.gz
bcm5719-llvm-d3076ab36ff43a8847df3512926ad5e2ef0494d2.zip
[llvm-pdbdump] Decipher the remaining PDB streams.
We know at least know the meaning of every stream of the PDB file. Yay! llvm-svn: 270669
Diffstat (limited to 'llvm/lib/DebugInfo/PDB')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp
index 2cc2a73a0d1..6b5cd212ed9 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp
@@ -302,3 +302,15 @@ Error DbiStream::initializeFileInfo() {
return Error::success();
}
+
+uint32_t DbiStream::getDebugStreamIndex(DbgHeaderType Type) const {
+ ArrayRef<uint8_t> DbgData;
+ if (auto EC = DbgHeader.getArrayRef(0, DbgData, DbgHeader.getLength())) {
+ consumeError(std::move(EC));
+ return uint32_t(-1);
+ }
+ ArrayRef<ulittle16_t> DebugStreams(
+ reinterpret_cast<const ulittle16_t *>(DbgData.data()),
+ DbgData.size() / sizeof(ulittle16_t));
+ return DebugStreams[static_cast<uint16_t>(Type)];
+}
OpenPOWER on IntegriCloud