aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
index 0c6f308..cffa3bd 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
@@ -80,8 +80,21 @@ Status ScriptedProcessPythonInterface::Launch() {
}
Status ScriptedProcessPythonInterface::Resume() {
- // When calling ScriptedProcess.Resume from lldb we should always stop.
- return GetStatusFromMethod("resume", /*should_stop=*/true);
+ return GetStatusFromMethod("resume");
+}
+
+bool ScriptedProcessPythonInterface::ShouldStop() {
+ Status error;
+ StructuredData::ObjectSP obj = Dispatch("is_alive", error);
+
+ if (!CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error))
+ return {};
+
+ return obj->GetBooleanValue();
+}
+
+Status ScriptedProcessPythonInterface::Stop() {
+ return GetStatusFromMethod("stop");
}
std::optional<MemoryRegionInfo>