LLVM 19.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::logicalview::LVBinaryReader Class Reference

#include "llvm/DebugInfo/LogicalView/Readers/LVBinaryReader.h"

Inheritance diagram for llvm::logicalview::LVBinaryReader:
Inheritance graph
[legend]

Public Member Functions

 LVBinaryReader ()=delete
 
 LVBinaryReader (StringRef Filename, StringRef FileFormatName, ScopedPrinter &W, LVBinaryType BinaryType)
 
 LVBinaryReader (const LVBinaryReader &)=delete
 
LVBinaryReaderoperator= (const LVBinaryReader &)=delete
 
virtual ~LVBinaryReader ()=default
 
void addInlineeLines (LVScope *Scope, LVLines &Lines)
 
LVAddress linearAddress (uint16_t Segment, uint32_t Offset, LVAddress Addendum=0)
 
void addToSymbolTable (StringRef Name, LVScope *Function, LVSectionIndex SectionIndex=0)
 
void addToSymbolTable (StringRef Name, LVAddress Address, LVSectionIndex SectionIndex, bool IsComdat)
 
LVSectionIndex updateSymbolTable (LVScope *Function)
 
const LVSymbolTableEntrygetSymbolTableEntry (StringRef Name)
 
LVAddress getSymbolTableAddress (StringRef Name)
 
LVSectionIndex getSymbolTableIndex (StringRef Name)
 
bool getSymbolTableIsComdat (StringRef Name)
 
LVSectionIndex getSectionIndex (LVScope *Scope) override
 
void print (raw_ostream &OS) const
 
void dump () const
 
- Public Member Functions inherited from llvm::logicalview::LVReader
 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
 

Protected Member Functions

Error loadGenericTargetInfo (StringRef TheTriple, StringRef TheFeatures)
 
virtual void mapRangeAddress (const object::ObjectFile &Obj)
 
virtual void mapRangeAddress (const object::ObjectFile &Obj, const object::SectionRef &Section, bool IsComdat)
 
void mapVirtualAddress (const object::ObjectFile &Obj)
 
void mapVirtualAddress (const object::COFFObjectFile &COFFObj)
 
Expected< std::pair< LVSectionIndex, object::SectionRef > > getSection (LVScope *Scope, LVAddress Address, LVSectionIndex SectionIndex)
 
void addSectionRange (LVSectionIndex SectionIndex, LVScope *Scope)
 
void addSectionRange (LVSectionIndex SectionIndex, LVScope *Scope, LVAddress LowerAddress, LVAddress UpperAddress)
 
LVRangegetSectionRanges (LVSectionIndex SectionIndex)
 
void includeInlineeLines (LVSectionIndex SectionIndex, LVScope *Function)
 
Error createInstructions ()
 
Error createInstructions (LVScope *Function, LVSectionIndex SectionIndex)
 
Error createInstructions (LVScope *Function, LVSectionIndex SectionIndex, const LVNameInfo &NameInfo)
 
void processLines (LVLines *DebugLines, LVSectionIndex SectionIndex)
 
void processLines (LVLines *DebugLines, LVSectionIndex SectionIndex, LVScope *Function)
 
- Protected Member Functions inherited from llvm::logicalview::LVReader
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

LVLines CULines
 
std::unique_ptr< const MCRegisterInfoMRI
 
std::unique_ptr< const MCAsmInfoMAI
 
std::unique_ptr< const MCSubtargetInfoSTI
 
std::unique_ptr< const MCInstrInfoMII
 
std::unique_ptr< const MCDisassemblerMD
 
std::unique_ptr< MCContextMC
 
std::unique_ptr< MCInstPrinterMIP
 
LVAddress WasmCodeSectionOffset = 0
 
- Protected Attributes inherited from llvm::logicalview::LVReader
LVScopeRootRoot = nullptr
 
std::string InputFilename
 
std::string FileFormatName
 
ScopedPrinterW
 
raw_ostreamOS
 
LVScopeCompileUnitCompileUnit = nullptr
 
LVSectionIndex DotTextSectionIndex = UndefinedSectionIndex
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::logicalview::LVReader
static LVReadergetInstance ()
 
static void setInstance (LVReader *Reader)
 

Detailed Description

Definition at line 69 of file LVBinaryReader.h.

Constructor & Destructor Documentation

◆ LVBinaryReader() [1/3]

llvm::logicalview::LVBinaryReader::LVBinaryReader ( )
delete

◆ LVBinaryReader() [2/3]

llvm::logicalview::LVBinaryReader::LVBinaryReader ( StringRef  Filename,
StringRef  FileFormatName,
ScopedPrinter W,
LVBinaryType  BinaryType 
)
inline

Definition at line 200 of file LVBinaryReader.h.

◆ LVBinaryReader() [3/3]

llvm::logicalview::LVBinaryReader::LVBinaryReader ( const LVBinaryReader )
delete

◆ ~LVBinaryReader()

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

Member Function Documentation

◆ addInlineeLines()

void llvm::logicalview::LVBinaryReader::addInlineeLines ( LVScope Scope,
LVLines Lines 
)
inline

◆ addSectionRange() [1/2]

void LVBinaryReader::addSectionRange ( LVSectionIndex  SectionIndex,
LVScope Scope 
)
protected

◆ addSectionRange() [2/2]

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

◆ addToSymbolTable() [1/2]

void LVBinaryReader::addToSymbolTable ( StringRef  Name,
LVAddress  Address,
LVSectionIndex  SectionIndex,
bool  IsComdat 
)

◆ addToSymbolTable() [2/2]

void LVBinaryReader::addToSymbolTable ( StringRef  Name,
LVScope Function,
LVSectionIndex  SectionIndex = 0 
)

◆ createInstructions() [1/3]

