[Lldb-commits] [lldb] Fix a bug with cancelling "attach -w" after you have run a process previously (PR #65822)

via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 8 21:59:17 PDT 2023


================
@@ -12,10 +12,13 @@ int main(int argc, char const *argv[]) {
     // Waiting to be attached by the debugger.
     temp = 0;
 
+    if (argc > 1 && argv[1][0] == 'q')
+      return 0;
+   
     while (temp < 30) {
-        std::this_thread::sleep_for(std::chrono::seconds(2)); // Waiting to be attached...
-        temp++;
-    }
+      std::this_thread::sleep_for(std::chrono::seconds(2)); // Waiting to be attached...
+      temp++;
+    } 
----------------
bulbazord wrote:

That's fair, thanks for clarifying.

https://github.com/llvm/llvm-project/pull/65822


More information about the lldb-commits mailing list