LLVM 22.0.0git
llvm::logicalview::LVReader Class Reference

The logical reader owns of all the logical elements created during the debug information parsing. More...

#include "llvm/DebugInfo/LogicalView/Core/LVReader.h"

Inheritance diagram for llvm::logicalview::LVReader:
[legend]

Public Member Functions

 LVReader ()=delete
 LVReader (StringRef InputFilename, StringRef FileFormatName, ScopedPrinter &W, LVBinaryType BinaryType=LVBinaryType::NONE)
 LVReader (const LVReader &)=delete
LVReaderoperator= (const LVReader &)=delete
virtual ~LVReader ()=default
LVOperationcreateOperation (LVSmall OpCode, ArrayRef< LVUnsigned > Operands)
StringRef getFilename (LVObject *Object, size_t Index) const
StringRef getFilename () const
void setFilename (std::string Name)
StringRef getFileFormatName () const
raw_ostreamoutputStream ()
bool isBinaryTypeNone () const
bool isBinaryTypeELF () const
bool isBinaryTypeCOFF () const
LVScopeCompileUnitgetCompileUnit () const
void setCompileUnit (LVScope *Scope)
void setCompileUnitCPUType (codeview::CPUType Type)
codeview::CPUType getCompileUnitCPUType ()
LVScopeRootgetScopesRoot () const
Error doPrint ()
Error doLoad ()
virtual std::string getRegisterName (LVSmall Opcode, ArrayRef< uint64_t > Operands)
LVSectionIndex getDotTextSectionIndex () const
virtual LVSectionIndex getSectionIndex (LVScope *Scope)
virtual bool isSystemEntry (LVElement *Element, StringRef Name={}) const
LVSplitContextgetSplitContext ()
void notifyAddedElement (LVLine *Line)
void notifyAddedElement (LVScope *Scope)
void notifyAddedElement (LVSymbol *Symbol)
void notifyAddedElement (LVType *Type)
const LVLinesgetLines () const
const LVScopesgetScopes () const
const LVSymbolsgetSymbols () const
const LVTypesgetTypes () const
bool doPrintLine (const LVLine *Line) const
bool doPrintLocation (const LVLocation *Location) const
bool doPrintScope (const LVScope *Scope) const
bool doPrintSymbol (const LVSymbol *Symbol) const
bool doPrintType (const LVType *Type) const
void print (raw_ostream &OS) const
virtual void printRecords (raw_ostream &OS) const
void dump () const

Static Public Member Functions

static LVReadergetInstance ()
static void setInstance (LVReader *Reader)

Protected Member Functions

void addSectionRange (LVSectionIndex SectionIndex, LVScope *Scope)
void addSectionRange (LVSectionIndex SectionIndex, LVScope *Scope, LVAddress LowerAddress, LVAddress UpperAddress)
LVRangegetSectionRanges (LVSectionIndex SectionIndex)
void addCompileUnitOffset (LVOffset Offset, LVScopeCompileUnit *CompileUnit)
LVElementcreateElement (dwarf::Tag Tag)
virtual Error createScopes ()
std::string createAlternativePath (StringRef From)
virtual Error printScopes ()
virtual Error printMatchedElements (bool UseMatchedElements)
virtual void sortScopes ()

Protected Attributes

LVElementCurrentElement = nullptr
LVScopeCurrentScope = nullptr
LVSymbolCurrentSymbol = nullptr
LVTypeCurrentType = nullptr
LVLineCurrentLine = nullptr
LVOffset CurrentOffset = 0
std::vector< LVAddressRangeCurrentRanges
LVScopeRootRoot = nullptr
std::string InputFilename
std::string FileFormatName
ScopedPrinterW
raw_ostreamOS
LVScopeCompileUnitCompileUnit = nullptr
LVSectionIndex DotTextSectionIndex = UndefinedSectionIndex

Detailed Description

The logical reader owns of all the logical elements created during the debug information parsing.

For its creation it uses a specific bump allocator for each type of logical element.

Definition at line 61 of file LVReader.h.

