65 m_entry_sp->GetProcessSP()->GetAddressByteSize(),
73 2 *
m_entry_sp->GetProcessSP()->GetAddressByteSize(),
159 while (!left.
null()) {
203 llvm::Expected<uint32_t>
256llvm::Expected<uint32_t>
264 m_count = node_sp->GetValueAsUnsigned(0);
278 *
m_tree, 2,
"__size_",
"__pair3_");
280 return llvm::createStringError(
"Unexpected std::map layout");
282 if (is_compressed_pair)
285 m_count = size_sp->GetValueAsUnsigned(0);
291 size_t idx,
size_t max_depth) {
294 size_t advance_by = idx;
300 iterator = cached_iterator->second;
320 value_type_sp = value_type_sp->GetChildMemberWithName(
"__value_");
326 return value_type_sp;
335 if (idx >= num_children)
352 name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
354 if (potential_child_sp) {
355 switch (potential_child_sp->GetNumChildrenIgnoringErrors()) {
357 auto child0_sp = potential_child_sp->GetChildAtIndex(0);
359 (child0_sp->GetName() == g_cc_ || child0_sp->GetName() == g_cc))
364 auto child0_sp = potential_child_sp->GetChildAtIndex(0);
365 auto child1_sp = potential_child_sp->GetChildAtIndex(1);
367 (child0_sp->GetName() == g_cc_ || child0_sp->GetName() == g_cc) &&
368 child1_sp && child1_sp->GetName() == g_nc)
374 return potential_child_sp;
388 m_tree->GetCompilerType().GetDirectNestedTypeWithName(
"__node_pointer");
397 return llvm::createStringError(
"Type has no child named '%s'",
400 return *optional_idx;
424 TargetSP target_sp(valobj_sp->GetTargetSP());
432 auto tree_iter_sp = valobj_sp->GetChildMemberWithName(
"__i_");
438 auto node_pointer_type =
439 tree_iter_sp->GetCompilerType().GetDirectNestedTypeWithName(
441 if (!node_pointer_type.IsValid())
445 auto iter_pointer_sp = tree_iter_sp->GetChildMemberWithName(
"__ptr_");
446 if (!iter_pointer_sp)
451 auto node_pointer_sp = iter_pointer_sp->Cast(node_pointer_type);
452 if (!node_pointer_sp)
455 auto key_value_sp = node_pointer_sp->GetChildMemberWithName(
"__value_");
466 key_value_sp = key_value_sp->Clone(
ConstString(
"pair"));
467 if (key_value_sp->GetNumChildrenIgnoringErrors() == 1) {
468 auto child0_sp = key_value_sp->GetChildAtIndex(0);
470 (child0_sp->GetName() ==
"__cc_" || child0_sp->GetName() ==
"__cc"))
471 key_value_sp = child0_sp->Clone(
ConstString(
"pair"));
493llvm::Expected<size_t>
497 return llvm::createStringError(
"Type has no child named '%s'",
500 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.
const char * GetCString() 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