33llvm::Expected<StructuredData::GenericSP>
38 std::make_shared<ExecutionContextRef>(exe_ctx);
40 scripted_metadata, script_obj, exe_ctx_ref_sp,
59 std::make_shared<ProcessAttachInfo>(attach_info);
72std::optional<MemoryRegionInfo>
76 "get_memory_region_containing_address",
error, address);
106 error = std::move(py_error);
112 return obj->GetBooleanValue();
119 "read_memory_at_address", py_error, address, size,
error);
123 error = std::move(py_error);
132 Dispatch(
"write_memory_at_address", py_error, addr, data_sp,
error);
140 error = std::move(py_error);
176 return obj->GetBooleanValue();
179std::optional<std::string>
188 return obj->GetStringValue().str();
209 const std::vector<llvm::StringRef> ci_usages = {
210 "process attach -C <script-name> [-k key -v value ...]",
211 "process launch -C <script-name> [-k key -v value ...]"};
212 const std::vector<llvm::StringRef> api_usages = {
213 "SBAttachInfo.SetScriptedProcessClassName",
214 "SBAttachInfo.SetScriptedProcessDictionary",
216 "SBLaunchInfo.SetScriptedProcessClassName",
217 "SBLaunchInfo.SetScriptedProcessDictionary",
static llvm::raw_ostream & error(Stream &strm)
ScriptInterpreterPythonImpl::Locker Locker
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
static Ret ErrorWithMessage(llvm::StringRef caller_name, llvm::StringRef error_msg, Status &error, LLDBLog log_category=LLDBLog::Process)
static bool CheckStructuredDataObject(llvm::StringRef caller, T obj, Status &error)
static bool CreateInstance(lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)
StructuredData::DictionarySP GetThreadsInfo() override
lldb::ScriptedThreadInterfaceSP CreateScriptedThreadInterface() override
StructuredData::DictionarySP GetMetadata() override
lldb::DataExtractorSP ReadMemoryAtAddress(lldb::addr_t address, size_t size, Status &error) override
StructuredData::ArraySP GetLoadedImages() override
std::optional< std::string > GetScriptedThreadPluginName() override
llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, ExecutionContext &exe_ctx, StructuredData::Generic *script_obj=nullptr) override
bool CreateBreakpoint(lldb::addr_t addr, Status &error) override
Status Attach(const ProcessAttachInfo &attach_info) override
std::optional< MemoryRegionInfo > GetMemoryRegionContainingAddress(lldb::addr_t address, Status &error) override
static llvm::StringRef GetPluginNameStatic()
lldb::pid_t GetProcessID() override
lldb::offset_t WriteMemoryAtAddress(lldb::addr_t addr, lldb::DataExtractorSP data_sp, Status &error) override
ScriptedProcessPythonInterface(ScriptInterpreterPythonImpl &interpreter)
StructuredData::DictionarySP GetCapabilities() override
Status GetStatusFromMethod(llvm::StringRef method_name, Args &&...args)
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)
bool Fail() const
Test for error condition.
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Object > ObjectSP
std::shared_ptr< Array > ArraySP
#define LLDB_INVALID_OFFSET
#define LLDB_INVALID_PROCESS_ID
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ProcessAttachInfo > ProcessAttachInfoSP
std::shared_ptr< lldb_private::ScriptedThreadInterface > ScriptedThreadInterfaceSP
std::shared_ptr< lldb_private::DataExtractor > DataExtractorSP
std::shared_ptr< lldb_private::ExecutionContextRef > ExecutionContextRefSP