diff options
author | Greg Clayton <gclayton@apple.com> | 2011-08-11 02:48:45 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-08-11 02:48:45 +0000 |
commit | aa149cbd863d1722f8e5263cac26b9c9f4461f57 (patch) | |
tree | 03b9bb36184a893d7fd5f3c44deb48f4046a28f9 /lldb/source/Target/ThreadPlanTracer.cpp | |
parent | 8e4c74bb7c515099d97a330c24a48126c3222a6d (diff) | |
download | bcm5719-llvm-aa149cbd863d1722f8e5263cac26b9c9f4461f57.tar.gz bcm5719-llvm-aa149cbd863d1722f8e5263cac26b9c9f4461f57.zip |
Added the ability to remove orphaned module shared pointers from a ModuleList.
This is helping us track down some extra references to ModuleSP objects that
are causing things to get kept around for too long.
Added a module pointer accessor to target and change a lot of code to use
it where it would be more efficient.
"taret delete" can now specify "--clean=1" which will cleanup the global module
list for any orphaned module in the shared module cache which can save memory
and also help track down module reference leaks like we have now.
llvm-svn: 137294
Diffstat (limited to 'lldb/source/Target/ThreadPlanTracer.cpp')
-rw-r--r-- | lldb/source/Target/ThreadPlanTracer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Target/ThreadPlanTracer.cpp b/lldb/source/Target/ThreadPlanTracer.cpp index 88564271ff5..177fdab7d1e 100644 --- a/lldb/source/Target/ThreadPlanTracer.cpp +++ b/lldb/source/Target/ThreadPlanTracer.cpp @@ -117,12 +117,12 @@ ThreadPlanAssemblyTracer::InitializeTracer() m_abi = process.GetABI().get(); - ModuleSP exe_module_sp (target.GetExecutableModule()); + Module *exe_module = target.GetExecutableModulePointer(); - if (exe_module_sp) + if (exe_module) { - m_intptr_type = TypeFromUser(exe_module_sp->GetClangASTContext().GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, arch.GetAddressByteSize() * 8), - exe_module_sp->GetClangASTContext().getASTContext()); + m_intptr_type = TypeFromUser(exe_module->GetClangASTContext().GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, arch.GetAddressByteSize() * 8), + exe_module->GetClangASTContext().getASTContext()); } const unsigned int buf_size = 32; |