[Lldb-commits] [lldb] 7b76089 - [lldb] Convert NativeProcessLinux to new Status API (NFC)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 5 12:49:32 PDT 2024


Author: Adrian Prantl
Date: 2024-09-05T12:49:16-07:00
New Revision: 7b760894f247f4fa1b27c01c767c8599c169f996

URL: https://github.com/llvm/llvm-project/commit/7b760894f247f4fa1b27c01c767c8599c169f996
DIFF: https://github.com/llvm/llvm-project/commit/7b760894f247f4fa1b27c01c767c8599c169f996.diff

LOG: [lldb] Convert NativeProcessLinux to new Status API (NFC)

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index cc0e34eecdf300..cea3fbf9112f52 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -1096,9 +1096,9 @@ Status NativeProcessLinux::Detach() {
 
   for (const auto &thread : m_threads) {
     Status e = Detach(thread->GetID());
+     // Save the error, but still attempt to detach from other threads.
     if (e.Fail())
-      error =
-          e; // Save the error, but still attempt to detach from other threads.
+      error = e.Clone;
   }
 
   m_intel_pt_collector.Clear();
@@ -1905,13 +1905,13 @@ Status NativeProcessLinux::ResumeThread(NativeThreadLinux &thread,
   // reflect it is running after this completes.
   switch (state) {
   case eStateRunning: {
-    const auto resume_result = thread.Resume(signo);
+    Status resume_result = thread.Resume(signo);
     if (resume_result.Success())
       SetState(eStateRunning, true);
     return resume_result;
   }
   case eStateStepping: {
-    const auto step_result = thread.SingleStep(signo);
+    Status step_result = thread.SingleStep(signo);
     if (step_result.Success())
       SetState(eStateRunning, true);
     return step_result;


        


More information about the lldb-commits mailing list