39 explicit MapEntry(ValueObject *entry)
53 2 *
m_entry_sp->GetProcessSP()->GetAddressByteSize(),
61 m_entry_sp->GetProcessSP()->GetAddressByteSize(),
65 uint64_t
value()
const {
74 auto isnil_sp =
m_entry_sp->GetChildMemberWithName(
"_Isnil");
77 return isnil_sp->GetValueAsUnsigned(1) != 0;
86 bool is_nullptr()
const {
return (
value() == 0); }
128 MapEntry right(
m_entry.right());
129 if (!right.is_nil()) {
134 MapEntry pnode(
m_entry.parent());
135 while (!pnode.is_nil() &&
136 m_entry.value() == MapEntry(pnode.right()).value()) {
143 pnode.SetEntry(
m_entry.parent());
151 if (pnode.is_nullptr())
153 MapEntry left(pnode.
left());
155 while (!left.is_nil()) {
230 return llvm::createStringError(
"There are no children.");
231 return m_inner_sp->GetIndexOfChildWithName(name);
250llvm::Expected<uint32_t>
258 if (
auto node_sp =
m_tree->GetChildMemberWithName(
"_Mysize")) {
259 m_count = node_sp->GetValueAsUnsigned(0);
263 return llvm::createStringError(
"Failed to read size.");
268 size_t idx,
size_t max_depth) {
271 size_t advance_by = idx;
277 iterator = cached_iterator->second;
287 ValueObjectSP value_sp = iterated_sp->GetChildMemberWithName(
"_Myval");
300 if (idx >= num_children)
317 name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
327 m_backend.GetChildAtNamePath({
"_Mypair",
"_Myval2",
"_Myval2"}).get();
342 MapEntry entry(node_sp.get());
346 m_inner_sp = node_sp->GetChildMemberWithName(
"_Myval");
359 auto node_sp = valobj_sp->GetChildMemberWithName(
"_Ptr");
363 MapEntry entry(node_sp.get());
364 if (entry.is_nil()) {
369 auto value_sp = node_sp->GetChildMemberWithName(
"_Myval");
373 auto *summary = value_sp->GetSummaryAsCString();
ValueObjectSP right() const
ValueObjectSP left() const
ValueObjectSP parent() const
void SetEntry(ValueObjectSP entry)
ValueObjectSP GetEntry() const
bool operator==(const MapEntry &rhs) const
ValueObjectSP advance(size_t count)
void next()
Mimicks libc++'s __tree_next algorithm, which libc++ uses in its __tree_iteartor::operator++.
MapEntry tree_min(MapEntry x)
Mimicks libc++'s __tree_min algorithm.
A uniqued constant string class.
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
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)
virtual lldb::ValueObjectSP GetChildMemberWithName(llvm::StringRef name, bool can_create=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