Error LVBinaryReader::createInstructions ( )
protected

◆ createInstructions() [2/3]

Error LVBinaryReader::createInstructions ( LVScope Function,
LVSectionIndex  SectionIndex 
)
protected

◆ createInstructions() [3/3]

Error LVBinaryReader::createInstructions ( LVScope Function,
LVSectionIndex  SectionIndex,
const LVNameInfo NameInfo 
)
protected

◆ dump()

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

Definition at line 236 of file LVBinaryReader.h.

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

◆ getSection()

Expected< std::pair< uint64_t, object::SectionRef > > LVBinaryReader::getSection ( LVScope Scope,
LVAddress  Address,
LVSectionIndex  SectionIndex 
)
protected

Definition at line 340 of file LVBinaryReader.cpp.

References llvm::Address, llvm::createStringError(), and llvm::invalid_argument.

Referenced by createInstructions().

◆ getSectionIndex()

LVSectionIndex llvm::logicalview::LVBinaryReader::getSectionIndex ( LVScope Scope)
inlineoverridevirtual

◆ getSectionRanges()

LVRange * LVBinaryReader::getSectionRanges ( LVSectionIndex  SectionIndex)
protected

◆ getSymbolTableAddress()

LVAddress LVBinaryReader::getSymbolTableAddress ( StringRef  Name)

◆ getSymbolTableEntry()

const LVSymbolTableEntry & LVBinaryReader::getSymbolTableEntry ( StringRef  Name)

◆ getSymbolTableIndex()

LVSectionIndex LVBinaryReader::getSymbolTableIndex ( StringRef  Name)

◆ getSymbolTableIsComdat()

bool LVBinaryReader::getSymbolTableIsComdat ( StringRef  Name)

◆ includeInlineeLines()

void LVBinaryReader::includeInlineeLines ( LVSectionIndex  SectionIndex,
LVScope Function 
)
protected

◆ linearAddress()

LVAddress llvm::logicalview::LVBinaryReader::linearAddress ( uint16_t  Segment,
uint32_t  Offset,
LVAddress  Addendum = 0 
)
inline

◆ loadGenericTargetInfo()

Error LVBinaryReader::loadGenericTargetInfo ( StringRef  TheTriple,
StringRef  TheFeatures 
)
protected

◆ mapRangeAddress() [1/2]

virtual void llvm::logicalview::LVBinaryReader::mapRangeAddress ( const object::ObjectFile Obj)
inlineprotectedvirtual

Definition at line 170 of file LVBinaryReader.h.

Referenced by mapVirtualAddress().

◆ mapRangeAddress() [2/2]

virtual void llvm::logicalview::LVBinaryReader::mapRangeAddress ( const object::ObjectFile Obj,
const object::SectionRef Section,
bool  IsComdat 
)
inlineprotectedvirtual

Definition at line 171 of file LVBinaryReader.h.

◆ mapVirtualAddress() [1/2]

void LVBinaryReader::mapVirtualAddress ( const object::COFFObjectFile COFFObj)
protected

◆ mapVirtualAddress() [2/2]

void LVBinaryReader::mapVirtualAddress ( const object::ObjectFile Obj)
protected

◆ operator=()

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

◆ print()

void LVBinaryReader::print ( raw_ostream OS) const

Definition at line 966 of file LVBinaryReader.cpp.

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

Referenced by dump().

◆ processLines() [1/2]

void LVBinaryReader::processLines ( LVLines DebugLines,
LVSectionIndex  SectionIndex 
)
protected

◆ processLines() [2/2]

void LVBinaryReader::processLines ( LVLines DebugLines,
LVSectionIndex  SectionIndex,
LVScope Function 
)
protected

◆ updateSymbolTable()

LVSectionIndex LVBinaryReader::updateSymbolTable ( LVScope Function)

Definition at line 130 of file LVBinaryReader.cpp.

References llvm::logicalview::LVSymbolTable::update().

Member Data Documentation

◆ CULines

LVLines llvm::logicalview::LVBinaryReader::CULines
protected

◆ MAI

std::unique_ptr<const MCAsmInfo> llvm::logicalview::LVBinaryReader::MAI
protected

Definition at line 118 of file LVBinaryReader.h.

Referenced by loadGenericTargetInfo().

◆ MC

std::unique_ptr<MCContext> llvm::logicalview::LVBinaryReader::MC
protected

Definition at line 122 of file LVBinaryReader.h.

Referenced by loadGenericTargetInfo().

◆ MD

std::unique_ptr<const MCDisassembler> llvm::logicalview::LVBinaryReader::MD
protected

Definition at line 121 of file LVBinaryReader.h.

Referenced by createInstructions(), and loadGenericTargetInfo().

◆ MII

std::unique_ptr<const MCInstrInfo> llvm::logicalview::LVBinaryReader::MII
protected

Definition at line 120 of file LVBinaryReader.h.

Referenced by loadGenericTargetInfo().

◆ MIP

std::unique_ptr<MCInstPrinter> llvm::logicalview::LVBinaryReader::MIP
protected

Definition at line 123 of file LVBinaryReader.h.

Referenced by createInstructions(), and loadGenericTargetInfo().

◆ MRI

std::unique_ptr<const MCRegisterInfo> llvm::logicalview::LVBinaryReader::MRI
protected

◆ STI

std::unique_ptr<const MCSubtargetInfo> llvm::logicalview::LVBinaryReader::STI
protected

Definition at line 119 of file LVBinaryReader.h.

Referenced by createInstructions(), and loadGenericTargetInfo().

◆ WasmCodeSectionOffset

LVAddress llvm::logicalview::LVBinaryReader::WasmCodeSectionOffset = 0
protected

Definition at line 165 of file LVBinaryReader.h.

Referenced by mapVirtualAddress().


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