diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-04-25 00:58:03 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-04-25 00:58:03 +0000 |
| commit | 6d98f56c581f16b246c08bdb54fa5801f713c493 (patch) | |
| tree | d390cef11fb59a1004bb667337c5f85357dc1ad9 /lldb/source/Interpreter/ScriptInterpreterPython.cpp | |
| parent | 62079b43cc9ac2d7f6adeadca12c58eb142d4195 (diff) | |
| download | bcm5719-llvm-6d98f56c581f16b246c08bdb54fa5801f713c493.tar.gz bcm5719-llvm-6d98f56c581f16b246c08bdb54fa5801f713c493.zip | |
Maked LLDB into a package so we can import things without poluting the global namespace.
Enrico will follow this up with fixing the data formatter test cases that are failing.
llvm-svn: 155514
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp')
| -rw-r--r-- | lldb/source/Interpreter/ScriptInterpreterPython.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 39c111704fe..3c1139f8ce2 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -296,13 +296,14 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete int old_count = Debugger::TestDebuggerRefCount(); - run_string.Printf ("run_one_line (%s, 'import copy, os, re, sys, uuid, lldb, gnu_libstdcpp, libcxx, objc, Logger')", m_dictionary_name.c_str()); + run_string.Printf ("run_one_line (%s, 'import copy, os, re, sys, uuid, lldb')", m_dictionary_name.c_str()); PyRun_SimpleString (run_string.GetData()); // WARNING: temporary code that loads Cocoa formatters - this should be done on a per-platform basis rather than loading the whole set // and letting the individual formatter classes exploit APIs to check whether they can/cannot do their task run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'import CFString, CFArray, CFDictionary, NSData, NSMachPort, NSSet, NSNotification, NSException, CFBag, CFBinaryHeap, NSURL, NSBundle, NSNumber, NSDate, NSIndexSet, Selector, Class, CFBitVector')", m_dictionary_name.c_str()); + //run_string.Printf ("run_one_line (%s, 'from lldb.formatters import *; from lldb.formatters.objc import *; from lldb.formatters.cpp import *')", m_dictionary_name.c_str()); + run_string.Printf ("run_one_line (%s, 'from lldb.formatters import *')", m_dictionary_name.c_str()); PyRun_SimpleString (run_string.GetData()); int new_count = Debugger::TestDebuggerRefCount(); @@ -1961,13 +1962,7 @@ ScriptInterpreterPython::InitializePrivate () } } - PyRun_SimpleString ("sys.dont_write_bytecode = 1"); - - PyRun_SimpleString ("import embedded_interpreter"); - - PyRun_SimpleString ("from embedded_interpreter import run_python_interpreter"); - PyRun_SimpleString ("from embedded_interpreter import run_one_line"); - PyRun_SimpleString ("from termios import *"); + PyRun_SimpleString ("sys.dont_write_bytecode = 1; import lldb.embedded_interpreter; from lldb.embedded_interpreter import run_python_interpreter; from lldb.embedded_interpreter import run_one_line; from termios import *"); stdin_tty_state.Restore(); } |

