[PATCH] D20712: pdbdump: print out the name of the stream 0.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 17:38:37 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL270943: pdbdump: print out the name of the stream 0. (authored by ruiu).

Changed prior to commit:
  http://reviews.llvm.org/D20712?vs=58726&id=58727#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20712

Files:
  llvm/trunk/include/llvm/DebugInfo/PDB/Raw/RawConstants.h
  llvm/trunk/test/DebugInfo/PDB/pdbdump-headers.test
  llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp

Index: llvm/trunk/test/DebugInfo/PDB/pdbdump-headers.test
===================================================================
--- llvm/trunk/test/DebugInfo/PDB/pdbdump-headers.test
+++ llvm/trunk/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)
Index: llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
===================================================================
--- llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
+++ llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
@@ -254,7 +254,9 @@
     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";
Index: llvm/trunk/include/llvm/DebugInfo/PDB/Raw/RawConstants.h
===================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Raw/RawConstants.h
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Raw/RawConstants.h
@@ -45,6 +45,11 @@
 };
 
 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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20712.58727.patch
Type: text/x-patch
Size: 2054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160527/4b389f43/attachment.bin>


More information about the llvm-commits mailing list