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()) {
228 llvm::Expected<size_t>
231 return llvm::createStringError(
"there are no children");
232 return m_inner_sp->GetIndexOfChildWithName(name);
251llvm::Expected<uint32_t>
259 if (
auto node_sp =
m_tree->GetChildMemberWithName(
"_Mysize")) {
260 m_count = node_sp->GetValueAsUnsigned(0);
264 return llvm::createStringError(
"failed to read size");
269 size_t idx,
size_t max_depth) {
272 size_t advance_by = idx;
278 iterator = cached_iterator->second;
288 ValueObjectSP value_sp = iterated_sp->GetChildMemberWithName(
"_Myval");
301 if (idx >= num_children)
318 name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
328 m_backend.GetChildAtNamePath({
"_Mypair",
"_Myval2",
"_Myval2"}).get();
343 MapEntry entry(node_sp.get());
347 m_inner_sp = node_sp->GetChildMemberWithName(
"_Myval");
360 auto node_sp = valobj_sp->GetChildMemberWithName(
"_Ptr");
364 MapEntry entry(node_sp.get());
365 if (entry.is_nil()) {
370 auto value_sp = node_sp->GetChildMemberWithName(
"_Myval");
374 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.
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