[PATCH] D20441: pdbdump: Rename NumberOfSymbols -> SymbolRecordStreamIndex.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 10:33:38 PDT 2016


ruiu created this revision.
ruiu added a reviewer: zturner.
ruiu added a subscriber: llvm-commits.

It seems that the field's value is the the stream index that
contains symbol records, at least for empty.pdb.

http://reviews.llvm.org/D20441

Files:
  include/llvm/DebugInfo/PDB/Raw/DbiStream.h
  lib/DebugInfo/PDB/Raw/DbiStream.cpp
  tools/llvm-pdbdump/llvm-pdbdump.cpp

Index: tools/llvm-pdbdump/llvm-pdbdump.cpp
===================================================================
--- tools/llvm-pdbdump/llvm-pdbdump.cpp
+++ tools/llvm-pdbdump/llvm-pdbdump.cpp
@@ -312,7 +312,7 @@
   P.printBoolean("Has CTypes", DS.hasCTypes());
   P.printBoolean("Is Stripped", DS.isStripped());
   P.printObject("Machine Type", DS.getMachineType());
-  P.printNumber("Number of Symbols", DS.getNumberOfSymbols());
+  P.printNumber("Symbol Record Stream Index", DS.getSymRecordStreamIndex());
 
   uint16_t Major = DS.getBuildMajorVersion();
   uint16_t Minor = DS.getBuildMinorVersion();
Index: lib/DebugInfo/PDB/Raw/DbiStream.cpp
===================================================================
--- lib/DebugInfo/PDB/Raw/DbiStream.cpp
+++ lib/DebugInfo/PDB/Raw/DbiStream.cpp
@@ -55,9 +55,9 @@
   ulittle32_t Age;                     // Should match InfoStream.
   ulittle16_t GSSyms;                  // Number of global symbols
   ulittle16_t BuildNumber;             // See DbiBuildNo structure.
-  ulittle16_t PublicSymbolStreamIndex; // Number of public symbols
+  ulittle16_t PublicSymbolStreamIndex; // Public symbols stream #
   ulittle16_t PdbDllVersion;           // version of mspdbNNN.dll
-  ulittle16_t SymRecords;              // Number of symbols
+  ulittle16_t SymRecordStreamIndex;    // Symbol records stream #
   ulittle16_t PdbDllRbld;              // rbld number of mspdbNNN.dll
   little32_t ModiSubstreamSize;        // Size of module info stream
   little32_t SecContrSubstreamSize;    // Size of sec. contribution stream
@@ -210,7 +210,9 @@
 
 uint32_t DbiStream::getPdbDllVersion() const { return Header->PdbDllVersion; }
 
-uint32_t DbiStream::getNumberOfSymbols() const { return Header->SymRecords; }
+uint32_t DbiStream::getSymRecordStreamIndex() const {
+  return Header->SymRecordStreamIndex;
+}
 
 PDB_Machine DbiStream::getMachineType() const {
   uint16_t Machine = Header->MachineType;
Index: include/llvm/DebugInfo/PDB/Raw/DbiStream.h
===================================================================
--- include/llvm/DebugInfo/PDB/Raw/DbiStream.h
+++ include/llvm/DebugInfo/PDB/Raw/DbiStream.h
@@ -44,7 +44,7 @@
 
   uint32_t getPdbDllVersion() const;
 
-  uint32_t getNumberOfSymbols() const;
+  uint32_t getSymRecordStreamIndex() const;
 
   PDB_Machine getMachineType() const;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20441.57819.patch
Type: text/x-patch
Size: 2340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160519/f0e8a7d5/attachment.bin>


More information about the llvm-commits mailing list