Skip to content

Commit 01e3393

Browse files
committed
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
1 parent 6c47654 commit 01e3393

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,12 +2059,14 @@ def runCmd(self, cmd, msg=None, check=True, trace=False, inHistory=False):
20592059
running = cmd.startswith("run") or cmd.startswith("process launch")
20602060

20612061
for i in range(self.maxLaunchCount if running else 1):
2062-
self.ci.HandleCommand(cmd, self.res, inHistory)
2063-
20642062
with recording(self, trace) as sbuf:
20652063
print("runCmd:", cmd, file=sbuf)
20662064
if not check:
20672065
print("check of return status not required", file=sbuf)
2066+
2067+
self.ci.HandleCommand(cmd, self.res, inHistory)
2068+
2069+
with recording(self, trace) as sbuf:
20682070
if self.res.Succeeded():
20692071
print("output:", self.res.GetOutput(), file=sbuf)
20702072
else:

0 commit comments

Comments
 (0)