<rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it does not automatically initialize the script interpreter in order to transfer its output file handle to it
This should delay initialization of Python until strictly necessary and speed-up debugger startup Also, convert formatters for SEL and BOOL ObjC data-types from Python to C++, in order to reap more performance benefits from the above changes llvm-svn: 166967
This commit is contained in:
@@ -501,6 +501,11 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete
|
||||
{
|
||||
m_new_sysout = PyFile_FromFile (m_dbg_stdout, (char *) "", (char *) "w", _check_and_flush);
|
||||
}
|
||||
|
||||
// get the output file handle from the debugger (if any)
|
||||
File& out_file = interpreter.GetDebugger().GetOutputFile();
|
||||
if (out_file.IsValid())
|
||||
ResetOutputFileHandle(out_file.GetStream());
|
||||
}
|
||||
|
||||
ScriptInterpreterPython::~ScriptInterpreterPython ()
|
||||
|
||||
Reference in New Issue
Block a user