aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2023-03-06 13:17:43 -0800
committerMed Ismail Bennani <medismail.bennani@gmail.com>2023-03-06 13:17:43 -0800
commit20dbb29a1a94c60b556f8880ab841b150e83ab25 (patch)
treea51e3f55ca4408385bec8486808680dc705d06bf /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
parent480eb744982f2cecd9aa75ef32910fe023d8d4dc (diff)
downloadllvm-20dbb29a1a94c60b556f8880ab841b150e83ab25.zip
llvm-20dbb29a1a94c60b556f8880ab841b150e83ab25.tar.gz
llvm-20dbb29a1a94c60b556f8880ab841b150e83ab25.tar.bz2
Revert "[lldb] Move ScriptedProcess private state update to implementation"
This reverts commit 3c33d72e7fa83beb8a9b39fb3b8ecf4ee00c697d.
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>