aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h5
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp22
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h5
3 files changed, 30 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
index 7e33c07..78b1375 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
@@ -148,6 +148,11 @@ python::PythonObject LLDBSwigPythonCreateScriptedThreadPlan(
bool LLDBSWIGPythonCallThreadPlan(void *implementor, const char *method_name,
lldb_private::Event *event_sp,
bool &got_error);
+
+bool LLDBSWIGPythonCallThreadPlan(void *implementor,
+ const char *method_name,
+ lldb_private::Stream *stream,
+ bool &got_error);
python::PythonObject LLDBSwigPythonCreateScriptedBreakpointResolver(
const char *python_class_name, const char *session_dictionary_name,
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 3af3c87..a98ac58 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -1743,7 +1743,7 @@ bool ScriptInterpreterPythonImpl::ScriptedThreadPlanIsStale(
Locker py_lock(this,
Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
is_stale = LLDBSWIGPythonCallThreadPlan(generic->GetValue(), "is_stale",
- nullptr, script_error);
+ (Event *) nullptr, script_error);
if (script_error)
return true;
}
@@ -1760,7 +1760,7 @@ lldb::StateType ScriptInterpreterPythonImpl::ScriptedThreadPlanGetRunState(
Locker py_lock(this,
Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
should_step = LLDBSWIGPythonCallThreadPlan(
- generic->GetValue(), "should_step", nullptr, script_error);
+ generic->GetValue(), "should_step", (Event *) nullptr, script_error);
if (script_error)
should_step = true;
}
@@ -1769,6 +1769,24 @@ lldb::StateType ScriptInterpreterPythonImpl::ScriptedThreadPlanGetRunState(
return lldb::eStateRunning;
}
+bool
+ScriptInterpreterPythonImpl::ScriptedThreadPlanGetStopDescription(
+ StructuredData::ObjectSP implementor_sp, lldb_private::Stream *stream,
+ bool &script_error) {
+ StructuredData::Generic *generic = nullptr;
+ if (implementor_sp)
+ generic = implementor_sp->GetAsGeneric();
+ if (!generic) {
+ script_error = true;
+ return false;
+ }
+ Locker py_lock(this,
+ Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
+ return LLDBSWIGPythonCallThreadPlan(generic->GetValue(), "stop_description",
+ stream, script_error);
+}
+
+
StructuredData::GenericSP
ScriptInterpreterPythonImpl::CreateScriptedBreakpointResolver(
const char *class_name, const StructuredDataImpl &args_data,
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
index 21fdf12..b810bdb 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
@@ -97,6 +97,11 @@ public:
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,