summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanCallFunction.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-08-11 02:48:45 +0000
committerGreg Clayton <gclayton@apple.com>2011-08-11 02:48:45 +0000
commitaa149cbd863d1722f8e5263cac26b9c9f4461f57 (patch)
tree03b9bb36184a893d7fd5f3c44deb48f4046a28f9 /lldb/source/Target/ThreadPlanCallFunction.cpp
parent8e4c74bb7c515099d97a330c24a48126c3222a6d (diff)
downloadbcm5719-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/ThreadPlanCallFunction.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanCallFunction.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp
index 8ec93b98735..d2bd858c6dd 100644
--- a/lldb/source/Target/ThreadPlanCallFunction.cpp
+++ b/lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -65,9 +65,9 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
m_function_sp = thread.GetRegisterContext()->GetSP() - abi->GetRedZoneSize();
- ModuleSP executableModuleSP (target.GetExecutableModule());
+ Module *exe_module = target.GetExecutableModulePointer();
- if (!executableModuleSP)
+ if (exe_module == NULL)
{
if (log)
log->Printf ("Can't execute code without an executable module.");
@@ -75,7 +75,7 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
}
else
{
- ObjectFile *objectFile = executableModuleSP->GetObjectFile();
+ ObjectFile *objectFile = exe_module->GetObjectFile();
if (!objectFile)
{
if (log)
@@ -181,9 +181,9 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
m_function_sp = thread.GetRegisterContext()->GetSP() - abi->GetRedZoneSize();
- ModuleSP executableModuleSP (target.GetExecutableModule());
+ Module *exe_module = target.GetExecutableModulePointer();
- if (!executableModuleSP)
+ if (exe_module == NULL)
{
if (log)
log->Printf ("Can't execute code without an executable module.");
@@ -191,7 +191,7 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
}
else
{
- ObjectFile *objectFile = executableModuleSP->GetObjectFile();
+ ObjectFile *objectFile = exe_module->GetObjectFile();
if (!objectFile)
{
if (log)
@@ -204,7 +204,7 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
{
if (log)
log->Printf ("Could not find entry point address for executable module \"%s\".",
- executableModuleSP->GetFileSpec().GetFilename().AsCString());
+ exe_module->GetFileSpec().GetFilename().AsCString());
return;
}
}
OpenPOWER on IntegriCloud