Author: Jim Ingham
Date: 2023-07-07T19:09:18-07:00
New Revision: 01e3393b94d194ee99e57f23f9c08160cef94753

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

LOG: Split up the runCmd trace printing to print the command before running.
That way if the command crashes you still know what it was.

Differential Revision: https://reviews.llvm.org/D154752

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/lldbtest.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py 
b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 2bff1a7067cb3d..02255712a8dd11 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -2059,12 +2059,14 @@ def runCmd(self, cmd, msg=None, check=True, 
trace=False, inHistory=False):
         running = cmd.startswith("run") or cmd.startswith("process launch")
 
         for i in range(self.maxLaunchCount if running else 1):
-            self.ci.HandleCommand(cmd, self.res, inHistory)
-
             with recording(self, trace) as sbuf:
                 print("runCmd:", cmd, file=sbuf)
                 if not check:
                     print("check of return status not required", file=sbuf)
+
+            self.ci.HandleCommand(cmd, self.res, inHistory)
+
+            with recording(self, trace) as sbuf:
                 if self.res.Succeeded():
                     print("output:", self.res.GetOutput(), file=sbuf)
                 else:


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to