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/Core/ModuleList.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/Core/ModuleList.cpp')
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 5 |
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(); } |