summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-05-27 00:32:07 +0000
committerRui Ueyama <ruiu@google.com>2016-05-27 00:32:07 +0000
commit6816367a272918b44c684a18a59310a5a102d011 (patch)
tree67262b6e39f4c126d3b0b743c969690b816fe949
parent8fc3a27c5c24d4be6455ca52205583aa72dc9b2e (diff)
downloadbcm5719-llvm-6816367a272918b44c684a18a59310a5a102d011.tar.gz
bcm5719-llvm-6816367a272918b44c684a18a59310a5a102d011.zip
pdbdump: print out the name of the stream 0.
Differential Revision: http://reviews.llvm.org/D20712 llvm-svn: 270943
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/Raw/RawConstants.h5
-rw-r--r--llvm/test/DebugInfo/PDB/pdbdump-headers.test4
-rw-r--r--llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp4
3 files changed, 10 insertions, 3 deletions
diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/RawConstants.h b/llvm/include/llvm/DebugInfo/PDB/Raw/RawConstants.h
index 5c512f156f4..6263bf9d1bd 100644
--- a/llvm/include/llvm/DebugInfo/PDB/Raw/RawConstants.h
+++ b/llvm/include/llvm/DebugInfo/PDB/Raw/RawConstants.h
@@ -45,6 +45,11 @@ enum PdbRaw_TpiVer : uint32_t {
};
enum SpecialStream : uint32_t {
+ // Stream 0 contains the copy of previous version of the MSF directory.
+ // We are not currently using it, but technically if we find the main
+ // MSF is corrupted, we could fallback to it.
+ OldMSFDirectory = 0,
+
StreamPDB = 1,
StreamTPI = 2,
StreamDBI = 3,
diff --git a/llvm/test/DebugInfo/PDB/pdbdump-headers.test b/llvm/test/DebugInfo/PDB/pdbdump-headers.test
index 2e233888be4..a5904fab739 100644
--- a/llvm/test/DebugInfo/PDB/pdbdump-headers.test
+++ b/llvm/test/DebugInfo/PDB/pdbdump-headers.test
@@ -21,7 +21,7 @@
; EMPTY-NEXT: NumStreams: 17
; EMPTY-NEXT: }
; EMPTY-NEXT: Streams [
-; EMPTY-NEXT: Stream 0: [???] (40 bytes)
+; EMPTY-NEXT: Stream 0: [Old MSF Directory] (40 bytes)
; EMPTY-NEXT: Stream 1: [PDB Stream] (118 bytes)
; EMPTY-NEXT: Stream 2: [TPI Stream] (5392 bytes)
; EMPTY-NEXT: Stream 3: [DBI Stream] (739 bytes)
@@ -609,7 +609,7 @@
; ALL: NumStreams: 17
; ALL: }
; ALL: Streams [
-; ALL: Stream 0: [???] (40 bytes)
+; ALL: Stream 0: [Old MSF Directory] (40 bytes)
; ALL: Stream 1: [PDB Stream] (118 bytes)
; ALL: Stream 2: [TPI Stream] (5392 bytes)
; ALL: Stream 3: [DBI Stream] (739 bytes)
diff --git a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
index 7ba991a8f74..b3f73cc323c 100644
--- a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
+++ b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
@@ -254,7 +254,9 @@ static Error dumpStreamSummary(ScopedPrinter &P, PDBFile &File) {
std::string Label("Stream ");
Label += to_string(StreamIdx);
std::string Value;
- if (StreamIdx == StreamPDB)
+ if (StreamIdx == OldMSFDirectory)
+ Value = "Old MSF Directory";
+ else if (StreamIdx == StreamPDB)
Value = "PDB Stream";
else if (StreamIdx == StreamDBI)
Value = "DBI Stream";
OpenPOWER on IntegriCloud