LLVM  5.0.0
Public Member Functions | List of all members
llvm::DWARFContextInMemory Class Reference

DWARFContextInMemory is the simplest possible implementation of a DWARFContext. More...

#include "llvm/DebugInfo/DWARF/DWARFContext.h"

Inheritance diagram for llvm::DWARFContextInMemory:
[legend]
Collaboration diagram for llvm::DWARFContextInMemory:
[legend]

Public Member Functions

 DWARFContextInMemory (const object::ObjectFile &Obj, const LoadedObjectInfo *L=nullptr, function_ref< ErrorPolicy(Error)> HandleError=defaultErrorHandler)
 
 DWARFContextInMemory (const StringMap< std::unique_ptr< MemoryBuffer >> &Sections, uint8_t AddrSize, bool isLittleEndian=sys::IsLittleEndianHost)
 
StringRef getFileName () const override
 
bool isLittleEndian () const override
 
uint8_t getAddressSize () const override
 
const DWARFSection & getInfoSection () override
 
void forEachTypesSections (function_ref< void(DWARFSection &)> F) override
 
StringRef getAbbrevSection () override
 
const DWARFSection & getLocSection () override
 
StringRef getARangeSection () override
 
StringRef getDebugFrameSection () override
 
StringRef getEHFrameSection () override
 
const DWARFSection & getLineSection () override
 
StringRef getStringSection () override
 
const DWARFSection & getRangeSection () override
 
StringRef getMacinfoSection () override
 
StringRef getPubNamesSection () override
 
StringRef getPubTypesSection () override
 
StringRef getGnuPubNamesSection () override
 
StringRef getGnuPubTypesSection () override
 
const DWARFSection & getAppleNamesSection () override
 
const DWARFSection & getAppleTypesSection () override
 
const DWARFSection & getAppleNamespacesSection () override
 
const DWARFSection & getAppleObjCSection () override
 
const DWARFSection & getStringOffsetSection () override
 DWARF v5. More...
 
const DWARFSection & getInfoDWOSection () override
 
void forEachTypesDWOSections (function_ref< void(DWARFSection &)> F) override
 
StringRef getAbbrevDWOSection () override
 
const DWARFSection & getLineDWOSection () override
 
const DWARFSection & getLocDWOSection () override
 
StringRef getStringDWOSection () override
 
const DWARFSection & getStringOffsetDWOSection () override
 
const DWARFSection & getRangeDWOSection () override
 
const DWARFSection & getAddrSection () override
 
StringRef getCUIndexSection () override
 
StringRef getGdbIndexSection () override
 
StringRef getTUIndexSection () override
 
- Public Member Functions inherited from llvm::DWARFContext
 DWARFContext ()
 
 DWARFContext (DWARFContext &)=delete
 
DWARFContext & operator= (DWARFContext &)=delete
 
void dump (raw_ostream &OS, DIDumpOptions DumpOpts) override
 
bool verify (raw_ostream &OS, DIDumpType DumpType=DIDT_All) override
 
cu_iterator_range compile_units ()
 Get compile units in this context. More...
 
tu_section_iterator_range type_unit_sections ()
 Get type units in this context. More...
 
cu_iterator_range dwo_compile_units ()
 Get compile units in the DWO context. More...
 
tu_section_iterator_range dwo_type_unit_sections ()
 Get type units in the DWO context. More...
 
unsigned getNumCompileUnits ()
 Get the number of compile units in this context. More...
 
unsigned getNumTypeUnits ()
 Get the number of compile units in this context. More...
 
unsigned getNumDWOCompileUnits ()
 Get the number of compile units in the DWO context. More...
 
unsigned getNumDWOTypeUnits ()
 Get the number of compile units in the DWO context. More...
 
DWARFCompileUnit * getCompileUnitAtIndex (unsigned index)
 Get the compile unit at the specified index for this compile unit. More...
 
DWARFCompileUnit * getDWOCompileUnitAtIndex (unsigned index)
 Get the compile unit at the specified index for the DWO compile units. More...
 
DWARFCompileUnit * getDWOCompileUnitForHash (uint64_t Hash)
 
DWARFDie getDIEForOffset (uint32_t Offset)
 Get a DIE given an exact offset. More...
 
unsigned getMaxVersion () const
 
void setMaxVersionIfGreater (unsigned Version)
 
const DWARFUnitIndex & getCUIndex ()
 
DWARFGdbIndex & getGdbIndex ()
 
const DWARFUnitIndex & getTUIndex ()
 
const DWARFDebugAbbrev * getDebugAbbrev ()
 Get a pointer to the parsed DebugAbbrev object. More...
 
const DWARFDebugLoc * getDebugLoc ()
 Get a pointer to the parsed DebugLoc object. More...
 
