Any commands that are executed through the public interface using SBCommandInterpreter::HandleCommand() are assumed to be in non-interactive mode.

Any commands that want interactivity (stdin) will need to be executed through the normal command interpreter using the debugger's in/out/err file handles, or by using "command source".

Individual commands through the API will have their STDIN disabled. The STDOUT and STDERR will be redirected into the SBCommandReturnObject argument to SBCommandInterpreter::HandleCommand() as usual.

This helps with a deadlock situation in an IDE (Xcode) where the IDE was managing the breakpoint actions by setting a breakpoint callback and doing things manually.

<rdar://problem/17386271>

llvm-svn: 213023
This commit is contained in:
Greg Clayton
2014-07-15 00:25:59 +00:00
parent 5a477c5e37
commit 45a44f3c4d
4 changed files with 31 additions and 5 deletions

View File

@@ -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,