Constructor & Destructor Documentation

◆ LVReader() [1/3]

llvm::logicalview::LVReader::LVReader ( )
delete

◆ LVReader() [2/3]

llvm::logicalview::LVReader::LVReader ( StringRef InputFilename,
StringRef FileFormatName,
ScopedPrinter & W,
LVBinaryType BinaryType = LVBinaryType::NONE )
inline

◆ LVReader() [3/3]

llvm::logicalview::LVReader::LVReader ( const LVReader & )
delete

References LVReader().

◆ ~LVReader()

virtual llvm::logicalview::LVReader::~LVReader ( )
virtualdefault

Member Function Documentation

◆ addCompileUnitOffset()

void llvm::logicalview::LVReader::addCompileUnitOffset ( LVOffset Offset,
LVScopeCompileUnit * CompileUnit )
inlineprotected

Definition at line 160 of file LVReader.h.

References CompileUnit, and llvm::logicalview::Offset.

◆ addSectionRange() [1/2]

void LVReader::addSectionRange ( LVSectionIndex SectionIndex,
LVScope * Scope )
protected

◆ addSectionRange() [2/2]

void LVReader::addSectionRange ( LVSectionIndex SectionIndex,
LVScope * Scope,
LVAddress LowerAddress,
LVAddress UpperAddress )
protected

Definition at line 202 of file LVReader.cpp.

References llvm::logicalview::LVRange::addEntry(), and getSectionRanges().

◆ createAlternativePath()

std::string llvm::logicalview::LVReader::createAlternativePath ( StringRef From)
inlineprotected

◆ createElement()

◆ createOperation()

LVOperation * llvm::logicalview::LVReader::createOperation ( LVSmall OpCode,
ArrayRef< LVUnsigned > Operands )
inline

Definition at line 258 of file LVReader.h.

References Operands.

◆ createScopes()

virtual Error llvm::logicalview::LVReader::createScopes ( )
inlineprotectedvirtual

◆ doLoad()

◆ doPrint()

◆ doPrintLine()

bool llvm::logicalview::LVReader::doPrintLine ( const LVLine * Line) const
inline

Definition at line 333 of file LVReader.h.

References llvm::logicalview::patterns().

◆ doPrintLocation()

bool llvm::logicalview::LVReader::doPrintLocation ( const LVLocation * Location) const
inline

Definition at line 336 of file LVReader.h.

References llvm::logicalview::Location, and llvm::logicalview::patterns().

◆ doPrintScope()

bool llvm::logicalview::LVReader::doPrintScope ( const LVScope * Scope) const
inline

Definition at line 339 of file LVReader.h.

References llvm::logicalview::patterns().

◆ doPrintSymbol()

bool llvm::logicalview::LVReader::doPrintSymbol ( const LVSymbol * Symbol) const
inline

Definition at line 342 of file LVReader.h.

References llvm::logicalview::patterns().

◆ doPrintType()

bool llvm::logicalview::LVReader::doPrintType ( const LVType * Type) const
inline

Definition at line 345 of file LVReader.h.

References llvm::logicalview::patterns().

◆ dump()

void llvm::logicalview::LVReader::dump ( ) const
inline

Definition at line 356 of file LVReader.h.

References llvm::dbgs(), and print().

◆ getCompileUnit()

LVScopeCompileUnit * llvm::logicalview::LVReader::getCompileUnit ( ) const
inline

Definition at line 273 of file LVReader.h.

References CompileUnit.

Referenced by llvm::logicalview::getReaderCompileUnit().

◆ getCompileUnitCPUType()

codeview::CPUType llvm::logicalview::LVReader::getCompileUnitCPUType ( )
inline

Definition at line 281 of file LVReader.h.

References CompileUnit.

Referenced by llvm::logicalview::LVCodeViewReader::getRegisterName().

◆ getDotTextSectionIndex()

LVSectionIndex llvm::logicalview::LVReader::getDotTextSectionIndex ( ) const
inline

◆ getFileFormatName()

