summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h
diff options
context:
space:
mode:
authorMatt Kopec <Matt.Kopec@intel.com>2013-07-09 15:09:45 +0000
committerMatt Kopec <Matt.Kopec@intel.com>2013-07-09 15:09:45 +0000
commitb29104467fa6cbc758e0b6b392bbee878fb8d01c (patch)
treec044905d82e7835a0ed67478864bedb2b2363202 /lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h
parentce499744b3339f1690b9a95d6f48a7e09c99916a (diff)
downloadbcm5719-llvm-b29104467fa6cbc758e0b6b392bbee878fb8d01c.tar.gz
bcm5719-llvm-b29104467fa6cbc758e0b6b392bbee878fb8d01c.zip
Fix signal handling for POSIX (only tested on Linux) processes in multi-threaded programs.
Also fix a related issue where if a thread exits after a thread continue, lldb would hang. llvm-svn: 185944
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h')
-rw-r--r--lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h
index 8402aad3496..a865fe26746 100644
--- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h
+++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.h
@@ -14,6 +14,7 @@
// C++ Includes
#include <queue>
+#include <set>
// Other libraries and framework includes
#include "lldb/Target/Process.h"
@@ -157,6 +158,11 @@ public:
virtual void
StopAllThreads(lldb::tid_t stop_tid);
+ /// Adds the thread to the list of threads for which we have received the initial stopping signal.
+ /// The \p stop_tid paramter indicates the thread which the stop happened for.
+ bool
+ AddThreadForInitialStopIfNeeded(lldb::tid_t stop_tid);
+
protected:
/// Target byte order.
lldb::ByteOrder m_byte_order;
@@ -183,8 +189,16 @@ protected:
/// Returns true if the process is stopped.
bool IsStopped();
+ /// Returns true if at least one running is currently running
+ bool IsAThreadRunning();
+
typedef std::map<lldb::addr_t, lldb::addr_t> MMapMap;
MMapMap m_addr_to_mmap_size;
+
+ typedef std::set<lldb::tid_t> ThreadStopSet;
+ /// Every thread begins with a stop signal. This keeps track
+ /// of the threads for which we have received the stop signal.
+ ThreadStopSet m_seen_initial_stop;
};
#endif // liblldb_MacOSXProcess_H_
OpenPOWER on IntegriCloud