LLDB mainline
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
DWARFUnitHeader Class Reference

Base class describing the header of any kind of "unit." Some information is specific to certain unit types. More...

#include <DWARFUnit.h>

Public Member Functions

dw_offset_t GetOffset () const
 
uint16_t GetVersion () const
 
uint16_t GetAddressByteSize () const
 
dw_offset_t GetLength () const
 
dw_offset_t GetAbbrOffset () const
 
uint8_t GetUnitType () const
 
const llvm::DWARFUnitIndex::Entry * GetIndexEntry () const
 
uint64_t GetTypeHash () const
 
dw_offset_t GetTypeOffset () const
 
std::optional< uint64_t > GetDWOId () const
 
bool IsTypeUnit () const
 
uint32_t GetNextUnitOffset () const
 

Static Public Member Functions

static llvm::Expected< DWARFUnitHeaderextract (const lldb_private::DWARFDataExtractor &data, DIERef::Section section, lldb_private::DWARFContext &dwarf_context, lldb::offset_t *offset_ptr)
 

Private Member Functions

 DWARFUnitHeader ()=default
 

Private Attributes

dw_offset_t m_offset = 0
 
dw_offset_t m_length = 0
 
uint16_t m_version = 0
 
dw_offset_t m_abbr_offset = 0
 
const llvm::DWARFUnitIndex::Entry * m_index_entry = nullptr
 
uint8_t m_unit_type = 0
 
uint8_t m_addr_size = 0
 
uint64_t m_type_hash = 0
 
uint32_t m_type_offset = 0
 
std::optional< uint64_t > m_dwo_id
 

Detailed Description

Base class describing the header of any kind of "unit." Some information is specific to certain unit types.

We separate this class out so we can parse the header before deciding what specific kind of unit to construct.

Definition at line 41 of file DWARFUnit.h.

Constructor & Destructor Documentation

◆ DWARFUnitHeader()

DWARFUnitHeader::DWARFUnitHeader ( )
privatedefault

Member Function Documentation

◆ extract()

llvm::Expected< DWARFUnitHeader > DWARFUnitHeader::extract ( const lldb_private::DWARFDataExtractor data,
DIERef::Section  section,
lldb_private::DWARFContext dwarf_context,
lldb::offset_t offset_ptr 
)
static

◆ GetAbbrOffset()

dw_offset_t DWARFUnitHeader::GetAbbrOffset ( ) const
inline

Definition at line 64 of file DWARFUnit.h.

References m_abbr_offset.

◆ GetAddressByteSize()

uint16_t DWARFUnitHeader::GetAddressByteSize ( ) const
inline

Definition at line 62 of file DWARFUnit.h.

References m_addr_size.

Referenced by DWARFUnit::FindRnglistFromOffset(), and DWARFUnit::GetAddressByteSize().

◆ GetDWOId()

std::optional< uint64_t > DWARFUnitHeader::GetDWOId ( ) const
inline

Definition at line 71 of file DWARFUnit.h.

References m_dwo_id.

◆ GetIndexEntry()

const llvm::DWARFUnitIndex::Entry * DWARFUnitHeader::GetIndexEntry ( ) const
inline

◆ GetLength()

dw_offset_t DWARFUnitHeader::GetLength ( ) const
inline

Definition at line 63 of file DWARFUnit.h.

References m_length.

Referenced by extract(), and DWARFUnit::GetLength().

◆ GetNextUnitOffset()

uint32_t DWARFUnitHeader::GetNextUnitOffset ( ) const
inline

Definition at line 76 of file DWARFUnit.h.

References m_length, and m_offset.

Referenced by extract(), and DWARFUnit::GetNextUnitOffset().

◆ GetOffset()

dw_offset_t DWARFUnitHeader::GetOffset ( ) const
inline

Definition at line 60 of file DWARFUnit.h.

References m_offset.

Referenced by DWARFUnit::GetOffset().

◆ GetTypeHash()

uint64_t DWARFUnitHeader::GetTypeHash ( ) const
inline

Definition at line 69 of file DWARFUnit.h.

References m_type_hash.

Referenced by DWARFTypeUnit::GetTypeHash().

◆ GetTypeOffset()

dw_offset_t DWARFUnitHeader::GetTypeOffset ( ) const
inline

Definition at line 70 of file DWARFUnit.h.

References m_type_offset.

Referenced by DWARFTypeUnit::GetTypeOffset().

◆ GetUnitType()

uint8_t DWARFUnitHeader::GetUnitType ( ) const
inline

Definition at line 65 of file DWARFUnit.h.

References m_unit_type.

Referenced by DWARFUnit::GetHeaderByteSize(), and DWARFUnit::GetUnitType().

◆ GetVersion()

uint16_t DWARFUnitHeader::GetVersion ( ) const
inline

Definition at line 61 of file DWARFUnit.h.

References m_version.

Referenced by DWARFUnit::GetVersion().

◆ IsTypeUnit()

bool DWARFUnitHeader::IsTypeUnit ( ) const
inline

Definition at line 72 of file DWARFUnit.h.

References m_unit_type.

Referenced by extract(), and DWARFUnit::IsTypeUnit().

Member Data Documentation

◆ m_abbr_offset

dw_offset_t DWARFUnitHeader::m_abbr_offset = 0
private

Definition at line 45 of file DWARFUnit.h.

Referenced by extract(), and GetAbbrOffset().

◆ m_addr_size

uint8_t DWARFUnitHeader::m_addr_size = 0
private

Definition at line 50 of file DWARFUnit.h.

Referenced by extract(), and GetAddressByteSize().

◆ m_dwo_id

std::optional<uint64_t> DWARFUnitHeader::m_dwo_id
private

Definition at line 55 of file DWARFUnit.h.

Referenced by extract(), and GetDWOId().

◆ m_index_entry

const llvm::DWARFUnitIndex::Entry* DWARFUnitHeader::m_index_entry = nullptr
private

Definition at line 47 of file DWARFUnit.h.

Referenced by extract(), and GetIndexEntry().

◆ m_length

dw_offset_t DWARFUnitHeader::m_length = 0
private

Definition at line 43 of file DWARFUnit.h.

Referenced by extract(), GetLength(), and GetNextUnitOffset().

◆ m_offset

dw_offset_t DWARFUnitHeader::m_offset = 0
private

Definition at line 42 of file DWARFUnit.h.

Referenced by extract(), GetNextUnitOffset(), and GetOffset().

◆ m_type_hash

uint64_t DWARFUnitHeader::m_type_hash = 0
private

Definition at line 52 of file DWARFUnit.h.

Referenced by extract(), and GetTypeHash().

◆ m_type_offset

uint32_t DWARFUnitHeader::m_type_offset = 0
private

Definition at line 53 of file DWARFUnit.h.

Referenced by extract(), and GetTypeOffset().

◆ m_unit_type

uint8_t DWARFUnitHeader::m_unit_type = 0
private

Definition at line 49 of file DWARFUnit.h.

Referenced by extract(), GetUnitType(), and IsTypeUnit().

◆ m_version

uint16_t DWARFUnitHeader::m_version = 0
private

Definition at line 44 of file DWARFUnit.h.

Referenced by extract(), and GetVersion().


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