12#include "llvm/Support/ErrorExtras.h"
59 return storage_sp->Cast(element_type);
100llvm::Expected<size_t>
103 if (name ==
"Value" || (
m_is_smart_ptr && name ==
"$$dereference$$"))
105 return llvm::createStringErrorV(
"type has no child named '{0}'", name);
111 bool is_smart_ptr =
false;
120 llvm::StringRef pointee_name = locked_name;
121 if (!pointee_name.consume_front(
"std::_Locked_pointer<"))
123 if (!pointee_name.consume_back(
">"))
126 TypeQuery query(pointee_name, TypeQueryOptions::e_find_one);
130 return type_sp->GetFullCompilerType();
152 uint64_t rep_ptr_val = rep_ptr_sp->GetValueAsUnsigned(0, &ok);
164 rep_ptr_val &= rep_ptr_mask;
167 if (!ref_count_base) {
196 ValueObjectSP smart_ptr_rep = non_synth->GetChildMemberWithName(
"_Repptr");
202 if (value_sp->GetSummaryAsCString(summary, options) && !summary.empty()) {
210 bool *is_smart_ptr) {
212 bool has_storage = valobj_sp->GetChildMemberWithName(
"_Storage") !=
nullptr;
214 !has_storage && valobj_sp->GetChildMemberWithName(
"_Ptr") !=
nullptr;
216 *is_smart_ptr = has_smart;
218 return has_storage || has_smart;
static CompilerType FindLockedPointeeType(Target &target, const CompilerType &locked_ptr_type)
static ValueObjectSP ValueOfAtomic(ValueObject &valobj)
static bool AtomicSharedPtrSummaryProvider(ValueObject &ptr, ValueObject &rep_wrap, Stream &stream, const TypeSummaryOptions &options)
Represents a generic declaration such as a function declaration.
Scalar GetConstantValue() const
Generic representation of a type in a programming language.
CompilerType GetTypeTemplateArgument(size_t idx, bool expand_pack=false) const
CompilerDecl GetStaticFieldWithName(llvm::StringRef name) const
CompilerType GetDirectNestedTypeWithName(llvm::StringRef name) const
ConstString GetTypeName(bool BaseOnly=false) const
A uniqued constant string class.
void FindTypes(Module *search_first, const TypeQuery &query, lldb_private::TypeResults &results) const
Find types using a type-matching object that contains all search parameters.
unsigned long long ULongLong(unsigned long long fail_value=0) const
A stream class that can stream formatted output to a file.
SyntheticChildrenFrontEnd(ValueObject &backend)
const ModuleList & GetImages() const
Get accessor for the images for this process.
A class that contains all state required for type lookups.
This class tracks the state and results of a TypeQuery.
lldb::TypeSP GetFirstType() const
virtual lldb::ValueObjectSP GetChildAtIndex(uint32_t idx, bool can_create=true)
virtual lldb::ValueObjectSP GetChildMemberWithName(llvm::StringRef name, bool can_create=true)
lldb::TargetSP GetTargetSP() const
CompilerType GetCompilerType()
virtual lldb::ValueObjectSP GetNonSyntheticValue()
const ExecutionContextRef & GetExecutionContextRef() const
static lldb::ValueObjectSP CreateValueObjectFromAddress(llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type, bool do_deref=true, ValueObject *parent=nullptr)
Given an address either create a value object containing the value at that address,...
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::Type > TypeSP
std::shared_ptr< lldb_private::Target > TargetSP