const DWARFDebugAbbrev * getDebugAbbrevDWO ()
 Get a pointer to the parsed dwo abbreviations object. More...
 
const DWARFDebugLocDWO * getDebugLocDWO ()
 Get a pointer to the parsed DebugLoc object. More...
 
const DWARFDebugAranges * getDebugAranges ()
 Get a pointer to the parsed DebugAranges object. More...
 
const DWARFDebugFrame * getDebugFrame ()
 Get a pointer to the parsed frame information object. More...
 
const DWARFDebugFrame * getEHFrame ()
 Get a pointer to the parsed eh frame information object. More...
 
const DWARFDebugMacro * getDebugMacro ()
 Get a pointer to the parsed DebugMacro object. More...
 
const DWARFDebugLine::LineTable * getLineTableForUnit (DWARFUnit *cu)
 Get a pointer to a parsed line table corresponding to a compile unit. More...
 
DILineInfo getLineInfoForAddress (uint64_t Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
 
DILineInfoTable getLineInfoForAddressRange (uint64_t Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
 
DIInliningInfo getInliningInfoForAddress (uint64_t Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
 
std::shared_ptr< DWARFContext > getDWOContext (StringRef AbsolutePath)
 
- Public Member Functions inherited from llvm::DIContext
 DIContext (DIContextKind K)
 
virtual ~DIContext ()=default
 
DIContextKind getKind () const
 

Additional Inherited Members

- Public Types inherited from llvm::DWARFContext
using cu_iterator_range = DWARFUnitSection< DWARFCompileUnit >::iterator_range
 
using tu_iterator_range = DWARFUnitSection< DWARFTypeUnit >::iterator_range
 
using tu_section_iterator_range = iterator_range< decltype(TUs)::iterator >
 
- Public Types inherited from llvm::DIContext
enum  DIContextKind { CK_DWARF, CK_PDB }
 
- Static Public Member Functions inherited from llvm::DWARFContext
static bool classof (const DIContext *DICtx)
 
static bool isSupportedVersion (unsigned version)
 

Detailed Description

DWARFContextInMemory is the simplest possible implementation of a DWARFContext.

It assumes all content is available in memory and stores pointers to it.

Definition at line 291 of file DWARFContext.h.

Constructor & Destructor Documentation

DWARFContextInMemory::DWARFContextInMemory ( const object::ObjectFile &  Obj,
const LoadedObjectInfo *  L = nullptr,
function_ref< ErrorPolicy(Error)>  HandleError = defaultErrorHandler 
)
DWARFContextInMemory::DWARFContextInMemory ( const StringMap< std::unique_ptr< MemoryBuffer >> &  Sections,
uint8_t  AddrSize,
bool  isLittleEndian = sys::IsLittleEndianHost 
)

Definition at line 1060 of file DWARFContext.cpp.

Member Function Documentation

void llvm::DWARFContextInMemory::forEachTypesDWOSections ( function_ref< void(DWARFSection &)>  F)
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 396 of file DWARFContext.h.

References F, and P.

void llvm::DWARFContextInMemory::forEachTypesSections ( function_ref< void(DWARFSection &)>  F)
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 366 of file DWARFContext.h.

References F, and P.

StringRef llvm::DWARFContextInMemory::getAbbrevDWOSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 401 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getAbbrevSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 370 of file DWARFContext.h.

uint8_t llvm::DWARFContextInMemory::getAddressSize ( ) const
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 364 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getAddrSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 412 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getAppleNamespacesSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 385 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getAppleNamesSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 383 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getAppleObjCSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 386 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getAppleTypesSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 384 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getARangeSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 372 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getCUIndexSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 414 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getDebugFrameSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 373 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getEHFrameSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 374 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getFileName ( ) const
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 362 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getGdbIndexSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 415 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getGnuPubNamesSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 381 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getGnuPubTypesSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 382 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getInfoDWOSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 394 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getInfoSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 365 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getLineDWOSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 402 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getLineSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 375 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getLocDWOSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 403 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getLocSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 371 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getMacinfoSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 378 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getPubNamesSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 379 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getPubTypesSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 380 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getRangeDWOSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 410 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getRangeSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 377 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getStringDWOSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 404 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getStringOffsetDWOSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 406 of file DWARFContext.h.

const DWARFSection& llvm::DWARFContextInMemory::getStringOffsetSection ( )
inlineoverridevirtual

DWARF v5.

Implements llvm::DWARFContext.

Definition at line 389 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getStringSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 376 of file DWARFContext.h.

StringRef llvm::DWARFContextInMemory::getTUIndexSection ( )
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 416 of file DWARFContext.h.

bool llvm::DWARFContextInMemory::isLittleEndian ( ) const
inlineoverridevirtual

Implements llvm::DWARFContext.

Definition at line 363 of file DWARFContext.h.


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