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

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

Inheritance diagram for llvm::logicalview::LVBinaryReader:
[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 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, StringRef TheCPU)
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 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 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

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

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]

◆ LVBinaryReader() [2/3]

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

◆ LVBinaryReader() [3/3]

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

References LVBinaryReader().

◆ ~LVBinaryReader()

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

Member Function Documentation

◆ addInlineeLines()

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

Definition at line 197 of file LVBinaryReader.h.

◆ addToSymbolTable() [1/2]

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

Definition at line 125 of file LVBinaryReader.cpp.

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

◆ addToSymbolTable() [2/2]

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

Definition at line 121 of file LVBinaryReader.cpp.

References llvm::codeview::Function, and llvm::logicalview::Name.

Referenced by includeInlineeLines().

◆ createInstructions() [1/3]

◆ createInstructions() [2/3]

◆ createInstructions() [3/3]

◆ dump()

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

Definition at line 226 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

◆ getSymbolTableAddress()

LVAddress LVBinaryReader::getSymbolTableAddress ( StringRef Name)

Definition at line 137 of file LVBinaryReader.cpp.

References llvm::logicalview::Name.

◆ getSymbolTableEntry()

const LVSymbolTableEntry & LVBinaryReader::getSymbolTableEntry ( StringRef Name)

Definition at line 134 of file LVBinaryReader.cpp.

References llvm::logicalview::Name.

◆ getSymbolTableIndex()

LVSectionIndex LVBinaryReader::getSymbolTableIndex ( StringRef Name)

Definition at line 140 of file LVBinaryReader.cpp.

References llvm::logicalview::Name.

Referenced by createInstructions(), and getSectionIndex().

◆ getSymbolTableIsComdat()

bool LVBinaryReader::getSymbolTableIsComdat ( StringRef Name)

Definition at line 143 of file LVBinaryReader.cpp.

References llvm::logicalview::Name.

◆ includeInlineeLines()

◆ linearAddress()

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

Definition at line 202 of file LVBinaryReader.h.

References llvm::logicalview::Offset.

◆ loadGenericTargetInfo()

◆ mapRangeAddress() [1/2]

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

Definition at line 165 of file LVBinaryReader.h.

Referenced by mapVirtualAddress(), and mapVirtualAddress().

◆ mapRangeAddress() [2/2]

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

Definition at line 166 of file LVBinaryReader.h.

◆ mapVirtualAddress() [1/2]

◆ mapVirtualAddress() [2/2]

◆ operator=()

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

References LVBinaryReader().

◆ print()

void LVBinaryReader::print ( raw_ostream & OS) const

Definition at line 950 of file LVBinaryReader.cpp.

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

Referenced by dump().

◆ processLines() [1/2]

◆ processLines() [2/2]

◆ updateSymbolTable()

LVSectionIndex LVBinaryReader::updateSymbolTable ( LVScope * Function)

Definition at line 130 of file LVBinaryReader.cpp.

References llvm::codeview::Function.

Member Data Documentation

◆ CULines

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

◆ MAI

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

Definition at line 112 of file LVBinaryReader.h.

Referenced by loadGenericTargetInfo().

◆ MC

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

Definition at line 116 of file LVBinaryReader.h.

Referenced by loadGenericTargetInfo().

◆ MD

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

Definition at line 115 of file LVBinaryReader.h.

Referenced by createInstructions(), and loadGenericTargetInfo().

◆ MII

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

Definition at line 114 of file LVBinaryReader.h.

Referenced by loadGenericTargetInfo().

◆ MIP

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

Definition at line 117 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 113 of file LVBinaryReader.h.

Referenced by createInstructions(), and loadGenericTargetInfo().

◆ WasmCodeSectionOffset

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

Definition at line 159 of file LVBinaryReader.h.

Referenced by mapVirtualAddress().


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