#include "llvm/DebugInfo/PDB/Native/LinePrinter.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h"
#include "llvm/DebugInfo/MSF/MSFCommon.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
#include "llvm/DebugInfo/PDB/Native/InputFile.h"
#include "llvm/DebugInfo/PDB/Native/NativeSession.h"
#include "llvm/DebugInfo/PDB/Native/PDBFile.h"
#include "llvm/DebugInfo/PDB/UDTLayout.h"
#include "llvm/Object/COFF.h"
#include "llvm/Support/BinaryStreamReader.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatAdapters.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Regex.h"
#include <algorithm>
usingnamespacellvm;
usingnamespacellvm::msf;
usingnamespacellvm::pdb;
namespace {
bool IsItemExcluded(llvm::StringRef Item,
std::list<llvm::Regex> &IncludeFilters,
std::list<llvm::Regex> &ExcludeFilters) { … }
}
usingnamespacellvm;
LinePrinter::LinePrinter(int Indent, bool UseColor, llvm::raw_ostream &Stream,
const FilterOptions &Filters)
: … { … }
void LinePrinter::Indent(uint32_t Amount) { … }
void LinePrinter::Unindent(uint32_t Amount) { … }
void LinePrinter::NewLine() { … }
void LinePrinter::print(const Twine &T) { … }
void LinePrinter::printLine(const Twine &T) { … }
bool LinePrinter::IsClassExcluded(const ClassLayout &Class) { … }
void LinePrinter::formatBinary(StringRef Label, ArrayRef<uint8_t> Data,
uint64_t StartOffset) { … }
void LinePrinter::formatBinary(StringRef Label, ArrayRef<uint8_t> Data,
uint64_t Base, uint64_t StartOffset) { … }
namespace {
struct Run { … };
}
static std::vector<Run> computeBlockRuns(uint32_t BlockSize,
const msf::MSFStreamLayout &Layout) { … }
static std::pair<Run, uint64_t> findRun(uint64_t Offset, ArrayRef<Run> Runs) { … }
void LinePrinter::formatMsfStreamData(StringRef Label, PDBFile &File,
uint32_t StreamIdx,
StringRef StreamPurpose, uint64_t Offset,
uint64_t Size) { … }
void LinePrinter::formatMsfStreamData(StringRef Label, PDBFile &File,
const msf::MSFStreamLayout &Stream,
BinarySubstreamRef Substream) { … }
void LinePrinter::formatMsfStreamBlocks(
PDBFile &File, const msf::MSFStreamLayout &StreamLayout) { … }
bool LinePrinter::IsTypeExcluded(llvm::StringRef TypeName, uint64_t Size) { … }
bool LinePrinter::IsSymbolExcluded(llvm::StringRef SymbolName) { … }
bool LinePrinter::IsCompilandExcluded(llvm::StringRef CompilandName) { … }
WithColor::WithColor(LinePrinter &P, PDB_ColorItem C)
: … { … }
WithColor::~WithColor() { … }
void WithColor::applyColor(PDB_ColorItem C) { … }