StringRef llvm::logicalview::LVReader::getFileFormatName ( ) const
inline

Definition at line 265 of file LVReader.h.

References FileFormatName.

◆ getFilename() [1/2]

StringRef llvm::logicalview::LVReader::getFilename ( ) const
inline

Definition at line 263 of file LVReader.h.

References InputFilename.

Referenced by llvm::logicalview::LVDWARFReader::createScopes().

◆ getFilename() [2/2]

StringRef LVReader::getFilename ( LVObject * Object,
size_t Index ) const

Definition at line 182 of file LVReader.cpp.

References CompileUnit.

Referenced by llvm::logicalview::LVElement::setFile().

◆ getInstance()

LVReader & LVReader::getInstance ( )
static

Definition at line 152 of file LVReader.cpp.

References CurrentReader, llvm_unreachable, LVReader(), and llvm::outs().

Referenced by llvm::logicalview::getReader().

◆ getLines()

const LVLines & llvm::logicalview::LVReader::getLines ( ) const
inline

Definition at line 327 of file LVReader.h.

◆ getRegisterName()

virtual std::string llvm::logicalview::LVReader::getRegisterName ( LVSmall Opcode,
ArrayRef< uint64_t > Operands )
inlinevirtual

◆ getScopes()

const LVScopes & llvm::logicalview::LVReader::getScopes ( ) const
inline

Definition at line 328 of file LVReader.h.

◆ getScopesRoot()

LVScopeRoot * llvm::logicalview::LVReader::getScopesRoot ( ) const
inline

Definition at line 286 of file LVReader.h.

References Root.

Referenced by llvm::logicalview::LVCompare::execute().

◆ getSectionIndex()

virtual LVSectionIndex llvm::logicalview::LVReader::getSectionIndex ( LVScope * Scope)
inlinevirtual

Reimplemented in llvm::logicalview::LVBinaryReader.

Definition at line 298 of file LVReader.h.

References getDotTextSectionIndex().

Referenced by llvm::logicalview::LVElement::printLinkageName().

◆ getSectionRanges()

LVRange * LVReader::getSectionRanges ( LVSectionIndex SectionIndex)
protected

◆ getSplitContext()

LVSplitContext & llvm::logicalview::LVReader::getSplitContext ( )
inline

Definition at line 307 of file LVReader.h.

Referenced by llvm::logicalview::getReaderSplitContext().

◆ getSymbols()

const LVSymbols & llvm::logicalview::LVReader::getSymbols ( ) const
inline

Definition at line 329 of file LVReader.h.

◆ getTypes()

const LVTypes & llvm::logicalview::LVReader::getTypes ( ) const
inline

Definition at line 330 of file LVReader.h.

◆ isBinaryTypeCOFF()

bool llvm::logicalview::LVReader::isBinaryTypeCOFF ( ) const
inline

Definition at line 271 of file LVReader.h.

References llvm::logicalview::COFF.

◆ isBinaryTypeELF()

bool llvm::logicalview::LVReader::isBinaryTypeELF ( ) const
inline

Definition at line 270 of file LVReader.h.

References llvm::logicalview::ELF.

◆ isBinaryTypeNone()

bool llvm::logicalview::LVReader::isBinaryTypeNone ( ) const
inline

Definition at line 269 of file LVReader.h.

References llvm::logicalview::NONE.

◆ isSystemEntry()

virtual bool llvm::logicalview::LVReader::isSystemEntry ( LVElement * Element,
StringRef Name = {} ) const
inlinevirtual

◆ notifyAddedElement() [1/4]

◆ notifyAddedElement() [2/4]

void llvm::logicalview::LVReader::notifyAddedElement ( LVScope * Scope)
inline

Definition at line 314 of file LVReader.h.

References llvm::logicalview::options().

◆ notifyAddedElement() [3/4]

void llvm::logicalview::LVReader::notifyAddedElement ( LVSymbol * Symbol)
inline

Definition at line 318 of file LVReader.h.

References llvm::logicalview::options().

◆ notifyAddedElement() [4/4]

