LLDB  mainline
Public Types | Public Member Functions | Protected Attributes | List of all members
DWARFAbbreviationDeclaration Class Reference

#include <DWARFAbbreviationDeclaration.h>

Collaboration diagram for DWARFAbbreviationDeclaration:
Collaboration graph

Public Types

enum  { InvalidCode = 0 }

Public Member Functions

 DWARFAbbreviationDeclaration ()
 DWARFAbbreviationDeclaration (dw_tag_t tag, uint8_t has_children)
dw_uleb128_t Code () const
void SetCode (dw_uleb128_t code)
dw_tag_t Tag () const
bool HasChildren () const
size_t NumAttributes () const
dw_form_t GetFormByIndex (uint32_t idx) const
void GetAttrAndFormValueByIndex (uint32_t idx, dw_attr_t &attr, DWARFFormValue &form_value) const
dw_form_t GetFormByIndexUnchecked (uint32_t idx) const
uint32_t FindAttributeIndex (dw_attr_t attr) const
llvm::Expected< lldb_private::DWARFEnumStateextract (const lldb_private::DWARFDataExtractor &data, lldb::offset_t *offset_ptr)
 Extract one abbreviation declaration and all of its associated attributes. More...
bool IsValid ()
bool operator== (const DWARFAbbreviationDeclaration &rhs) const

Protected Attributes

dw_uleb128_t m_code
dw_tag_t m_tag
uint8_t m_has_children
DWARFAttribute::collection m_attributes

Detailed Description

Definition at line 17 of file DWARFAbbreviationDeclaration.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 19 of file DWARFAbbreviationDeclaration.h.

Constructor & Destructor Documentation

◆ DWARFAbbreviationDeclaration() [1/2]

DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration ( )

Definition at line 20 of file DWARFAbbreviationDeclaration.cpp.

◆ DWARFAbbreviationDeclaration() [2/2]

DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration ( dw_tag_t  tag,
uint8_t  has_children 

Definition at line 24 of file DWARFAbbreviationDeclaration.cpp.

Member Function Documentation

◆ Code()

dw_uleb128_t DWARFAbbreviationDeclaration::Code ( ) const

Definition at line 25 of file DWARFAbbreviationDeclaration.h.

References m_code.

Referenced by DWARFAbbreviationDeclarationSet::extract().

◆ extract()

llvm::Expected< DWARFEnumState > DWARFAbbreviationDeclaration::extract ( const lldb_private::DWARFDataExtractor data,
lldb::offset_t offset_ptr 

Extract one abbreviation declaration and all of its associated attributes.

Possible return values: DWARFEnumState::Complete - the extraction completed successfully. This was the last abbrev decl in a sequence, and the user should not call this function again. DWARFEnumState::MoreItems - the extraction completed successfully. The user should call this function again to retrieve the next decl. llvm::Error - A parsing error occurred. The debug info is malformed.

Definition at line 30 of file DWARFAbbreviationDeclaration.cpp.

References lldb_private::DataExtractor::GetU8(), lldb_private::DataExtractor::GetULEB128(), m_attributes, m_code, m_has_children, m_tag, DWARFFormValue::ValueTypeTag::sval, lldb_private::DataExtractor::ValidOffset(), and DWARFFormValue::ValueTypeTag::value.

Referenced by DWARFAbbreviationDeclarationSet::extract(), and GetFormByIndexUnchecked().

◆ FindAttributeIndex()

uint32_t DWARFAbbreviationDeclaration::FindAttributeIndex ( dw_attr_t  attr) const

Definition at line 76 of file DWARFAbbreviationDeclaration.cpp.

References DW_INVALID_INDEX, m_attributes, and operator==().

Referenced by GetFormByIndexUnchecked().

◆ GetAttrAndFormValueByIndex()

void DWARFAbbreviationDeclaration::GetAttrAndFormValueByIndex ( uint32_t  idx,
dw_attr_t attr,
DWARFFormValue form_value 
) const

◆ GetFormByIndex()

dw_form_t DWARFAbbreviationDeclaration::GetFormByIndex ( uint32_t  idx) const

Definition at line 30 of file DWARFAbbreviationDeclaration.h.

References m_attributes.

◆ GetFormByIndexUnchecked()

dw_form_t DWARFAbbreviationDeclaration::GetFormByIndexUnchecked ( uint32_t  idx) const

◆ HasChildren()

bool DWARFAbbreviationDeclaration::HasChildren ( ) const

Definition at line 28 of file DWARFAbbreviationDeclaration.h.

References m_has_children.

Referenced by operator==().

◆ IsValid()

bool DWARFAbbreviationDeclaration::IsValid ( )

Definition at line 71 of file DWARFAbbreviationDeclaration.cpp.

References m_code, and m_tag.

Referenced by GetFormByIndexUnchecked().

◆ NumAttributes()

size_t DWARFAbbreviationDeclaration::NumAttributes ( ) const

Definition at line 29 of file DWARFAbbreviationDeclaration.h.

References m_attributes.

◆ operator==()

bool DWARFAbbreviationDeclaration::operator== ( const DWARFAbbreviationDeclaration rhs) const

Definition at line 87 of file DWARFAbbreviationDeclaration.cpp.

References HasChildren(), m_attributes, and Tag().

Referenced by FindAttributeIndex(), and GetFormByIndexUnchecked().

◆ SetCode()

void DWARFAbbreviationDeclaration::SetCode ( dw_uleb128_t  code)

Definition at line 26 of file DWARFAbbreviationDeclaration.h.

References m_code.

◆ Tag()

dw_tag_t DWARFAbbreviationDeclaration::Tag ( ) const

Definition at line 27 of file DWARFAbbreviationDeclaration.h.

References m_tag.

Referenced by operator==().

Member Data Documentation

◆ m_attributes

DWARFAttribute::collection DWARFAbbreviationDeclaration::m_attributes

◆ m_code

dw_uleb128_t DWARFAbbreviationDeclaration::m_code

Definition at line 59 of file DWARFAbbreviationDeclaration.h.

Referenced by Code(), extract(), IsValid(), and SetCode().

◆ m_has_children

uint8_t DWARFAbbreviationDeclaration::m_has_children

Definition at line 61 of file DWARFAbbreviationDeclaration.h.

Referenced by extract(), and HasChildren().

◆ m_tag

dw_tag_t DWARFAbbreviationDeclaration::m_tag

Definition at line 60 of file DWARFAbbreviationDeclaration.h.

Referenced by extract(), IsValid(), and Tag().

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