<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:
Enrico Granata
2012-10-29 21:18:03 +00:00
parent 8f4d7eb518
commit b588726ec9
7 changed files with 123 additions and 31 deletions

View File

@@ -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 ()