aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
diff options
context:
space:
mode:
authorMed Ismail Bennani <ismail@bennani.ma>2023-10-30 16:52:17 -0700
committerGitHub <noreply@github.com>2023-10-30 16:52:17 -0700
commit4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce (patch)
tree4d1348946d3a079d0c929de12280dd804854aad7 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
parentc2f642d90d33a4e6c987b52e22eca4221c86c601 (diff)
downloadllvm-4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce.zip
llvm-4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce.tar.gz
llvm-4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce.tar.bz2
[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface & ScriptedPythonInterface facilities by introducing 2 ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes. This allows us to get rid of every ScriptedThreadPlan-specific SWIG method and re-use the same affordances as other scripting offordances, like Scripted{Process,Thread,Platform} & OperatingSystem. To do so, this adds new transformer methods for `ThreadPlan`, `Stream` & `Event`, to allow the bijection between C++ objects and their python counterparts. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h28
1 files changed, 3 insertions, 25 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
index a3349981..da8e3a6 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
@@ -78,33 +78,8 @@ public:
CreateScriptCommandObject(const char *class_name) override;
StructuredData::ObjectSP
- CreateScriptedThreadPlan(const char *class_name,
- const StructuredDataImpl &args_data,
- std::string &error_str,
- lldb::ThreadPlanSP thread_plan) override;
-
- StructuredData::ObjectSP
CreateStructuredDataFromScriptObject(ScriptObject obj) override;
- bool ScriptedThreadPlanExplainsStop(StructuredData::ObjectSP implementor_sp,
- Event *event,
- bool &script_error) override;
-
- bool ScriptedThreadPlanShouldStop(StructuredData::ObjectSP implementor_sp,
- Event *event, bool &script_error) override;
-
- bool ScriptedThreadPlanIsStale(StructuredData::ObjectSP implementor_sp,
- bool &script_error) override;
-
- lldb::StateType
- ScriptedThreadPlanGetRunState(StructuredData::ObjectSP implementor_sp,
- bool &script_error) override;
-
- bool
- ScriptedThreadPlanGetStopDescription(StructuredData::ObjectSP implementor_sp,
- lldb_private::Stream *s,
- bool &script_error) override;
-
StructuredData::GenericSP
CreateScriptedBreakpointResolver(const char *class_name,
const StructuredDataImpl &args_data,
@@ -136,6 +111,9 @@ public:
lldb::ScriptedThreadInterfaceSP CreateScriptedThreadInterface() override;
+ lldb::ScriptedThreadPlanInterfaceSP
+ CreateScriptedThreadPlanInterface() override;
+
lldb::OperatingSystemInterfaceSP CreateOperatingSystemInterface() override;
StructuredData::ObjectSP