diff options
author | Greg Clayton <gclayton@apple.com> | 2012-10-08 22:41:53 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-10-08 22:41:53 +0000 |
commit | 3a18e319450a1fd9031f9879a2c3894d17338b95 (patch) | |
tree | 7ff118da3d533e819cefa0f115200dfca9a8f600 /lldb/source/Commands/CommandObjectLog.cpp | |
parent | ae23ed336b1ffc496b2fdd537e05bc91273dca4d (diff) | |
download | bcm5719-llvm-3a18e319450a1fd9031f9879a2c3894d17338b95.tar.gz bcm5719-llvm-3a18e319450a1fd9031f9879a2c3894d17338b95.zip |
Added a new "module" log channel which covers module creation, deletion, and common module list actions.
Also added a new option for "log enable" which is "--stack" which will print out a stack backtrace for each log line.
This was used to track down the leaking module issue I fixed last week.
llvm-svn: 165438
Diffstat (limited to 'lldb/source/Commands/CommandObjectLog.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectLog.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index 7c77e6999b1..fb982972d26 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -144,6 +144,7 @@ public: case 'T': log_options |= LLDB_LOG_OPTION_PREPEND_TIMESTAMP; break; case 'p': log_options |= LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD;break; case 'n': log_options |= LLDB_LOG_OPTION_PREPEND_THREAD_NAME; break; + case 'S': log_options |= LLDB_LOG_OPTION_BACKTRACE; break; default: error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option); break; @@ -215,6 +216,7 @@ CommandObjectLogEnable::CommandOptions::g_option_table[] = { LLDB_OPT_SET_1, false, "timestamp", 'T', no_argument, NULL, 0, eArgTypeNone, "Prepend all log lines with a timestamp." }, { LLDB_OPT_SET_1, false, "pid-tid", 'p', no_argument, NULL, 0, eArgTypeNone, "Prepend all log lines with the process and thread ID that generates the log line." }, { LLDB_OPT_SET_1, false, "thread-name",'n', no_argument, NULL, 0, eArgTypeNone, "Prepend all log lines with the thread name for the thread that generates the log line." }, +{ LLDB_OPT_SET_1, false, "stack", 'S', no_argument, NULL, 0, eArgTypeNone, "Append a stack backtrace to each log line." }, { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } }; |