summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ModuleList.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/ModuleList.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/ModuleList.cpp')
-rw-r--r--lldb/source/Core/ModuleList.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index 5adffa1e679..338482b3ff7 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -724,6 +724,11 @@ ModuleList::GetSharedModule
{
if (old_module_sp_ptr && !old_module_sp_ptr->get())
*old_module_sp_ptr = module_sp;
+
+ LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_MODULES));
+ if (log)
+ log->Printf("module changed: %p, removing from global module list", module_sp.get());
+
shared_module_list.Remove (module_sp);
module_sp.reset();
}
OpenPOWER on IntegriCloud