27 bool need_add_dot =
true;
28 if (path[0] ==
'.' || (path[0] ==
'-' && path[1] ==
'>') || path[0] ==
'[')
38 const std::string &path) {
41 bool need_add_dot =
true;
42 if (path[0] ==
'.' || (path[0] ==
'-' && path[1] ==
'>') || path[0] ==
'[')
56 for (
size_t i = 0; i <
filter->GetCount(); i++) {
57 const char *expr_cstr =
filter->GetExpressionPathAtIndex(i);
59 if (*expr_cstr ==
'.')
61 else if (*expr_cstr ==
'-' && *(expr_cstr + 1) ==
'>')
65 if (!::strcmp(name_cstr, expr_cstr))
70 return llvm::createStringError(
"Type has no child named '%s'",
80 for (
size_t i = 0; i <
GetCount(); i++) {
123 return *value_or_err;
130 llvm::StringRef name, llvm::StringRef expression,
135 valobj_sp->SetSyntheticChildrenGenerated(
true);
143 name, address, exe_ctx, type, do_deref));
145 valobj_sp->SetSyntheticChildrenGenerated(
true);
155 valobj_sp->SetSyntheticChildrenGenerated(
true);
171 m_interpreter = target_sp->GetDebugger().GetScriptInterpreter();
192llvm::Expected<uint32_t>
199llvm::Expected<uint32_t>
222llvm::Expected<size_t>
225 return llvm::createStringError(
"Type has no child named '%s'",
247 sstr.
Printf(
"%s%s%s Python class %s",
Cascades() ?
"" :
" (not cascading)",
#define LLDB_LOG_ERRORV(log, error,...)
CreateFrontEndCallback m_create_callback
virtual ~CXXSyntheticChildren()
std::string m_description
std::string GetDescription() override
CXXSyntheticChildren(const SyntheticChildren::Flags &flags, const char *description, CreateFrontEndCallback callback)
std::function< SyntheticChildrenFrontEnd *(CXXSyntheticChildren *, lldb::ValueObjectSP)> CreateFrontEndCallback
Generic representation of a type in a programming language.
A uniqued constant string class.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
const char * GetCString() const
Get the string value as a C string.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
lldb::ChildCacheState Update() override
This function is assumed to always succeed and if it fails, the front-end should know to deal with it...
std::string m_python_class
llvm::Expected< size_t > GetIndexOfChildWithName(ConstString name) override
lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override
ScriptInterpreter * m_interpreter
FrontEnd(std::string pclass, ValueObject &backend)
lldb::ValueObjectSP GetSyntheticValue() override
llvm::Expected< uint32_t > CalculateNumChildren() override
ConstString GetSyntheticTypeName() override
StructuredData::ObjectSP m_wrapper_sp
bool MightHaveChildren() override
std::string GetDescription() override
std::string m_python_class
llvm::StringRef GetString() const
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
uint32_t CalculateNumChildrenIgnoringErrors(uint32_t max=UINT32_MAX)
lldb::ValueObjectSP CreateValueObjectFromExpression(llvm::StringRef name, llvm::StringRef expression, const ExecutionContext &exe_ctx)
std::unique_ptr< SyntheticChildrenFrontEnd > AutoPointer
lldb::ValueObjectSP CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type)
virtual llvm::Expected< uint32_t > CalculateNumChildren()=0
SyntheticChildrenFrontEnd(ValueObject &backend)
lldb::ValueObjectSP CreateValueObjectFromAddress(llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type, bool do_deref=true)
virtual std::string GetDescription()=0
bool SkipsPointers() const
virtual SyntheticChildrenFrontEnd::AutoPointer GetFrontEnd(ValueObject &backend)=0
SyntheticChildren(const Flags &flags)
bool SkipsReferences() const
virtual ~SyntheticChildren()
virtual bool IsScripted()=0
llvm::Expected< size_t > GetIndexOfChildWithName(ConstString name) override
bool SetExpressionPathAtIndex(size_t i, const char *path)
const char * GetExpressionPathAtIndex(size_t i) const
void AddExpressionPath(const char *path)
std::string GetDescription() override
std::vector< std::string > m_expression_paths
static lldb::ValueObjectSP CreateValueObjectFromExpression(llvm::StringRef name, llvm::StringRef expression, const ExecutionContext &exe_ctx)
lldb::ValueObjectSP GetSP()
lldb::user_id_t GetID() const
Returns a unique id for this ValueObject.
static lldb::ValueObjectSP CreateValueObjectFromAddress(llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type, bool do_deref=true)
Given an address either create a value object containing the value at that address,...
static lldb::ValueObjectSP CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type)
lldb::TargetSP GetTargetSP() const
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.
@ eReuse
Children did not change and don't need to be recomputed; re-use what we computed the last time we cal...
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::Target > TargetSP