31llvm::Expected<StructuredData::GenericSP>
34 if (class_name.empty())
35 return llvm::createStringError(
"empty class name");
39 return llvm::createStringError(
"invalid backing value");
55 scripted_metadata,
nullptr, std::move(val_arg));
58llvm::Expected<uint32_t>
67 return std::min<uint32_t>(obj->GetUnsignedIntegerValue(), max);
76llvm::Expected<uint32_t>
84 return llvm::createStringErrorV(
"type has no child named '{0}'", name);
90 if (obj->GetAsSignedInteger())
91 return llvm::createStringErrorV(
"type has no child named '{0}'", name);
92 return static_cast<uint32_t
>(obj->GetUnsignedIntegerValue());
112 return obj->GetBooleanValue();
131 const std::vector<llvm::StringRef> ci_usages = {
132 "type synthetic add -l <ClassName> <TypeName>"};
133 const std::vector<llvm::StringRef> api_usages = {
134 "SBTypeSynthetic.CreateWithClassName"};
137 "Provide synthetic children for a type, used by 'type synthetic add -l'",
static llvm::raw_ostream & error(Stream &strm)
ScriptInterpreterPythonImpl::Locker Locker
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
static bool CheckStructuredDataObject(llvm::StringRef caller, T obj, Status &error)
static bool CreateInstance(lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)
ScriptInterpreterPythonImpl & m_interpreter
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
T Dispatch(llvm::StringRef method_name, Status &error, Args &&...args)
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, StructuredData::Generic *script_obj, Args... args)
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, ValueObject &backend) override
bool MightHaveChildren() override
ScriptedSyntheticChildrenPythonInterface(ScriptInterpreterPythonImpl &interpreter)
ConstString GetSyntheticTypeName() override
lldb::ValueObjectSP GetSyntheticValue() override
llvm::Expected< uint32_t > CalculateNumChildren(uint32_t max) override
lldb::ChildCacheState Update() override
lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override
llvm::Expected< uint32_t > GetIndexOfChildWithName(ConstString name) override
static llvm::StringRef GetPluginNameStatic()
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Object > ObjectSP
lldb::ValueObjectSP GetSP()
static PythonObject ToSWIGWrapper(std::unique_ptr< lldb::SBValue > value_sb)
A class that represents a running process on the host machine.
@ eScriptedExtensionScriptedSyntheticChildren
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