diff options
author | Enrico Granata <egranata@apple.com> | 2012-03-29 19:29:45 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2012-03-29 19:29:45 +0000 |
commit | d50f18b1a04dbf18019e6d5dae62c1852b3c9b7b (patch) | |
tree | bc48213d1281a69296b8fec11676096eae54a381 /lldb/source/Interpreter/ScriptInterpreterPython.cpp | |
parent | 751aac610a7c6213e7f5720944f94df0b973af38 (diff) | |
download | bcm5719-llvm-d50f18b1a04dbf18019e6d5dae62c1852b3c9b7b.tar.gz bcm5719-llvm-d50f18b1a04dbf18019e6d5dae62c1852b3c9b7b.zip |
Part 1 of a series of fixes meant to improve reliability and increase ease of bug fixing for data formatter issues.
We are introducing a new Logger class on the Python side. This has the same purpose, but is unrelated, to the C++ logging facility
The Pythonic logging can be enabled by using the following scripting commands:
(lldb) script Logger._lldb_formatters_debug_level = {0,1,2,...}
0 = no logging
1 = do log
2 = flush after logging each line - slower but safer
3 or more = each time a Logger is constructed, log the function that has created it
more log levels may be added, each one being more log-active than the previous
by default, the log output will come out on your screen, to direct it to a file:
(lldb) script Logger._lldb_formatters_debug_filename = 'filename'
that will make the output go to the file - set to None to disable the file output and get screen logging back
Logging has been enabled for the C++ STL formatters and for Cocoa class NSData - more logging will follow
synthetic children providers for classes list and map (both libstdcpp and libcxx) now have internal capping for safety reasons
this will fix crashers where a malformed list or map would not ever meet our termination conditions
to set the cap to a different value:
(lldb) script {gnu_libstdcpp|libcxx}.{map|list}_capping_size = new_cap (by default, it is 255)
you can optionally disable the loop detection algorithm for lists
(lldb) script {gnu_libstdcpp|libcxx}.list_uses_loop_detector = False
llvm-svn: 153676
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp')
-rw-r--r-- | lldb/source/Interpreter/ScriptInterpreterPython.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 42053bbf16c..afde01fbebd 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -296,8 +296,7 @@ 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')", m_dictionary_name.c_str()); + run_string.Printf ("run_one_line (%s, 'import copy, os, re, sys, uuid, lldb, gnu_libstdcpp, libcxx, objc, Logger')", 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 |