22std::optional<SymbolFile::ArrayInfo>
31 if (tag != DW_TAG_subrange_type)
35 if (attributes.
Size() == 0)
38 uint64_t num_elements = 0;
39 uint64_t lower_bound = 0;
40 uint64_t upper_bound = 0;
41 bool upper_bound_valid =
false;
42 for (
size_t i = 0; i < attributes.
Size(); ++i) {
52 if (var_die.Tag() == DW_TAG_variable)
56 lldb::VariableSP var_sp;
57 auto valobj_sp = frame->GetValueForVariableExpressionPath(
60 num_elements = valobj_sp->GetValueAsUnsigned(0);
66 num_elements = form_value.
Unsigned();
69 case DW_AT_bit_stride:
73 case DW_AT_byte_stride:
77 case DW_AT_lower_bound:
81 case DW_AT_upper_bound:
82 upper_bound_valid =
true;
92 if (num_elements == 0) {
93 if (upper_bound_valid && upper_bound >= lower_bound)
94 num_elements = upper_bound - lower_bound + 1;
104 switch (dwarf_accessibility) {
105 case DW_ACCESS_public:
107 case DW_ACCESS_private:
109 case DW_ACCESS_protected:
static llvm::raw_ostream & error(Stream &strm)
static lldb::AccessType GetAccessTypeFromDWARF(uint32_t dwarf_accessibility)
static std::optional< lldb_private::SymbolFile::ArrayInfo > ParseChildArrayInfo(const DWARFDIE &parent_die, const lldb_private::ExecutionContext *exe_ctx=nullptr)
dw_attr_t AttributeAtIndex(uint32_t i) const
bool ExtractFormValueAtIndex(uint32_t i, DWARFFormValue &form_value) const
llvm::iterator_range< child_iterator > children() const
The range of all the children of this DIE.
DWARFDIE GetReferencedDIE(const dw_attr_t attr) const
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
const lldb::StackFrameSP & GetFrameSP() const
Get accessor to get the frame shared pointer.
llvm::dwarf::Tag dw_tag_t
llvm::dwarf::Attribute dw_attr_t
A class that represents a running process on the host machine.
The characteristics of an array type.
llvm::SmallVector< uint64_t, 1 > element_orders