diff options
author | Enrico Granata <egranata@apple.com> | 2012-10-29 21:18:03 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2012-10-29 21:18:03 +0000 |
commit | b588726ec976f38ceacb8ae2aff97c2631073142 (patch) | |
tree | 8d310ea112804f62135cfd68090e48a030abc5b2 /lldb/source/Core/Debugger.cpp | |
parent | 8f4d7eb518d7dd6309de9f0f1211b04265e8b1fd (diff) | |
download | bcm5719-llvm-b588726ec976f38ceacb8ae2aff97c2631073142.tar.gz bcm5719-llvm-b588726ec976f38ceacb8ae2aff97c2631073142.zip |
<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
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 673b077fc62..38baac44293 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -681,7 +681,12 @@ Debugger::SetOutputFileHandle (FILE *fh, bool tranfer_ownership) if (out_file.IsValid() == false) out_file.SetStream (stdout, false); - GetCommandInterpreter().GetScriptInterpreter()->ResetOutputFileHandle (fh); + // do not create the ScriptInterpreter just for setting the output file handle + // as the constructor will know how to do the right thing on its own + const bool can_create = false; + ScriptInterpreter* script_interpreter = GetCommandInterpreter().GetScriptInterpreter(can_create); + if (script_interpreter) + script_interpreter->ResetOutputFileHandle (fh); } void |