This revision was automatically updated to reflect the committed changes.
Closed by commit rL366703: [Windows] Fix race condition between state changes 
(authored by amccarth, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D62183?vs=210365&id=211136#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62183/new/

https://reviews.llvm.org/D62183

Files:
  lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp


Index: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -205,16 +205,6 @@
              m_session_data->m_debugger->GetProcess().GetProcessId(),
              GetPrivateState());
 
-    ExceptionRecordSP active_exception =
-        m_session_data->m_debugger->GetActiveException().lock();
-    if (active_exception) {
-      // Resume the process and continue processing debug events.  Mask the
-      // exception so that from the process's view, there is no indication that
-      // anything happened.
-      m_session_data->m_debugger->ContinueAsyncException(
-          ExceptionResult::MaskException);
-    }
-
     LLDB_LOG(log, "resuming {0} threads.", m_thread_list.GetSize());
 
     bool failed = false;
@@ -233,10 +223,19 @@
 
     if (failed) {
       error.SetErrorString("ProcessWindows::DoResume failed");
-      return error;
     } else {
       SetPrivateState(eStateRunning);
     }
+
+    ExceptionRecordSP active_exception =
+        m_session_data->m_debugger->GetActiveException().lock();
+    if (active_exception) {
+      // Resume the process and continue processing debug events.  Mask the
+      // exception so that from the process's view, there is no indication that
+      // anything happened.
+      m_session_data->m_debugger->ContinueAsyncException(
+          ExceptionResult::MaskException);
+    }
   } else {
     LLDB_LOG(log, "error: process {0} is in state {1}.  Returning...",
              m_session_data->m_debugger->GetProcess().GetProcessId(),


Index: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -205,16 +205,6 @@
              m_session_data->m_debugger->GetProcess().GetProcessId(),
              GetPrivateState());
 
-    ExceptionRecordSP active_exception =
-        m_session_data->m_debugger->GetActiveException().lock();
-    if (active_exception) {
-      // Resume the process and continue processing debug events.  Mask the
-      // exception so that from the process's view, there is no indication that
-      // anything happened.
-      m_session_data->m_debugger->ContinueAsyncException(
-          ExceptionResult::MaskException);
-    }
-
     LLDB_LOG(log, "resuming {0} threads.", m_thread_list.GetSize());
 
     bool failed = false;
@@ -233,10 +223,19 @@
 
     if (failed) {
       error.SetErrorString("ProcessWindows::DoResume failed");
-      return error;
     } else {
       SetPrivateState(eStateRunning);
     }
+
+    ExceptionRecordSP active_exception =
+        m_session_data->m_debugger->GetActiveException().lock();
+    if (active_exception) {
+      // Resume the process and continue processing debug events.  Mask the
+      // exception so that from the process's view, there is no indication that
+      // anything happened.
+      m_session_data->m_debugger->ContinueAsyncException(
+          ExceptionResult::MaskException);
+    }
   } else {
     LLDB_LOG(log, "error: process {0} is in state {1}.  Returning...",
              m_session_data->m_debugger->GetProcess().GetProcessId(),
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to