[Lldb-commits] [lldb] c41c574 - Fix buildbots after https://reviews.llvm.org/D120755.

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 7 11:47:05 PST 2022


Author: Greg Clayton
Date: 2022-03-07T11:46:56-08:00
New Revision: c41c57468949036a06695f06a97a8e14e8b252bd

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

LOG: Fix buildbots after https://reviews.llvm.org/D120755.

This improves this test a lot because before when using the "attachCommands" to run the following commands:

(lldb) target create -d /path/to/a.out
(lldb) process launch

This was racy as it wasn't stopping the program at the entry point, and the process might run to completion before we can even debug it. With the recent changes to the "attachCommands" we were waiting for the process to stop, but the process might be exited already, and that _should_ have caused the attach to fail since there was no process to attach to. By adding "--stop-at-entry" to the process launch, we ensure this should be less racy and give us a valid process to attach to.

Added: 
    

Modified: 
    lldb/test/API/tools/lldb-vscode/attach/TestVSCode_attach.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/tools/lldb-vscode/attach/TestVSCode_attach.py b/lldb/test/API/tools/lldb-vscode/attach/TestVSCode_attach.py
index 211d1f74ec439..1eee182916100 100644
--- a/lldb/test/API/tools/lldb-vscode/attach/TestVSCode_attach.py
+++ b/lldb/test/API/tools/lldb-vscode/attach/TestVSCode_attach.py
@@ -214,7 +214,7 @@ def test_terminate_commands(self):
         # and use it for debugging
         attachCommands = [
             'target create -d "%s"' % (program),
-            'process launch'
+            'process launch --stop-at-entry'
         ]
         terminateCommands = ['expr 4+2']
         self.attach(program=program,


        


More information about the lldb-commits mailing list