void llvm::logicalview::LVReader::notifyAddedElement ( LVType * Type)
inline

Definition at line 322 of file LVReader.h.

References llvm::logicalview::options().

◆ operator=()

LVReader & llvm::logicalview::LVReader::operator= ( const LVReader & )
delete

References LVReader().

◆ outputStream()

raw_ostream & llvm::logicalview::LVReader::outputStream ( )
inline

◆ print()

void LVReader::print ( raw_ostream & OS) const

Definition at line 549 of file LVReader.cpp.

References llvm::dbgs(), LLVM_DEBUG, and OS.

◆ printMatchedElements()

Error LVReader::printMatchedElements ( bool UseMatchedElements)
protectedvirtual

Definition at line 542 of file LVReader.cpp.

References OS, and Root.

Referenced by doPrint().

◆ printRecords()

virtual void llvm::logicalview::LVReader::printRecords ( raw_ostream & OS) const
inlinevirtual

Reimplemented in llvm::logicalview::LVCodeViewReader.

Definition at line 353 of file LVReader.h.

References OS.

Referenced by llvm::logicalview::LVScope::doPrint().

◆ printScopes()

Error LVReader::printScopes ( )
protectedvirtual

Definition at line 526 of file LVReader.cpp.

References llvm::logicalview::options(), OS, Root, and llvm::Error::success().

Referenced by doPrint().

◆ setCompileUnit()

◆ setCompileUnitCPUType()

void llvm::logicalview::LVReader::setCompileUnitCPUType ( codeview::CPUType Type)
inline

Definition at line 278 of file LVReader.h.

References CompileUnit.

◆ setFilename()

void llvm::logicalview::LVReader::setFilename ( std::string Name)
inline

Definition at line 264 of file LVReader.h.

References InputFilename, and llvm::logicalview::Name.

◆ setInstance()

void LVReader::setInstance ( LVReader * Reader)
static

Definition at line 158 of file LVReader.cpp.

References CurrentReader, and LVReader().

Referenced by doLoad(), doPrint(), and llvm::logicalview::LVCompare::execute().

◆ sortScopes()

virtual void llvm::logicalview::LVReader::sortScopes ( )
inlineprotectedvirtual

Reimplemented in llvm::logicalview::LVCodeViewReader, and llvm::logicalview::LVDWARFReader.

Definition at line 194 of file LVReader.h.

Referenced by doLoad().

Member Data Documentation

◆ CompileUnit

◆ CurrentElement

LVElement* llvm::logicalview::LVReader::CurrentElement = nullptr
protected

Definition at line 134 of file LVReader.h.

◆ CurrentLine

LVLine* llvm::logicalview::LVReader::CurrentLine = nullptr
protected

Definition at line 138 of file LVReader.h.

◆ CurrentOffset

LVOffset llvm::logicalview::LVReader::CurrentOffset = 0
protected

Definition at line 139 of file LVReader.h.

Referenced by createElement().

◆ CurrentRanges

std::vector<LVAddressRange> llvm::logicalview::LVReader::CurrentRanges
protected

Definition at line 142 of file LVReader.h.

Referenced by createElement().

◆ CurrentScope

LVScope* llvm::logicalview::LVReader::CurrentScope = nullptr
protected

Definition at line 135 of file LVReader.h.

Referenced by createElement().

◆ CurrentSymbol

LVSymbol* llvm::logicalview::LVReader::CurrentSymbol = nullptr
protected

Definition at line 136 of file LVReader.h.

Referenced by createElement().

◆ CurrentType

LVType* llvm::logicalview::LVReader::CurrentType = nullptr
protected

Definition at line 137 of file LVReader.h.

Referenced by createElement().

◆ DotTextSectionIndex

◆ FileFormatName

◆ InputFilename

std::string llvm::logicalview::LVReader::InputFilename
protected

Definition at line 145 of file LVReader.h.

Referenced by createAlternativePath(), getFilename(), LVReader(), and setFilename().

◆ OS

◆ Root

◆ W


The documentation for this class was generated from the following files: