14#include "llvm/Support/ErrorExtras.h"
20 return valobj_sp->GetChildMemberWithName(
"_Ptr") !=
nullptr;
31 ValueObjectSP ptr_sp(valobj_sp->GetChildMemberWithName(
"_Ptr"));
32 ValueObjectSP ctrl_sp(valobj_sp->GetChildMemberWithName(
"_Rep"));
33 if (!ctrl_sp || !ptr_sp)
36 uint64_t ctrl_addr = ctrl_sp->GetValueAsUnsigned(0);
54 uses = uses_sp->GetValueAsUnsigned(0, &success);
58 stream.
Printf(
" strong=%" PRIu64, uses);
64 uint64_t count = weak_count_sp->GetValueAsUnsigned(0, &success);
68 stream.
Printf(
" weak=%" PRIu64, count - (uses != 0));
158 ValueObjectSP ptr_obj_sp = valobj_sp->GetChildMemberWithName(
"_Ptr");
167 m_ptr_obj = cast_ptr_sp->Clone(
"pointer").get();
171llvm::Expected<size_t>
174 if (name ==
"pointer")
177 if (name ==
"object" || name ==
"$$dereference$$")
180 return llvm::createStringErrorV(
"type has no child named '{0}'", name);
194 return valobj_sp->GetChildMemberWithName(
"_Mypair") !=
nullptr;
205 ValueObjectSP ptr_sp(valobj_sp->GetChildAtNamePath({
"_Mypair",
"_Myval2"}));
257 ValueObjectSP pair_sp = valobj_sp->GetChildMemberWithName(
"_Mypair");
261 if (
auto value_ptr_sp = pair_sp->GetChildMemberWithName(
"_Myval2"))
265 if (
auto deleter_sp = pair_sp->GetChildMemberWithName(
"_Myval1"))
271llvm::Expected<size_t>
274 if (name ==
"pointer")
276 if (name ==
"deleter")
278 if (name ==
"obj" || name ==
"object" || name ==
"$$dereference$$")
280 return llvm::createStringErrorV(
"type has no child named '{0}'", name);
bool Success() const
Test for success condition.
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.
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