LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Member Functions | List of all members
llvm::DWARFUnit Class Reference

#include <DWARFUnit.h>

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

Public Member Functions

 DWARFUnit (const DWARFDebugAbbrev *DA, StringRef IS, StringRef AS, StringRef RS, StringRef SS, StringRef SOS, StringRef AOS, const RelocAddrMap *M, bool LE)
 
virtual ~DWARFUnit ()
 
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
 
virtual uint32_t getSize () const
 Size in bytes of the compile unit header. More...
 
uint32_t getFirstDIEOffset () const
 
uint32_t getNextUnitOffset () const
 
size_t getDebugInfoSize () const
 Size in bytes of the .debug_info data associated with this compile unit. More...
 
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 buildAddressRangeTable (DWARFDebugAranges *debug_aranges, bool clear_dies_if_already_not_parsed, uint32_t CUOffsetInAranges)
 
DWARFDebugInfoEntryInlinedChain getInlinedChainForAddress (uint64_t Address)
 

Protected Member Functions

virtual bool extractImpl (DataExtractor debug_info, uint32_t *offset_ptr)
 

Detailed Description

Definition at line 30 of file DWARFUnit.h.

Constructor & Destructor Documentation

DWARFUnit::DWARFUnit ( const DWARFDebugAbbrev DA,
StringRef  IS,
StringRef  AS,
StringRef  RS,
StringRef  SS,
StringRef  SOS,
StringRef  AOS,
const RelocAddrMap M,
bool  LE 
)

Definition at line 20 of file DWARFUnit.cpp.

References clear().

DWARFUnit::~DWARFUnit ( )
virtual

Definition at line 29 of file DWARFUnit.cpp.

Member Function Documentation

void DWARFUnit::buildAddressRangeTable ( DWARFDebugAranges debug_aranges,
bool  clear_dies_if_already_not_parsed,
uint32_t  CUOffsetInAranges 
)

Definition at line 302 of file DWARFUnit.cpp.

References llvm::OwningPtr< T >::get(), and llvm::OwningPtr< T >::reset().

void DWARFUnit::clear ( )

Definition at line 97 of file DWARFUnit.cpp.

References llvm::OwningPtr< T >::reset().

Referenced by DWARFUnit(), and extract().

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

Definition at line 72 of file DWARFUnit.cpp.

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

bool DWARFUnit::extractImpl ( DataExtractor  debug_info,
uint32_t *  offset_ptr 
)
protectedvirtual
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 88 of file DWARFUnit.cpp.

References llvm::DWARFDebugRangeList::extract().

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

const DWARFAbbreviationDeclarationSet* llvm::DWARFUnit::getAbbreviations ( ) const
inline
uint8_t llvm::DWARFUnit::getAddressByteSize ( ) const
inline
bool DWARFUnit::getAddrOffsetSectionItem ( uint32_t  Index,
uint64_t &  Result 
) const
uint64_t llvm::DWARFUnit::getBaseAddress ( ) const
inline
const char * DWARFUnit::getCompilationDir ( )

Definition at line 110 of file DWARFUnit.cpp.

Referenced by getFileNameForCompileUnit().

const DWARFDebugInfoEntryMinimal* llvm::DWARFUnit::getCompileUnitDIE ( bool  extract_cu_die_only = true)
inline
DataExtractor llvm::DWARFUnit::getDebugInfoExtractor ( ) const
inline
size_t llvm::DWARFUnit::getDebugInfoSize ( ) const
inline

Size in bytes of the .debug_info data associated with this compile unit.

Definition at line 111 of file DWARFUnit.h.

References getSize().

uint64_t DWARFUnit::getDWOId ( )

Definition at line 117 of file DWARFUnit.cpp.

uint32_t llvm::DWARFUnit::getFirstDIEOffset ( ) const
inline

Definition at line 108 of file DWARFUnit.h.

References getSize().

DWARFDebugInfoEntryInlinedChain DWARFUnit::getInlinedChainForAddress ( uint64_t  Address)

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 343 of file DWARFUnit.cpp.

References llvm::OwningPtr< T >::get(), and llvm::DWARFDebugInfoEntryMinimal::getInlinedChainForAddress().

Referenced by llvm::DWARFContext::getInliningInfoForAddress(), llvm::DWARFContext::getLineInfoForAddress(), and llvm::DWARFContext::getLineInfoForAddressRange().

uint32_t llvm::DWARFUnit::getLength ( ) const
inline
uint32_t llvm::DWARFUnit::getNextUnitOffset ( ) const
inline
uint32_t llvm::DWARFUnit::getOffset ( ) const
inline
const RelocAddrMap* llvm::DWARFUnit::getRelocMap ( ) const
inline

Definition at line 95 of file DWARFUnit.h.

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

virtual uint32_t llvm::DWARFUnit::getSize ( ) const
inlinevirtual

Size in bytes of the compile unit header.

Reimplemented in llvm::DWARFTypeUnit.

Definition at line 107 of file DWARFUnit.h.

Referenced by getDebugInfoSize(), getFirstDIEOffset(), and llvm::DWARFTypeUnit::getSize().

DataExtractor llvm::DWARFUnit::getStringExtractor ( ) const
inline

Definition at line 91 of file DWARFUnit.h.

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

StringRef llvm::DWARFUnit::getStringOffsetSection ( ) const
inline

Definition at line 74 of file DWARFUnit.h.

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

bool DWARFUnit::getStringOffsetSectionItem ( uint32_t  Index,
uint32_t &  Result 
) const
StringRef llvm::DWARFUnit::getStringSection ( ) const
inline

Definition at line 73 of file DWARFUnit.h.

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

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

Definition at line 75 of file DWARFUnit.h.

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

Definition at line 120 of file DWARFUnit.h.

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

Definition at line 79 of file DWARFUnit.h.


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