diff options
| author | Ed Maste <emaste@freebsd.org> | 2013-08-30 13:11:30 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@freebsd.org> | 2013-08-30 13:11:30 +0000 |
| commit | 7dcb77de0640f50a8eb2b06b7f04d2fba0ccafe5 (patch) | |
| tree | c81621456b9669ada0af03a90932296d88d11e47 /lldb/source/Plugins/Process/POSIX | |
| parent | e3963d0d79eef3f3d88d1b0138978315fd393fb4 (diff) | |
| download | bcm5719-llvm-7dcb77de0640f50a8eb2b06b7f04d2fba0ccafe5.tar.gz bcm5719-llvm-7dcb77de0640f50a8eb2b06b7f04d2fba0ccafe5.zip | |
Move detach to FreeBSD- and Linux-specific classes.
On Linux there is no separate notion of a process (vs. a thread) for
ptrace(); each thread needs to be individually detached. On FreeBSD
we have a separate process context, and we detach just it.
Review: http://llvm-reviews.chandlerc.com/D1418
llvm-svn: 189666
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX')
| -rw-r--r-- | lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp | 28 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h | 2 |
2 files changed, 1 insertions, 29 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp index a3af47c95dc..0e225f72152 100644 --- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp +++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp @@ -319,34 +319,6 @@ ProcessPOSIX::DoHalt(bool &caused_stop) } Error -ProcessPOSIX::DoDetach(bool keep_stopped) -{ - Error error; - if (keep_stopped) - { - // FIXME: If you want to implement keep_stopped, - // this would be the place to do it. - error.SetErrorString("Detaching with keep_stopped true is not currently supported on this platform."); - return error; - } - - Mutex::Locker lock(m_thread_list.GetMutex()); - - uint32_t thread_count = m_thread_list.GetSize(false); - for (uint32_t i = 0; i < thread_count; ++i) - { - POSIXThread *thread = static_cast<POSIXThread*>( - m_thread_list.GetThreadAtIndex(i, false).get()); - error = m_monitor->Detach(thread->GetID()); - } - - if (error.Success()) - SetPrivateState(eStateDetached); - - return error; -} - -Error ProcessPOSIX::DoSignal(int signal) { Error error; diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h index 48b19bac47e..114667ad159 100644 --- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h +++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h @@ -70,7 +70,7 @@ public: DoHalt(bool &caused_stop); virtual lldb_private::Error - DoDetach(bool keep_stopped); + DoDetach(bool keep_stopped) = 0; virtual lldb_private::Error DoSignal(int signal); |

