diff options
author | Zachary Turner <zturner@google.com> | 2016-04-25 17:38:08 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-04-25 17:38:08 +0000 |
commit | 0a43efea95a916502e1592b601134723d0523b72 (patch) | |
tree | 836d9061586ba7ce9d3dbfc82cff0c3332ee847e /llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp | |
parent | e2cbd13e5634e16301cd9e4b88b5ea08accafe9f (diff) | |
download | bcm5719-llvm-0a43efea95a916502e1592b601134723d0523b72.tar.gz bcm5719-llvm-0a43efea95a916502e1592b601134723d0523b72.zip |
Resubmit "Refactor raw pdb dumper into library"
This fixes a number of endianness issues as well as an ODR
violation that hopefully causes everything to be happy.
llvm-svn: 267431
Diffstat (limited to 'llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp')
-rw-r--r-- | llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp | 396 |
1 files changed, 84 insertions, 312 deletions
diff --git a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp index 7418cff511e..78a2155cf51 100644 --- a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp +++ b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp @@ -35,6 +35,9 @@ #include "llvm/DebugInfo/PDB/PDBSymbolExe.h" #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h" #include "llvm/DebugInfo/PDB/PDBSymbolThunk.h" +#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" +#include "llvm/DebugInfo/PDB/Raw/PDBStream.h" +#include "llvm/DebugInfo/PDB/Raw/RawSession.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/FileSystem.h" @@ -43,8 +46,8 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Process.h" -#include "llvm/Support/raw_ostream.h" #include "llvm/Support/Signals.h" +#include "llvm/Support/raw_ostream.h" #if defined(HAVE_DIA_SDK) #ifndef NOMINMAX @@ -152,186 +155,32 @@ static void reportError(StringRef Input, std::error_code EC) { reportError(Input, EC.message()); } -static std::error_code checkOffset(MemoryBufferRef M, uintptr_t Addr, - const uint64_t Size) { - if (Addr + Size < Addr || Addr + Size < Size || - Addr + Size > uintptr_t(M.getBufferEnd()) || - Addr < uintptr_t(M.getBufferStart())) { - return std::make_error_code(std::errc::bad_address); - } - return std::error_code(); -} - -template <typename T> -static std::error_code checkOffset(MemoryBufferRef M, ArrayRef<T> AR) { - return checkOffset(M, uintptr_t(AR.data()), (uint64_t)AR.size() * sizeof(T)); -} - -static std::error_code checkOffset(MemoryBufferRef M, StringRef SR) { - return checkOffset(M, uintptr_t(SR.data()), SR.size()); -} - -// Sets Obj unless any bytes in [addr, addr + size) fall outsize of m. -// Returns unexpected_eof if error. -template <typename T> -static std::error_code getObject(const T *&Obj, MemoryBufferRef M, - const void *Ptr, - const uint64_t Size = sizeof(T)) { - uintptr_t Addr = uintptr_t(Ptr); - if (std::error_code EC = checkOffset(M, Addr, Size)) - return EC; - Obj = reinterpret_cast<const T *>(Addr); - return std::error_code(); -} - -static uint64_t bytesToBlocks(uint64_t NumBytes, uint64_t BlockSize) { - return alignTo(NumBytes, BlockSize) / BlockSize; -} - -static uint64_t blockToOffset(uint64_t BlockNumber, uint64_t BlockSize) { - return BlockNumber * BlockSize; -} - -struct PDBStructureContext { - const PDB::SuperBlock *SB; - MemoryBufferRef M; - std::vector<uint32_t> StreamSizes; - DenseMap<uint32_t, std::vector<uint32_t>> StreamMap; - - SmallVector<char, 512> Scratch; - - // getObject tries to stitch together non-contiguous blocks into a contiguous - // value. The storage for the value comes from the memory mapped file if the - // memory would be contiguous. Otherwise, it uses 'Scratch' to buffer the - // data. - template <typename T> - void getObject(const T *&Obj, uint32_t StreamIdx, uint32_t &Offset) { - // Make sure the stream index is valid. - auto StreamBlockI = StreamMap.find(StreamIdx); - if (StreamBlockI == StreamMap.end()) - reportError(M.getBufferIdentifier(), - std::make_error_code(std::errc::bad_address)); - - auto &StreamBlocks = StreamBlockI->second; - uint32_t BlockNum = Offset / SB->BlockSize; - uint32_t OffsetInBlock = Offset % SB->BlockSize; - - // Make sure we aren't trying to read beyond the end of the stream. - if (Offset + sizeof(T) > StreamSizes[StreamIdx]) - reportError(M.getBufferIdentifier(), - std::make_error_code(std::errc::bad_address)); - - // Modify the passed in offset to point to the data after the object. - Offset += sizeof(T); - - // Handle the contiguous case: the offset + size stays within a block. - if (OffsetInBlock + sizeof(T) <= SB->BlockSize) { - uint32_t StreamBlockAddr = StreamBlocks[BlockNum]; - uint64_t StreamBlockOffset = - blockToOffset(StreamBlockAddr, SB->BlockSize) + OffsetInBlock; - // Return a pointer to the memory buffer. - Obj = reinterpret_cast<const T *>(M.getBufferStart() + StreamBlockOffset); - return; - } - - // The non-contiguous case: we will stitch together non-contiguous chunks - // into the scratch buffer. - Scratch.clear(); - - uint32_t BytesLeft = sizeof(T); - while (BytesLeft > 0) { - uint32_t StreamBlockAddr = StreamBlocks[BlockNum]; - uint64_t StreamBlockOffset = - blockToOffset(StreamBlockAddr, SB->BlockSize) + OffsetInBlock; - - const char *ChunkStart = - M.getBufferStart() + StreamBlockOffset; - uint32_t BytesInChunk = - std::min(BytesLeft, SB->BlockSize - OffsetInBlock); - Scratch.append(ChunkStart, ChunkStart + BytesInChunk); - - BytesLeft -= BytesInChunk; - ++BlockNum; - OffsetInBlock = 0; - } - - // Return a pointer to the scratch buffer. - Obj = reinterpret_cast<const T *>(Scratch.data()); - } - - template <typename T> - T getInt(uint32_t StreamIdx, uint32_t &Offset) { - const support::detail::packed_endian_specific_integral< - T, support::little, support::unaligned> *P; - getObject(P, StreamIdx, Offset); - return *P; - } - - template <typename T> - T getObject(uint32_t StreamIdx, uint32_t &Offset) { - const T *P; - getObject(P, StreamIdx, Offset); - return *P; - } -}; - -static void dumpStructure(MemoryBufferRef M) { - const PDB::SuperBlock *SB; - - auto Error = [&](std::error_code EC) { - if (EC) - reportError(M.getBufferIdentifier(), EC); - }; - - Error(getObject(SB, M, M.getBufferStart())); +static void dumpStructure(RawSession &RS) { + PDBFile &File = RS.getPDBFile(); if (opts::DumpHeaders) { - outs() << "BlockSize: " << SB->BlockSize << '\n'; - outs() << "Unknown0: " << SB->Unknown0 << '\n'; - outs() << "NumBlocks: " << SB->NumBlocks << '\n'; - outs() << "NumDirectoryBytes: " << SB->NumDirectoryBytes << '\n'; - outs() << "Unknown1: " << SB->Unknown1 << '\n'; - outs() << "BlockMapAddr: " << SB->BlockMapAddr << '\n'; + outs() << "BlockSize: " << File.getBlockSize() << '\n'; + outs() << "Unknown0: " << File.getUnknown0() << '\n'; + outs() << "NumBlocks: " << File.getBlockCount() << '\n'; + outs() << "NumDirectoryBytes: " << File.getNumDirectoryBytes() << '\n'; + outs() << "Unknown1: " << File.getUnknown1() << '\n'; + outs() << "BlockMapAddr: " << File.getBlockMapIndex() << '\n'; } - // We don't support blocksizes which aren't a multiple of four bytes. - if (SB->BlockSize % sizeof(support::ulittle32_t) != 0) - Error(std::make_error_code(std::errc::not_supported)); - - // We don't support directories whose sizes aren't a multiple of four bytes. - if (SB->NumDirectoryBytes % sizeof(support::ulittle32_t) != 0) - Error(std::make_error_code(std::errc::not_supported)); - - // The number of blocks which comprise the directory is a simple function of - // the number of bytes it contains. - uint64_t NumDirectoryBlocks = - bytesToBlocks(SB->NumDirectoryBytes, SB->BlockSize); if (opts::DumpHeaders) - outs() << "NumDirectoryBlocks: " << NumDirectoryBlocks << '\n'; - - // The block map, as we understand it, is a block which consists of a list of - // block numbers. - // It is unclear what would happen if the number of blocks couldn't fit on a - // single block. - if (NumDirectoryBlocks > SB->BlockSize / sizeof(support::ulittle32_t)) - Error(std::make_error_code(std::errc::illegal_byte_sequence)); + outs() << "NumDirectoryBlocks: " << File.getNumDirectoryBlocks() << '\n'; - uint64_t BlockMapOffset = (uint64_t)SB->BlockMapAddr * SB->BlockSize; if (opts::DumpHeaders) - outs() << "BlockMapOffset: " << BlockMapOffset << '\n'; + outs() << "BlockMapOffset: " << File.getBlockMapOffset() << '\n'; // The directory is not contiguous. Instead, the block map contains a // contiguous list of block numbers whose contents, when concatenated in // order, make up the directory. - auto DirectoryBlocks = - makeArrayRef(reinterpret_cast<const support::ulittle32_t *>( - M.getBufferStart() + BlockMapOffset), - NumDirectoryBlocks); - Error(checkOffset(M, DirectoryBlocks)); + auto DirectoryBlocks = File.getDirectoryBlockArray(); if (opts::DumpHeaders) { outs() << "DirectoryBlocks: ["; - for (const support::ulittle32_t &DirectoryBlockAddr : DirectoryBlocks) { + for (const auto &DirectoryBlockAddr : DirectoryBlocks) { if (&DirectoryBlockAddr != &DirectoryBlocks.front()) outs() << ", "; outs() << DirectoryBlockAddr; @@ -339,96 +188,23 @@ static void dumpStructure(MemoryBufferRef M) { outs() << "]\n"; } - bool SeenNumStreams = false; - uint32_t NumStreams = 0; - uint32_t StreamIdx = 0; - uint64_t DirectoryBytesRead = 0; - PDBStructureContext Ctx; - Ctx.SB = SB; - Ctx.M = M; - // The structure of the directory is as follows: - // struct PDBDirectory { - // uint32_t NumStreams; - // uint32_t StreamSizes[NumStreams]; - // uint32_t StreamMap[NumStreams][]; - // }; - // - // Empty streams don't consume entries in the StreamMap. - for (uint32_t DirectoryBlockAddr : DirectoryBlocks) { - uint64_t DirectoryBlockOffset = - blockToOffset(DirectoryBlockAddr, SB->BlockSize); - auto DirectoryBlock = - makeArrayRef(reinterpret_cast<const support::ulittle32_t *>( - M.getBufferStart() + DirectoryBlockOffset), - SB->BlockSize / sizeof(support::ulittle32_t)); - Error(checkOffset(M, DirectoryBlock)); - - // We read data out of the directory four bytes at a time. Depending on - // where we are in the directory, the contents may be: the number of streams - // in the directory, a stream's size, or a block in the stream map. - for (uint32_t Data : DirectoryBlock) { - // Don't read beyond the end of the directory. - if (DirectoryBytesRead == SB->NumDirectoryBytes) - break; - - DirectoryBytesRead += sizeof(Data); - - // This data must be the number of streams if we haven't seen it yet. - if (!SeenNumStreams) { - NumStreams = Data; - SeenNumStreams = true; - continue; - } - // This data must be a stream size if we have not seen them all yet. - if (Ctx.StreamSizes.size() < NumStreams) { - // It seems like some streams have their set to -1 when their contents - // are not present. Treat them like empty streams for now. - if (Data == UINT32_MAX) - Ctx.StreamSizes.push_back(0); - else - Ctx.StreamSizes.push_back(Data); - continue; - } - - // This data must be a stream block number if we have seen all of the - // stream sizes. - std::vector<uint32_t> *StreamBlocks = nullptr; - // Figure out which stream this block number belongs to. - while (StreamIdx < NumStreams) { - uint64_t NumExpectedStreamBlocks = - bytesToBlocks(Ctx.StreamSizes[StreamIdx], SB->BlockSize); - StreamBlocks = &Ctx.StreamMap[StreamIdx]; - if (NumExpectedStreamBlocks > StreamBlocks->size()) - break; - ++StreamIdx; - } - // It seems this block doesn't belong to any stream? The stream is either - // corrupt or something more mysterious is going on. - if (StreamIdx == NumStreams) - Error(std::make_error_code(std::errc::illegal_byte_sequence)); - - StreamBlocks->push_back(Data); - } - } - - // We should have read exactly SB->NumDirectoryBytes bytes. - assert(DirectoryBytesRead == SB->NumDirectoryBytes); - if (opts::DumpHeaders) - outs() << "NumStreams: " << NumStreams << '\n'; - if (opts::DumpStreamSizes) - for (uint32_t StreamIdx = 0; StreamIdx < NumStreams; ++StreamIdx) + outs() << "NumStreams: " << File.getNumStreams() << '\n'; + uint32_t StreamCount = File.getNumStreams(); + if (opts::DumpStreamSizes) { + for (uint32_t StreamIdx = 0; StreamIdx < StreamCount; ++StreamIdx) outs() << "StreamSizes[" << StreamIdx - << "]: " << Ctx.StreamSizes[StreamIdx] << '\n'; + << "]: " << File.getStreamByteSize(StreamIdx) << '\n'; + } if (opts::DumpStreamBlocks) { - for (uint32_t StreamIdx = 0; StreamIdx < NumStreams; ++StreamIdx) { + for (uint32_t StreamIdx = 0; StreamIdx < StreamCount; ++StreamIdx) { outs() << "StreamBlocks[" << StreamIdx << "]: ["; - std::vector<uint32_t> &StreamBlocks = Ctx.StreamMap[StreamIdx]; - for (uint32_t &StreamBlock : StreamBlocks) { - if (&StreamBlock != &StreamBlocks.front()) + auto StreamBlocks = File.getStreamBlockList(StreamIdx); + for (size_t i = 0; i < StreamBlocks.size(); ++i) { + if (i != 0) outs() << ", "; - outs() << StreamBlock; + outs() << StreamBlocks[i]; } outs() << "]\n"; } @@ -437,103 +213,107 @@ static void dumpStructure(MemoryBufferRef M) { StringRef DumpStreamStr = opts::DumpStreamData; uint32_t DumpStreamNum; if (!DumpStreamStr.getAsInteger(/*Radix=*/0U, DumpStreamNum) && - DumpStreamNum < NumStreams) { + DumpStreamNum < StreamCount) { uint32_t StreamBytesRead = 0; - uint32_t StreamSize = Ctx.StreamSizes[DumpStreamNum]; - std::vector<uint32_t> &StreamBlocks = Ctx.StreamMap[DumpStreamNum]; - for (uint32_t &StreamBlockAddr : StreamBlocks) { - uint64_t StreamBlockOffset = blockToOffset(StreamBlockAddr, SB->BlockSize); + uint32_t StreamSize = File.getStreamByteSize(DumpStreamNum); + auto StreamBlocks = File.getStreamBlockList(DumpStreamNum); + + for (uint32_t StreamBlockAddr : StreamBlocks) { uint32_t BytesLeftToReadInStream = StreamSize - StreamBytesRead; if (BytesLeftToReadInStream == 0) break; uint32_t BytesToReadInBlock = std::min( - BytesLeftToReadInStream, static_cast<uint32_t>(SB->BlockSize)); + BytesLeftToReadInStream, static_cast<uint32_t>(File.getBlockSize())); auto StreamBlockData = - StringRef(M.getBufferStart() + StreamBlockOffset, BytesToReadInBlock); - Error(checkOffset(M, StreamBlockData)); + File.getBlockData(StreamBlockAddr, BytesToReadInBlock); outs() << StreamBlockData; StreamBytesRead += StreamBlockData.size(); } } - uint32_t Offset = 0; - // Stream 1 starts with the following header: // uint32_t Version; // uint32_t Signature; // uint32_t Age; // GUID Guid; - auto Version = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); - outs() << "Version: " << Version << '\n'; + PDBStream Stream1(1, File); + uint32_t Version; + uint32_t Signature; + uint32_t Age; + PDB_UniqueId Guid; + Stream1.readInteger(Version); + outs() << "Version: " << Version << '\n'; // PDB's with versions before PDBImpvVC70 might not have the Guid field, we // don't support them. if (Version < 20000404) - Error(std::make_error_code(std::errc::not_supported)); + reportError("", std::make_error_code(std::errc::not_supported)); // This appears to be the time the PDB was last opened by an MSVC tool? // It is definitely a timestamp of some sort. - auto Signature = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + Stream1.readInteger(Signature); outs() << "Signature: "; outs().write_hex(Signature) << '\n'; // This appears to be a number which is used to determine that the PDB is kept // in sync with the EXE. - auto Age = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + Stream1.readInteger(Age); outs() << "Age: " << Age << '\n'; // I'm not sure what the purpose of the GUID is. - using GuidTy = char[16]; - const GuidTy *Guid; - Ctx.getObject(Guid, /*PDBStream=*/1, Offset); - outs() << "Guid: "; - for (char C : *Guid) - outs().write_hex(C & 0xff) << ' '; - outs() << '\n'; + Stream1.readObject(&Guid); + outs() << "Guid: " << Guid << '\n'; // This is some sort of weird string-set/hash table encoded in the stream. // It starts with the number of bytes in the table. - auto NumberOfBytes = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + uint32_t NumberOfBytes; + Stream1.readInteger(NumberOfBytes); outs() << "NumberOfBytes: " << NumberOfBytes << '\n'; // Following that field is the starting offset of strings in the name table. - uint32_t StringsOffset = Offset; - Offset += NumberOfBytes; + uint32_t StringsOffset = Stream1.getOffset(); + Stream1.setOffset(StringsOffset + NumberOfBytes); // This appears to be equivalent to the total number of strings *actually* // in the name table. - auto HashSize = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + uint32_t HashSize; + Stream1.readInteger(HashSize); outs() << "HashSize: " << HashSize << '\n'; // This appears to be an upper bound on the number of strings in the name // table. - auto MaxNumberOfStrings = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + uint32_t MaxNumberOfStrings; + Stream1.readInteger(MaxNumberOfStrings); outs() << "MaxNumberOfStrings: " << MaxNumberOfStrings << '\n'; // This appears to be a hash table which uses bitfields to determine whether // or not a bucket is 'present'. - auto NumPresentWords = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + uint32_t NumPresentWords; + Stream1.readInteger(NumPresentWords); outs() << "NumPresentWords: " << NumPresentWords << '\n'; // Store all the 'present' bits in a vector for later processing. SmallVector<uint32_t, 1> PresentWords; for (uint32_t I = 0; I != NumPresentWords; ++I) { - auto Word = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + uint32_t Word; + Stream1.readInteger(Word); PresentWords.push_back(Word); outs() << "Word: " << Word << '\n'; } // This appears to be a hash table which uses bitfields to determine whether // or not a bucket is 'deleted'. - auto NumDeletedWords = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + uint32_t NumDeletedWords; + Stream1.readInteger(NumDeletedWords); outs() << "NumDeletedWords: " << NumDeletedWords << '\n'; // Store all the 'deleted' bits in a vector for later processing. SmallVector<uint32_t, 1> DeletedWords; for (uint32_t I = 0; I != NumDeletedWords; ++I) { - auto Word = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + uint32_t Word; + Stream1.readInteger(Word); DeletedWords.push_back(Word); outs() << "Word: " << Word << '\n'; } @@ -554,26 +334,25 @@ static void dumpStructure(MemoryBufferRef M) { // This appears to be an offset relative to the start of the strings. // It tells us where the null-terminated string begins. - auto NameOffset = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + uint32_t NameOffset; + Stream1.readInteger(NameOffset); outs() << "NameOffset: " << NameOffset << '\n'; // This appears to be a stream number into the stream directory. - auto NameIndex = Ctx.getInt<uint32_t>(/*PDBStream=*/1, Offset); + uint32_t NameIndex; + Stream1.readInteger(NameIndex); outs() << "NameIndex: " << NameIndex << '\n'; // Compute the offset of the start of the string relative to the stream. uint32_t StringOffset = StringsOffset + NameOffset; - + uint32_t OldOffset = Stream1.getOffset(); // Pump out our c-string from the stream. - SmallString<8> Str; - char C; - do { - C = Ctx.getObject<char>(/*PDBStream=*/1, StringOffset); - if (C != '\0') - Str += C; - } while (C != '\0'); + std::string Str; + Stream1.setOffset(StringOffset); + Stream1.readZeroString(Str); outs() << "String: " << Str << "\n\n"; + Stream1.setOffset(OldOffset); // Add this to a string-map from name to stream number. NamedStreams.insert({Str, NameIndex}); } @@ -581,45 +360,38 @@ static void dumpStructure(MemoryBufferRef M) { // Let's try to dump out the named stream "/names". auto NameI = NamedStreams.find("/names"); if (NameI != NamedStreams.end()) { - uint32_t NameStream = NameI->second; - outs() << "NameStream: " << NameStream << '\n'; - - uint32_t NameStreamOffset = 0; + PDBStream NameStream(NameI->second, File); + outs() << "NameStream: " << NameI->second << '\n'; // The name stream appears to start with a signature and version. - auto NameStreamSignature = - Ctx.getInt<uint32_t>(/*PDBStream=*/NameStream, NameStreamOffset); + uint32_t NameStreamSignature; + NameStream.readInteger(NameStreamSignature); outs() << "NameStreamSignature: "; outs().write_hex(NameStreamSignature) << '\n'; - auto NameStreamVersion = - Ctx.getInt<uint32_t>(/*PDBStream=*/NameStream, NameStreamOffset); + uint32_t NameStreamVersion; + NameStream.readInteger(NameStreamVersion); outs() << "NameStreamVersion: " << NameStreamVersion << '\n'; // We only support this particular version of the name stream. if (NameStreamSignature != 0xeffeeffe || NameStreamVersion != 1) - Error(std::make_error_code(std::errc::not_supported)); + reportError("", std::make_error_code(std::errc::not_supported)); } } static void dumpInput(StringRef Path) { + std::unique_ptr<IPDBSession> Session; if (opts::DumpHeaders || !opts::DumpStreamData.empty()) { - ErrorOr<std::unique_ptr<MemoryBuffer>> ErrorOrBuffer = - MemoryBuffer::getFileOrSTDIN(Path, /*FileSize=*/-1, - /*RequiresNullTerminator=*/false); - - if (std::error_code EC = ErrorOrBuffer.getError()) - reportError(Path, EC); - - std::unique_ptr<MemoryBuffer> &Buffer = ErrorOrBuffer.get(); - - dumpStructure(Buffer->getMemBufferRef()); + PDB_ErrorCode Error = loadDataForPDB(PDB_ReaderType::Raw, Path, Session); + if (Error == PDB_ErrorCode::Success) { + RawSession *RS = static_cast<RawSession *>(Session.get()); + dumpStructure(*RS); + } outs().flush(); return; } - std::unique_ptr<IPDBSession> Session; PDB_ErrorCode Error = loadDataForPDB(PDB_ReaderType::DIA, Path, Session); switch (Error) { case PDB_ErrorCode::Success: |