65 m_entry_sp->GetProcessSP()->GetAddressByteSize(),
73 2 *
m_entry_sp->GetProcessSP()->GetAddressByteSize(),
159 while (!left.
null()) {
201 llvm::Expected<uint32_t>
254llvm::Expected<uint32_t>
262 m_count = node_sp->GetValueAsUnsigned(0);
275 auto [size_sp, is_compressed_pair] =
278 return llvm::createStringError(
"Unexpected std::map layout");
280 if (is_compressed_pair)
283 m_count = size_sp->GetValueAsUnsigned(0);
289 size_t idx,
size_t max_depth) {
292 size_t advance_by = idx;
298 iterator = cached_iterator->second;
318 value_type_sp = value_type_sp->GetChildMemberWithName(
"__value_");
324 return value_type_sp;
333 if (idx >= num_children)
350 name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
352 if (potential_child_sp) {
353 switch (potential_child_sp->GetNumChildrenIgnoringErrors()) {
355 auto child0_sp = potential_child_sp->GetChildAtIndex(0);
357 (child0_sp->GetName() == g_cc_ || child0_sp->GetName() == g_cc))
362 auto child0_sp = potential_child_sp->GetChildAtIndex(0);
363 auto child1_sp = potential_child_sp->GetChildAtIndex(1);
365 (child0_sp->GetName() == g_cc_ || child0_sp->GetName() == g_cc) &&
366 child1_sp && child1_sp->GetName() == g_nc)
372 return potential_child_sp;
386 m_tree->GetCompilerType().GetDirectNestedTypeWithName(
"__node_pointer");
412 TargetSP target_sp(valobj_sp->GetTargetSP());
420 auto tree_iter_sp = valobj_sp->GetChildMemberWithName(
"__i_");
426 auto node_pointer_type =
427 tree_iter_sp->GetCompilerType().GetDirectNestedTypeWithName(
429 if (!node_pointer_type.IsValid())
433 auto iter_pointer_sp = tree_iter_sp->GetChildMemberWithName(
"__ptr_");
434 if (!iter_pointer_sp)
439 auto node_pointer_sp = iter_pointer_sp->Cast(node_pointer_type);
440 if (!node_pointer_sp)
443 auto key_value_sp = node_pointer_sp->GetChildMemberWithName(
"__value_");
454 key_value_sp = key_value_sp->Clone(
ConstString(
"pair"));
455 if (key_value_sp->GetNumChildrenIgnoringErrors() == 1) {
456 auto child0_sp = key_value_sp->GetChildAtIndex(0);
458 (child0_sp->GetName() ==
"__cc_" || child0_sp->GetName() ==
"__cc"))
459 key_value_sp = child0_sp->Clone(
ConstString(
"pair"));
481llvm::Expected<size_t>
485 return llvm::createStringError(
"Type has no child named '%s'",
488 return m_pair_sp->GetIndexOfChildWithName(name);
ValueObjectSP right() const
ValueObjectSP left() const
MapEntry(ValueObject *entry)
ValueObjectSP parent() const
void SetEntry(ValueObjectSP entry)
ValueObjectSP GetEntry() const
bool operator==(const MapEntry &rhs) const
MapEntry(ValueObjectSP entry_sp)
ValueObjectSP advance(size_t count)
MapIterator(ValueObject *entry, size_t depth=0)
void next()
Mimicks libc++'s __tree_next algorithm, which libc++ uses in its __tree_iteartor::operator++.
bool is_left_child(const MapEntry &x)
MapEntry tree_min(MapEntry x)
Mimicks libc++'s __tree_min algorithm.
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.
llvm::StringRef GetString() const
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
uint32_t CalculateNumChildrenIgnoringErrors(uint32_t max=UINT32_MAX)
SyntheticChildrenFrontEnd(ValueObject &backend)
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::Target > TargetSP