diff options
author | Greg Clayton <gclayton@apple.com> | 2011-02-16 04:46:07 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-02-16 04:46:07 +0000 |
commit | 93d3c8339c1dc843c3dbd2f82bcf4954a1844d63 (patch) | |
tree | 350e02f7a068638852e5aab7224454042498c4d9 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 108b2d56bf41636f17f8528fbb320f1450103c9b (diff) | |
download | bcm5719-llvm-93d3c8339c1dc843c3dbd2f82bcf4954a1844d63.tar.gz bcm5719-llvm-93d3c8339c1dc843c3dbd2f82bcf4954a1844d63.zip |
The DynamicLoader plug-in instance now lives up in lldb_private::Process where
it should live and the lldb_private::Process takes care of managing the
auto pointer to the dynamic loader instance.
Also, now that the ArchSpec contains the target triple, we are able to
correctly set the Target architecture in DidLaunch/DidAttach in the subclasses,
and then the lldb_private::Process will find the dynamic loader plug-in
by letting the dynamic loader plug-ins inspect the arch/triple in the target.
So now the ProcessGDBRemote plug-in is another step closer to be purely
process/platform agnostic.
I updated the ProcessMacOSX and the ProcessLinux plug-ins accordingly.
llvm-svn: 125650
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index cba0ca162fe..df3e09a9988 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -101,7 +101,6 @@ ProcessGDBRemote::CanDebug(Target &target) //---------------------------------------------------------------------- ProcessGDBRemote::ProcessGDBRemote(Target& target, Listener &listener) : Process (target, listener), - m_dynamic_loader_ap (), m_flags (0), m_stdio_mutex (Mutex::eMutexTypeRecursive), m_gdb_comm(), @@ -132,8 +131,6 @@ ProcessGDBRemote::ProcessGDBRemote(Target& target, Listener &listener) : //---------------------------------------------------------------------- ProcessGDBRemote::~ProcessGDBRemote() { - m_dynamic_loader_ap.reset(); - if (IS_VALID_LLDB_HOST_THREAD(m_debugserver_thread)) { Host::ThreadCancel (m_debugserver_thread, NULL); @@ -410,13 +407,7 @@ Error ProcessGDBRemote::WillLaunchOrAttach () { Error error; - // TODO: this is hardcoded for macosx right now. We need this to be more dynamic - m_dynamic_loader_ap.reset(DynamicLoader::FindPlugin(this, "dynamic-loader.macosx-dyld")); - - if (m_dynamic_loader_ap.get() == NULL) - error.SetErrorString("unable to find the dynamic loader named 'dynamic-loader.macosx-dyld'"); m_stdio_communication.Clear (); - return error; } @@ -628,11 +619,7 @@ ProcessGDBRemote::DidLaunchOrAttach () LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS)); if (log) log->Printf ("ProcessGDBRemote::DidLaunch()"); - if (GetID() == LLDB_INVALID_PROCESS_ID) - { - m_dynamic_loader_ap.reset(); - } - else + if (GetID() != LLDB_INVALID_PROCESS_ID) { m_dispatch_queue_offsets_addr = LLDB_INVALID_ADDRESS; @@ -673,8 +660,6 @@ void ProcessGDBRemote::DidLaunch () { DidLaunchOrAttach (); - if (m_dynamic_loader_ap.get()) - m_dynamic_loader_ap->DidLaunch(); } Error @@ -816,8 +801,6 @@ void ProcessGDBRemote::DidAttach () { DidLaunchOrAttach (); - if (m_dynamic_loader_ap.get()) - m_dynamic_loader_ap->DidAttach(); } Error @@ -1540,12 +1523,6 @@ ProcessGDBRemote::GetImageInfoAddress() return LLDB_INVALID_ADDRESS; } -DynamicLoader * -ProcessGDBRemote::GetDynamicLoader() -{ - return m_dynamic_loader_ap.get(); -} - //------------------------------------------------------------------ // Process Memory //------------------------------------------------------------------ |