summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/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/Core/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/Core/Log.cpp')
-rw-r--r--lldb/source/Core/Log.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Core/Log.cpp b/lldb/source/Core/Log.cpp
index 0b163fb04f5..17281c03fd0 100644
--- a/lldb/source/Core/Log.cpp
+++ b/lldb/source/Core/Log.cpp
@@ -118,6 +118,9 @@ Log::PrintfWithFlagsVarArg (uint32_t flags, const char *format, va_list args)
header.PrintfVarArg (format, args);
m_stream_sp->Printf("%s\n", header.GetData());
+
+ if (m_options.Test (LLDB_LOG_OPTION_BACKTRACE))
+ Host::Backtrace (*m_stream_sp, 1024);
m_stream_sp->Flush();
}
}
OpenPOWER on IntegriCloud