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

Identifies a DWARF debug info entry within a given Module. More...

#include <DIERef.h>

Collaboration diagram for DIERef:
Collaboration graph
[legend]

Public Types

enum  Section : uint8_t { DebugInfo, DebugTypes }
 

Public Member Functions

 DIERef (llvm::Optional< uint32_t > dwo_num, Section section, dw_offset_t die_offset)
 
llvm::Optional< uint32_tdwo_num () const
 
Section section () const
 
dw_offset_t die_offset () const
 
bool operator< (DIERef other) const
 
bool operator== (const DIERef &rhs) const
 
bool operator!= (const DIERef &rhs) const
 
void Encode (lldb_private::DataEncoder &encoder) const
 Encode this object into a data encoder object. More...
 

Static Public Member Functions

static llvm::Optional< DIERefDecode (const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr)
 Decode a serialized version of this object from data. More...
 

Private Attributes

uint32_t m_dwo_num: 30
 
uint32_t m_dwo_num_valid: 1
 
uint32_t m_section: 1
 
dw_offset_t m_die_offset
 

Detailed Description

Identifies a DWARF debug info entry within a given Module.

It contains three "coordinates":

Definition at line 26 of file DIERef.h.

Member Enumeration Documentation

◆ Section

enum DIERef::Section : uint8_t
Enumerator
DebugInfo 
DebugTypes 

Definition at line 28 of file DIERef.h.

Constructor & Destructor Documentation

◆ DIERef()

DIERef::DIERef ( llvm::Optional< uint32_t dwo_num,
Section  section,
dw_offset_t  die_offset 
)
inline

Definition at line 30 of file DIERef.h.

References dwo_num().

Member Function Documentation

◆ Decode()

llvm::Optional< DIERef > DIERef::Decode ( const lldb_private::DataExtractor data,
lldb::offset_t offset_ptr 
)
static

Decode a serialized version of this object from data.

Parameters
dataThe decoder object that references the serialized data.
offset_ptrA pointer that contains the offset from which the data will be decoded from that gets updated as data gets decoded.
Returns
Returns a valid DIERef if decoding succeeded, llvm::None if there was unsufficient or invalid values that were decoded.

Definition at line 29 of file DIERef.cpp.

References lldb_private::DataExtractor::GetU32(), k_dwo_num_mask, k_dwo_num_valid_bitmask, and k_section_bitmask.

Referenced by NameToDIE::Decode().

◆ die_offset()

dw_offset_t DIERef::die_offset ( ) const
inline

◆ dwo_num()

llvm::Optional<uint32_t> DIERef::dwo_num ( ) const
inline

◆ Encode()

void DIERef::Encode ( lldb_private::DataEncoder &  encoder) const

Encode this object into a data encoder object.

This allows this object to be serialized to disk.

Parameters
encoderA data encoder object that serialized bytes will be encoded into.

Definition at line 46 of file DIERef.cpp.

References k_dwo_num_valid_bitmask, and k_section_bitmask.

◆ operator!=()

bool DIERef::operator!= ( const DIERef rhs) const
inline

Definition at line 62 of file DIERef.h.

◆ operator<()

bool DIERef::operator< ( DIERef  other) const
inline

Definition at line 47 of file DIERef.h.

References m_die_offset, m_dwo_num, m_dwo_num_valid, and m_section.

◆ operator==()

bool DIERef::operator== ( const DIERef rhs) const
inline

Definition at line 57 of file DIERef.h.

References dwo_num(), m_die_offset, and m_section.

◆ section()

Section DIERef::section ( ) const
inline

Member Data Documentation

◆ m_die_offset

dw_offset_t DIERef::m_die_offset
private

Definition at line 92 of file DIERef.h.

Referenced by die_offset(), operator<(), and operator==().

◆ m_dwo_num

uint32_t DIERef::m_dwo_num
private

Definition at line 89 of file DIERef.h.

Referenced by dwo_num(), and operator<().

◆ m_dwo_num_valid

uint32_t DIERef::m_dwo_num_valid
private

Definition at line 90 of file DIERef.h.

Referenced by dwo_num(), and operator<().

◆ m_section

uint32_t DIERef::m_section
private

Definition at line 91 of file DIERef.h.

Referenced by operator<(), operator==(), and section().


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