llgs: fixed a bug in deferred signal thread id; added coordinator enqueue logging.
authorChaoren Lin <chaorenl@google.com>
Tue, 3 Feb 2015 01:50:44 +0000 (01:50 +0000)
committerChaoren Lin <chaorenl@google.com>
Tue, 3 Feb 2015 01:50:44 +0000 (01:50 +0000)
The deferred signal thread id was being set with the process id
unintentionally in NativeProcessLinux::CallAfterRunningThreadsStop().

llvm-svn: 227910

lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/source/Plugins/Process/Linux/ThreadStateCoordinator.cpp

index 7ec7a18..d88196f 100644 (file)
@@ -3894,7 +3894,7 @@ NativeProcessLinux::CallAfterRunningThreadsStop (lldb::tid_t tid,
                                                  const std::function<void (lldb::tid_t tid)> &call_after_function)
 {
     const lldb::pid_t pid = GetID ();
-    m_coordinator_up->CallAfterRunningThreadsStop (pid,
+    m_coordinator_up->CallAfterRunningThreadsStop (tid,
                                                    [=](lldb::tid_t request_stop_tid)
                                                    {
                                                        tgkill (pid, request_stop_tid, SIGSTOP);
index 128173d..e4d412e 100644 (file)
@@ -528,7 +528,11 @@ void
 ThreadStateCoordinator::EnqueueEvent (EventBaseSP event_sp)
 {
     std::lock_guard<std::mutex> lock (m_queue_mutex);
+
     m_event_queue.push (event_sp);
+    if (m_log_event_processing)
+        Log ("ThreadStateCoordinator::%s enqueued event: %s", __FUNCTION__, event_sp->GetDescription ().c_str ());
+
     m_queue_condition.notify_one ();
 }