58 return llvm::createStringError(
"Failed to read size");
75 first_idx * process_sp->GetAddressByteSize();
79 process_sp->ReadPointerFromMemory(first_address, err);
87 name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
99 auto storage_sp =
m_backend.GetChildAtNamePath({
"_Mypair",
"_Myval2"});
103 auto deque_type =
m_backend.GetCompilerType();
107 auto block_size_decl = deque_type.GetStaticFieldWithName(
"_Block_size");
108 if (!block_size_decl)
110 auto block_size = block_size_decl.GetConstantValue();
111 if (!block_size.IsValid())
114 auto element_type = deque_type.GetTypeTemplateArgument(0);
117 auto element_size = element_type.GetByteSize(
nullptr);
121 auto offset_sp = storage_sp->GetChildMemberWithName(
"_Myoff");
122 auto map_size_sp = storage_sp->GetChildMemberWithName(
"_Mapsize");
123 auto map_sp = storage_sp->GetChildMemberWithName(
"_Map");
124 auto size_sp = storage_sp->GetChildMemberWithName(
"_Mysize");
125 if (!offset_sp || !map_size_sp || !map_sp || !size_sp)
129 uint64_t offset = offset_sp->GetValueAsUnsigned(0, &ok);
133 uint64_t map_size = map_size_sp->GetValueAsUnsigned(0, &ok);
137 uint64_t size = size_sp->GetValueAsUnsigned(0, &ok);
141 m_map = map_sp.get();
155 return llvm::createStringError(
"Type has no child named '%s'",
158 return *optional_idx;
160 return llvm::createStringError(
"Type has no child named '%s'",
166 return valobj_sp->GetChildMemberWithName(
"_Mypair") !=
nullptr;
Generic representation of a type in a programming language.
A uniqued constant string class.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
const char * GetCString() const
Get the string value as a C string.
Execution context objects refer to objects in the execution of the program that is being debugged.
bool Fail() const
Test for error condition.
llvm::StringRef GetString() const
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
SyntheticChildrenFrontEnd(ValueObject &backend)
lldb::ValueObjectSP CreateValueObjectFromAddress(llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type, bool do_deref=true)
virtual lldb::ValueObjectSP GetNonSyntheticValue()
A class that represents a running process on the host machine.
ChildCacheState
Specifies if children need to be re-computed after a call to SyntheticChildrenFrontEnd::Update.
@ eRefetch
Children need to be recomputed dynamically.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::Process > ProcessSP