summaryrefslogtreecommitdiffstats
path: root/lldb/source/lldb-log.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-10-08 22:41:53 +0000
committerGreg Clayton <gclayton@apple.com>2012-10-08 22:41:53 +0000
commit3a18e319450a1fd9031f9879a2c3894d17338b95 (patch)
tree7ff118da3d533e819cefa0f115200dfca9a8f600 /lldb/source/lldb-log.cpp
parentae23ed336b1ffc496b2fdd537e05bc91273dca4d (diff)
downloadbcm5719-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/lldb-log.cpp')
-rw-r--r--lldb/source/lldb-log.cpp41
1 files changed, 22 insertions, 19 deletions
diff --git a/lldb/source/lldb-log.cpp b/lldb/source/lldb-log.cpp
index 5510631b8d3..71c5460a6c4 100644
--- a/lldb/source/lldb-log.cpp
+++ b/lldb/source/lldb-log.cpp
@@ -135,6 +135,7 @@ lldb_private::DisableLog (const char **categories, Stream *feedback_strm)
else if (0 == ::strncasecmp(arg, "unwind", 6)) flag_bits &= ~LIBLLDB_LOG_UNWIND;
else if (0 == ::strncasecmp(arg, "types", 5)) flag_bits &= ~LIBLLDB_LOG_TYPES;
else if (0 == ::strncasecmp(arg, "symbol", 6)) flag_bits &= ~LIBLLDB_LOG_SYMBOLS;
+ else if (0 == ::strncasecmp(arg, "module", 6)) flag_bits &= ~LIBLLDB_LOG_MODULES;
else
{
feedback_strm->Printf ("error: unrecognized log category '%s'\n", arg);
@@ -201,6 +202,7 @@ lldb_private::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, const ch
else if (0 == ::strncasecmp(arg, "unwind", 6)) flag_bits |= LIBLLDB_LOG_UNWIND;
else if (0 == ::strncasecmp(arg, "types", 5)) flag_bits |= LIBLLDB_LOG_TYPES;
else if (0 == ::strncasecmp(arg, "symbol", 6)) flag_bits |= LIBLLDB_LOG_SYMBOLS;
+ else if (0 == ::strncasecmp(arg, "module", 6)) flag_bits |= LIBLLDB_LOG_MODULES;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
@@ -220,23 +222,24 @@ void
lldb_private::ListLogCategories (Stream *strm)
{
strm->Printf("Logging categories for 'lldb':\n"
- " all - turn on all available logging categories\n"
- " api - enable logging of API calls and return values\n"
- " command - log command argument parsing\n"
- " default - enable the default set of logging categories for liblldb\n"
- " break - log breakpoints\n"
- " events - log broadcaster, listener and event queue activities\n"
- " expr - log expressions\n"
- " object - log object construction/destruction for important objects\n"
- " process - log process events and activities\n"
- " thread - log thread events and activities\n"
- " script - log events about the script interpreter\n"
- " dyld - log shared library related activities\n"
- " state - log private and public process state changes\n"
- " step - log step related activities\n"
- " unwind - log stack unwind activities\n"
- " verbose - enable verbose logging\n"
- " symbol - log symbol related issues and warnings\n"
- " watch - log watchpoint related activities\n"
- " types - log type system related activities\n");
+ " all - turn on all available logging categories\n"
+ " api - enable logging of API calls and return values\n"
+ " break - log breakpoints\n"
+ " command - log command argument parsing\n"
+ " default - enable the default set of logging categories for liblldb\n"
+ " dyld - log shared library related activities\n"
+ " events - log broadcaster, listener and event queue activities\n"
+ " expr - log expressions\n"
+ " object - log object construction/destruction for important objects\n"
+ " module - log module activities such as when modules are created, detroyed, replaced, and more\n"
+ " process - log process events and activities\n"
+ " script - log events about the script interpreter\n"
+ " state - log private and public process state changes\n"
+ " step - log step related activities\n"
+ " symbol - log symbol related issues and warnings\n"
+ " thread - log thread events and activities\n"
+ " types - log type system related activities\n"
+ " unwind - log stack unwind activities\n"
+ " verbose - enable verbose logging\n"
+ " watch - log watchpoint related activities\n");
}
OpenPOWER on IntegriCloud