LLVM API Documentation

Classes | Public Member Functions | Protected Member Functions
llvm::DWARFUnit Class Reference

#include <DWARFUnit.h>

Inheritance diagram for llvm::DWARFUnit:
Inheritance graph
[legend]

List of all members.

Classes

class  DWOHolder

Public Member Functions

 DWARFUnit (DWARFContext &Context, const DWARFDebugAbbrev *DA, StringRef IS, StringRef RS, StringRef SS, StringRef SOS, StringRef AOS, const RelocAddrMap *M, bool LE, const DWARFUnitSectionBase &UnitSection)
virtual ~DWARFUnit ()
DWARFContextgetContext () const
StringRef getStringSection () const
StringRef getStringOffsetSection () const
void setAddrOffsetSection (StringRef AOS, uint32_t Base)
void setRangesSection (StringRef RS, uint32_t Base)
bool getAddrOffsetSectionItem (uint32_t Index, uint64_t &Result) const
bool getStringOffsetSectionItem (uint32_t Index, uint32_t &Result) const
DataExtractor getDebugInfoExtractor () const
DataExtractor getStringExtractor () const
const RelocAddrMapgetRelocMap () const
bool extract (DataExtractor debug_info, uint32_t *offset_ptr)
bool extractRangeList (uint32_t RangeListOffset, DWARFDebugRangeList &RangeList) const
void clear ()
uint32_t getOffset () const
uint32_t getNextUnitOffset () const
uint32_t getLength () const
uint16_t getVersion () const
const
DWARFAbbreviationDeclarationSet
getAbbreviations () const
uint8_t getAddressByteSize () const
uint64_t getBaseAddress () const
void setBaseAddress (uint64_t base_addr)
const DWARFDebugInfoEntryMinimalgetCompileUnitDIE (bool extract_cu_die_only=true)
const char * getCompilationDir ()
uint64_t getDWOId ()
void collectAddressRanges (DWARFAddressRangesVector &CURanges)
DWARFDebugInfoEntryInlinedChain getInlinedChainForAddress (uint64_t Address)
const DWARFUnitSectionBasegetUnitSection () const
 getUnitSection - Return the DWARFUnitSection containing this unit.

Protected Member Functions

virtual bool extractImpl (DataExtractor debug_info, uint32_t *offset_ptr)
virtual uint32_t getHeaderSize () const
 Size in bytes of the unit header.

Detailed Description

Definition at line 77 of file DWARFUnit.h.


Constructor & Destructor Documentation

DWARFUnit::DWARFUnit ( DWARFContext Context,
const DWARFDebugAbbrev DA,
StringRef  IS,
StringRef  RS,
StringRef  SS,
StringRef  SOS,
StringRef  AOS,
const RelocAddrMap M,
bool  LE,
const DWARFUnitSectionBase UnitSection 
)

Definition at line 20 of file DWARFUnit.cpp.

References clear().

DWARFUnit::~DWARFUnit ( ) [virtual]

Definition at line 30 of file DWARFUnit.cpp.


Member Function Documentation

void DWARFUnit::clear ( )

Definition at line 100 of file DWARFUnit.cpp.

Referenced by DWARFUnit(), and extract().

bool DWARFUnit::extract ( DataExtractor  debug_info,
uint32_t *  offset_ptr 
)

Definition at line 75 of file DWARFUnit.cpp.

References clear(), extractImpl(), and llvm::DataExtractor::isValidOffset().

bool DWARFUnit::extractImpl ( DataExtractor  debug_info,
uint32_t *  offset_ptr 
) [protected, virtual]
bool DWARFUnit::extractRangeList ( uint32_t  RangeListOffset,
DWARFDebugRangeList RangeList 
) const

extractRangeList - extracts the range list referenced by this compile unit from .debug_ranges section. Returns true on success. Requires that compile unit is already extracted.

Definition at line 91 of file DWARFUnit.cpp.

References llvm::DWARFDebugRangeList::extract().

Referenced by llvm::DWARFDebugInfoEntryMinimal::getAddressRanges().

uint8_t llvm::DWARFUnit::getAddressByteSize ( ) const [inline]
bool DWARFUnit::getAddrOffsetSectionItem ( uint32_t  Index,
uint64_t &  Result 
) const
uint64_t llvm::DWARFUnit::getBaseAddress ( ) const [inline]

Definition at line 165 of file DWARFUnit.h.

Referenced by llvm::DWARFDebugInfoEntryMinimal::getAddressRanges().

Definition at line 113 of file DWARFUnit.cpp.

References llvm::dwarf::DW_AT_comp_dir.

Referenced by getFileNameForUnit().

Definition at line 123 of file DWARFUnit.h.

uint64_t DWARFUnit::getDWOId ( )

Definition at line 120 of file DWARFUnit.cpp.

References llvm::dwarf::DW_AT_GNU_dwo_id.

virtual uint32_t llvm::DWARFUnit::getHeaderSize ( ) const [inline, protected, virtual]

Size in bytes of the unit header.

Reimplemented in llvm::DWARFTypeUnit.

Definition at line 114 of file DWARFUnit.h.

getInlinedChainForAddress - fetches inlined chain for a given address. Returns empty chain if there is no subprogram containing address. The chain is valid as long as parsed compile unit DIEs are not cleared.

Definition at line 342 of file DWARFUnit.cpp.

References llvm::DWARFDebugInfoEntryMinimal::getInlinedChainForAddress().

Referenced by getFunctionNameForAddress(), and llvm::DWARFContext::getInliningInfoForAddress().

uint32_t llvm::DWARFUnit::getLength ( ) const [inline]
uint32_t llvm::DWARFUnit::getNextUnitOffset ( ) const [inline]
uint32_t llvm::DWARFUnit::getOffset ( ) const [inline]

Definition at line 147 of file DWARFUnit.h.

Referenced by llvm::DWARFFormValue::extractValue().

Definition at line 143 of file DWARFUnit.h.

Referenced by llvm::DWARFFormValue::getAsCString().

Definition at line 126 of file DWARFUnit.h.

Referenced by llvm::DWARFFormValue::dump().

bool DWARFUnit::getStringOffsetSectionItem ( uint32_t  Index,
uint32_t &  Result 
) const

Definition at line 125 of file DWARFUnit.h.

Referenced by llvm::DWARFFormValue::dump().

getUnitSection - Return the DWARFUnitSection containing this unit.

Definition at line 188 of file DWARFUnit.h.

uint16_t llvm::DWARFUnit::getVersion ( ) const [inline]
void llvm::DWARFUnit::setAddrOffsetSection ( StringRef  AOS,
uint32_t  Base 
) [inline]

Definition at line 127 of file DWARFUnit.h.

void llvm::DWARFUnit::setBaseAddress ( uint64_t  base_addr) [inline]

Definition at line 167 of file DWARFUnit.h.

void llvm::DWARFUnit::setRangesSection ( StringRef  RS,
uint32_t  Base 
) [inline]

Definition at line 131 of file DWARFUnit.h.


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