LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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:
Inheritance graph
[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 addCompileUnitOffset (LVOffset Offset, LVScopeCompileUnit *CompileUnit)
 
virtual Error createScopes ()
 
std::string createAlternativePath (StringRef From)
 
virtual Error printScopes ()
 
virtual Error printMatchedElements (bool UseMatchedElements)
 
virtual void sortScopes ()
 

Protected Attributes

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 60 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

Definition at line 172 of file LVReader.h.

◆ LVReader() [3/3]

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

◆ ~LVReader()

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

Member Function Documentation

◆ addCompileUnitOffset()

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

Definition at line 136 of file LVReader.h.

References llvm::logicalview::Offset.

◆ createAlternativePath()

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

◆ createOperation()

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

Definition at line 231 of file LVReader.h.

References Operands.

◆ createScopes()

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

◆ doLoad()

Error LVReader::doLoad ( )

◆ doPrint()

Error LVReader::doPrint ( )

◆ doPrintLine()

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

◆ doPrintLocation()

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

◆ doPrintScope()

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

◆ doPrintSymbol()

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

◆ doPrintType()

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

◆ dump()

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

Definition at line 329 of file LVReader.h.

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

◆ getCompileUnit()

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

◆ getCompileUnitCPUType()

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

◆ getDotTextSectionIndex()

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

◆ getFileFormatName()

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

Definition at line 238 of file LVReader.h.

References FileFormatName.

◆ getFilename() [1/2]

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

Definition at line 236 of file LVReader.h.

References InputFilename.

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

◆ getFilename() [2/2]

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

Definition at line 184 of file LVReader.cpp.

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

◆ getInstance()

LVReader & LVReader::getInstance ( )
static

Definition at line 154 of file LVReader.cpp.

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

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

◆ getLines()

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

Definition at line 300 of file LVReader.h.

References llvm::codeview::Lines.

◆ 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 301 of file LVReader.h.

References llvm::logicalview::Scopes.

◆ getScopesRoot()

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

Definition at line 259 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 271 of file LVReader.h.

References getDotTextSectionIndex().

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

◆ getSplitContext()

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

Definition at line 280 of file LVReader.h.

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

◆ getSymbols()

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

Definition at line 302 of file LVReader.h.

◆ getTypes()

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

Definition at line 303 of file LVReader.h.

References llvm::logicalview::Types.

◆ isBinaryTypeCOFF()

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

Definition at line 244 of file LVReader.h.

References llvm::logicalview::COFF.

◆ isBinaryTypeELF()

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

Definition at line 243 of file LVReader.h.

References llvm::logicalview::ELF.

◆ isBinaryTypeNone()

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

Definition at line 242 of file LVReader.h.

References llvm::logicalview::NONE.

◆ isSystemEntry()

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

◆ notifyAddedElement() [1/4]

void llvm::logicalview::LVReader::notifyAddedElement ( LVLine Line)
inline

◆ notifyAddedElement() [2/4]

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

Definition at line 287 of file LVReader.h.

References llvm::logicalview::options(), and llvm::logicalview::Scopes.

◆ notifyAddedElement() [3/4]

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

Definition at line 291 of file LVReader.h.

References llvm::logicalview::options().

◆ notifyAddedElement() [4/4]

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

Definition at line 295 of file LVReader.h.

References llvm::logicalview::options(), and llvm::logicalview::Types.

◆ operator=()

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

◆ outputStream()

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

◆ print()

void LVReader::print ( raw_ostream OS) const

Definition at line 304 of file LVReader.cpp.

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

Referenced by dump().

◆ printMatchedElements()

Error LVReader::printMatchedElements ( bool  UseMatchedElements)
protectedvirtual

Definition at line 297 of file LVReader.cpp.

References llvm::logicalview::LVScopeRoot::doPrintMatches(), 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 326 of file LVReader.h.

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

◆ printScopes()

Error LVReader::printScopes ( )
protectedvirtual

◆ setCompileUnit()

void llvm::logicalview::LVReader::setCompileUnit ( LVScope Scope)
inline

◆ setCompileUnitCPUType()

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

Definition at line 251 of file LVReader.h.

Referenced by llvm::logicalview::LVSymbolVisitor::visitKnownRecord().

◆ setFilename()

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

Definition at line 237 of file LVReader.h.

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

◆ setInstance()

void LVReader::setInstance ( LVReader Reader)
static

Definition at line 160 of file LVReader.cpp.

References CurrentReader.

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 168 of file LVReader.h.

Referenced by doLoad().

Member Data Documentation

◆ CompileUnit

LVScopeCompileUnit* llvm::logicalview::LVReader::CompileUnit = nullptr
protected

Definition at line 130 of file LVReader.h.

Referenced by getCompileUnit(), and llvm::logicalview::LVBinaryReader::processLines().

◆ DotTextSectionIndex

LVSectionIndex llvm::logicalview::LVReader::DotTextSectionIndex = UndefinedSectionIndex
protected

◆ FileFormatName

std::string llvm::logicalview::LVReader::FileFormatName
protected

◆ InputFilename

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

Definition at line 126 of file LVReader.h.

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

◆ OS

raw_ostream& llvm::logicalview::LVReader::OS
protected

◆ Root

LVScopeRoot* llvm::logicalview::LVReader::Root = nullptr
protected

◆ W

ScopedPrinter& llvm::logicalview::LVReader::W
protected

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