13#include "llvm/Support/ErrorExtras.h"
29 ValueObjectSP ptr_sp = obj->GetChildMemberWithName(
"__size_");
32 const size_t size = ptr_sp->GetValueAsUnsigned(0);
34 ptr_sp = obj->GetChildMemberWithName(
"__stride_");
37 const size_t stride = ptr_sp->GetValueAsUnsigned(0);
39 stream.
Printf(
"stride=%zu size=%zu", stride, size);
110 offset = offset +
m_start->GetValueAsUnsigned(0);
112 name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
127 if (std::optional<uint64_t> size =
138 if (!start || !size || !stride)
142 m_size = size->GetValueAsUnsigned(0);
143 m_stride = stride->GetValueAsUnsigned(0);
148llvm::Expected<size_t>
152 return llvm::createStringErrorV(
"type has no child named '{0}'", name);
155 return llvm::createStringErrorV(
"type has no child named '{0}'", name);
157 return *optional_idx;
Generic representation of a type in a programming language.
CompilerType GetTypeTemplateArgument(size_t idx, bool expand_pack=false) const
size_t GetNumTemplateArguments(bool expand_pack=false) const
Return the number of template arguments the type has.
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
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.
SyntheticChildrenFrontEnd(ValueObject &backend)
lldb::ValueObjectSP CreateValueObjectFromAddress(llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type, bool do_deref=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