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] ==
'[')
59 if (*expr_cstr ==
'.')
61 else if (*expr_cstr ==
'-' && *(expr_cstr + 1) ==
'>')
65 if (!::strcmp(name_cstr, expr_cstr))
79 for (
size_t i = 0; i <
GetCount(); i++) {
95 m_description(description ? description :
"") {}
122 return *value_or_err;
129 llvm::StringRef name, llvm::StringRef expression,
134 valobj_sp->SetSyntheticChildrenGenerated(
true);
144 valobj_sp->SetSyntheticChildrenGenerated(
true);
154 valobj_sp->SetSyntheticChildrenGenerated(
true);
161 m_wrapper_sp(), m_interpreter(nullptr) {
170 m_interpreter = target_sp->GetDebugger().GetScriptInterpreter();
181 if (!m_wrapper_sp || !m_interpreter)
184 return m_interpreter->GetChildAtIndex(m_wrapper_sp, idx);
188 return (m_wrapper_sp && m_wrapper_sp->IsValid() && m_interpreter);
191llvm::Expected<uint32_t>
193 if (!m_wrapper_sp || m_interpreter ==
nullptr)
195 return m_interpreter->CalculateNumChildren(m_wrapper_sp,
UINT32_MAX);
198llvm::Expected<uint32_t>
200 if (!m_wrapper_sp || m_interpreter ==
nullptr)
202 return m_interpreter->CalculateNumChildren(m_wrapper_sp, max);
206 if (!m_wrapper_sp || m_interpreter ==
nullptr)
209 return m_interpreter->UpdateSynthProviderInstance(m_wrapper_sp)
215 if (!m_wrapper_sp || m_interpreter ==
nullptr)
218 return m_interpreter->MightHaveChildrenSynthProviderInstance(m_wrapper_sp);
223 if (!m_wrapper_sp || m_interpreter ==
nullptr)
225 return m_interpreter->GetIndexOfChildWithName(m_wrapper_sp,
230 if (!m_wrapper_sp || m_interpreter ==
nullptr)
233 return m_interpreter->GetSyntheticValue(m_wrapper_sp);
237 if (!m_wrapper_sp || m_interpreter ==
nullptr)
240 return m_interpreter->GetSyntheticTypeName(m_wrapper_sp);
245 sstr.
Printf(
"%s%s%s Python class %s",
Cascades() ?
"" :
" (not cascading)",
#define LLDB_LOG_ERRORV(log, error,...)
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 * GetCString() const
Get the string value as a C string.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
virtual StructuredData::ObjectSP CreateSyntheticScriptedProvider(const char *class_name, lldb::ValueObjectSP valobj)
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
lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override
ScriptInterpreter * m_interpreter
FrontEnd(std::string pclass, ValueObject &backend)
lldb::ValueObjectSP GetSyntheticValue() override
size_t GetIndexOfChildWithName(ConstString name) 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
lldb::ValueObjectSP CreateValueObjectFromAddress(llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type)
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
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