24std::optional<SymbolFile::ArrayInfo>
33 if (tag != DW_TAG_subrange_type)
37 if (attributes.
Size() == 0)
40 std::optional<uint64_t> num_elements;
41 uint64_t lower_bound = 0;
42 uint64_t upper_bound = 0;
43 bool upper_bound_valid =
false;
44 for (
size_t i = 0; i < attributes.
Size(); ++i) {
54 if (var_die.Tag() == DW_TAG_variable)
59 auto valobj_sp = frame->GetValueForVariableExpressionPath(
62 num_elements = valobj_sp->GetValueAsUnsigned(0);
68 num_elements = form_value.
Unsigned();
71 case DW_AT_bit_stride:
75 case DW_AT_byte_stride:
79 case DW_AT_lower_bound:
83 case DW_AT_upper_bound:
84 upper_bound_valid =
true;
94 if (!num_elements || *num_elements == 0) {
95 if (upper_bound_valid && upper_bound >= lower_bound)
96 num_elements = upper_bound - lower_bound + 1;
113 if (attributes.
Size() == 0)
117 for (
size_t i = 0; i < attributes.
Size(); ++i) {
130 switch (dwarf_accessibility) {
131 case DW_ACCESS_public:
133 case DW_ACCESS_private:
135 case DW_ACCESS_protected:
static llvm::raw_ostream & error(Stream &strm)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
const lldb::StackFrameSP & GetFrameSP() const
Get accessor to get the frame shared pointer.
lldb_private::Type * GetTypeForDIE(const DWARFDIE &die)
static lldb::AccessType GetAccessTypeFromDWARF(uint32_t dwarf_accessibility)
static std::optional< SymbolFile::ArrayInfo > ParseChildArrayInfo(const DWARFDIE &parent_die, const ExecutionContext *exe_ctx=nullptr)
dw_attr_t AttributeAtIndex(uint32_t i) const
bool ExtractFormValueAtIndex(uint32_t i, DWARFFormValue &form_value) const
DWARFAttributes GetAttributes(Recurse recurse=Recurse::yes) const
SymbolFileDWARF * GetDWARF() 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
llvm::dwarf::Tag dw_tag_t
llvm::dwarf::Attribute dw_attr_t
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Variable > VariableSP
The characteristics of an array type.
llvm::SmallVector< std::optional< uint64_t >, 1 > element_orders