19 return valobj_sp->GetChildMemberWithName(
"_Ptr") !=
nullptr;
30 ValueObjectSP ptr_sp(valobj_sp->GetChildMemberWithName(
"_Ptr"));
31 ValueObjectSP ctrl_sp(valobj_sp->GetChildMemberWithName(
"_Rep"));
32 if (!ctrl_sp || !ptr_sp)
38 uint64_t ctrl_addr = ctrl_sp->GetValueAsUnsigned(0, &success);
40 if (!success || ctrl_addr == 0)
44 if (
auto uses_sp = ctrl_sp->GetChildMemberWithName(
"_Uses")) {
46 uses = uses_sp->GetValueAsUnsigned(0, &success);
50 stream.
Printf(
" strong=%" PRIu64, uses);
54 if (
auto weak_count_sp = ctrl_sp->GetChildMemberWithName(
"_Weaks")) {
56 uint64_t count = weak_count_sp->GetValueAsUnsigned(0, &success);
60 stream.
Printf(
" weak=%" PRIu64, count - (uses != 0));
150 auto ptr_obj_sp = valobj_sp->GetChildMemberWithName(
"_Ptr");
162llvm::Expected<size_t>
165 if (name ==
"pointer")
168 if (name ==
"object" || name ==
"$$dereference$$")
171 return llvm::createStringError(
"Type has no child named '%s'",
186 return valobj_sp->GetChildMemberWithName(
"_Mypair") !=
nullptr;
197 ValueObjectSP ptr_sp(valobj_sp->GetChildAtNamePath({
"_Mypair",
"_Myval2"}));
249 ValueObjectSP pair_sp = valobj_sp->GetChildMemberWithName(
"_Mypair");
253 if (
auto value_ptr_sp = pair_sp->GetChildMemberWithName(
"_Myval2"))
257 if (
auto deleter_sp = pair_sp->GetChildMemberWithName(
"_Myval1"))
263llvm::Expected<size_t>
266 if (name ==
"pointer")
268 if (name ==
"deleter")
270 if (name ==
"obj" || name ==
"object" || name ==
"$$dereference$$")
272 return llvm::createStringError(
"Type has no child named '%s'",
A uniqued constant string class.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
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 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