summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/CommandReturnObject.cpp18
-rw-r--r--lldb/source/Interpreter/ScriptInterpreterPython.cpp4
2 files changed, 19 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/CommandReturnObject.cpp b/lldb/source/Interpreter/CommandReturnObject.cpp
index af9196f2894..1b541873506 100644
--- a/lldb/source/Interpreter/CommandReturnObject.cpp
+++ b/lldb/source/Interpreter/CommandReturnObject.cpp
@@ -46,7 +46,8 @@ CommandReturnObject::CommandReturnObject () :
m_out_stream (),
m_err_stream (),
m_status (eReturnStatusStarted),
- m_did_change_process_state (false)
+ m_did_change_process_state (false),
+ m_interactive (true)
{
}
@@ -203,6 +204,7 @@ CommandReturnObject::Clear()
static_cast<StreamString *>(stream_sp.get())->Clear();
m_status = eReturnStatusStarted;
m_did_change_process_state = false;
+ m_interactive = true;
}
bool
@@ -217,3 +219,17 @@ CommandReturnObject::SetDidChangeProcessState (bool b)
m_did_change_process_state = b;
}
+
+bool
+CommandReturnObject::GetInteractive () const
+{
+ return m_interactive;
+}
+
+void
+CommandReturnObject::SetInteractive (bool b)
+{
+ m_interactive = b;
+}
+
+
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
index 5803fe7be25..ac4b29f1040 100644
--- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
@@ -2438,7 +2438,7 @@ ScriptInterpreterPython::RunScriptBasedCommand(const char* impl_function,
{
error.SetErrorString("invalid Debugger pointer");
return false;
- }
+ }
bool ret_val = false;
@@ -2446,7 +2446,7 @@ ScriptInterpreterPython::RunScriptBasedCommand(const char* impl_function,
{
Locker py_lock(this,
- Locker::AcquireLock | Locker::InitSession,
+ Locker::AcquireLock | Locker::InitSession | cmd_retobj.GetInteractive() ? 0 : Locker::NoSTDIN,
Locker::FreeLock | Locker::TearDownSession);
SynchronicityHandler synch_handler(debugger_sp,
OpenPOWER on IntegriCloud