diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-09-17 00:30:24 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-09-17 00:30:24 +0000 |
commit | d4d5499d6cbc6b243acd3511263d2e5edb2d6754 (patch) | |
tree | bde798dabe8e5590e46d17d9a55ea3b9345942b5 /lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp | |
parent | d30a9585b862cca17ca69a12ed686d104a3b70ca (diff) | |
download | bcm5719-llvm-d4d5499d6cbc6b243acd3511263d2e5edb2d6754.tar.gz bcm5719-llvm-d4d5499d6cbc6b243acd3511263d2e5edb2d6754.zip |
Fixing a problem with thread creation signal order dependency
llvm-svn: 190831
Diffstat (limited to 'lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp index 7e0476caf9c..1cf50453a74 100644 --- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp @@ -1637,6 +1637,29 @@ ProcessMonitor::StopMonitor() // even though still has the file descriptor, we shouldn't close it here. } +// FIXME: On Linux, when a new thread is created, we receive to notifications, +// (1) a SIGTRAP|PTRACE_EVENT_CLONE from the main process thread with the +// child thread id as additional information, and (2) a SIGSTOP|SI_USER from +// the new child thread indicating that it has is stopped because we attached. +// We have no guarantee of the order in which these arrive, but we need both +// before we are ready to proceed. We currently keep a list of threads which +// have sent the initial SIGSTOP|SI_USER event. Then when we receive the +// SIGTRAP|PTRACE_EVENT_CLONE notification, if the initial stop has not occurred +// we call ProcessMonitor::WaitForInitialTIDStop() to wait for it. +// +// Right now, the above logic is in ProcessPOSIX, so we need a definition of +// this function in the FreeBSD ProcessMonitor implementation even if it isn't +// logically needed. +// +// We really should figure out what actually happens on FreeBSD and move the +// Linux-specific logic out of ProcessPOSIX as needed. + +bool +ProcessMonitor::WaitForInitialTIDStop(lldb::tid_t tid) +{ + return true; +} + void ProcessMonitor::StopOpThread() { |