14#include "llvm/Support/ErrorExtras.h"
60 return llvm::createStringError(
"failed to read size");
77 first_idx * process_sp->GetAddressByteSize();
81 process_sp->ReadPointerFromMemory(first_address, err);
89 name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
102 m_backend.GetChildAtNamePath({
"_Mypair",
"_Myval2"});
112 if (!block_size_decl)
115 if (!block_size.
IsValid() || block_size <= 0)
118 ValueObjectSP offset_sp = storage_sp->GetChildMemberWithName(
"_Myoff");
119 ValueObjectSP map_size_sp = storage_sp->GetChildMemberWithName(
"_Mapsize");
120 ValueObjectSP map_sp = storage_sp->GetChildMemberWithName(
"_Map");
121 ValueObjectSP size_sp = storage_sp->GetChildMemberWithName(
"_Mysize");
122 if (!offset_sp || !map_size_sp || !map_sp || !size_sp)
126 uint64_t offset = offset_sp->GetValueAsUnsigned(0, &ok);
130 uint64_t map_size = map_size_sp->GetValueAsUnsigned(0, &ok);
131 if (!ok || map_size == 0)
134 uint64_t size = size_sp->GetValueAsUnsigned(0, &ok);
141 element_type = map_sp->GetCompilerType().GetPointeeType().GetPointeeType();
145 auto element_size_or_err = element_type.
GetByteSize(
nullptr);
146 if (!element_size_or_err) {
148 element_size_or_err.takeError(),
149 "failed to get deque element byte size: {0}");
153 m_map = map_sp.get();
167 return llvm::createStringErrorV(
"type has no child named '{0}'", name);
169 return *optional_idx;
171 return llvm::createStringErrorV(
"type has no child named '{0}'", name);
176 return valobj_sp->GetChildMemberWithName(
"_Mypair") !=
nullptr;
183 return new MsvcStlDequeSyntheticFrontEnd(valobj_sp);
#define LLDB_LOG_ERROR(log, error,...)
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
llvm::Expected< uint64_t > GetByteSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bytes.
CompilerDecl GetStaticFieldWithName(llvm::StringRef name) const
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
Execution context objects refer to objects in the execution of the program that is being debugged.
unsigned long long ULongLong(unsigned long long fail_value=0) const
bool Fail() const
Test for error condition.
llvm::StringRef GetString() const
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
lldb::ValueObjectSP CreateChildValueObjectFromAddress(llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type, bool do_deref=true)
SyntheticChildrenFrontEnd(ValueObject &backend)
virtual lldb::ValueObjectSP GetNonSyntheticValue()
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
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::Process > ProcessSP