jasonmolenda added inline comments.

================
Comment at: 
lldb/test/API/macosx/lc-note/multiple-binary-corefile/TestMultipleBinaryCorefile.py:38-39
         )
+        if self.TraceOn():
+            self.runCmd("script print('Creating corefile with command %s')" % 
cmd)
         call(cmd, shell=True)
----------------
jasonmolenda wrote:
> bulbazord wrote:
> > JDevlieghere wrote:
> > > Out of curiosity what's the point of doing `self.runCmd("script print 
> > > ...` vs printing the same thing directly? Does this run in another 
> > > context or something? Do we save the command output somewhere? 
> > I'm also curious. Printing directly is probably less expensive than running 
> > a print command through the lldb python script interpreter.
> In the past, when I had an SB API test `print()` directly, the trace output 
> is buffered differently than STDOUT, so I've done this hack in a few places 
> to get the print to happen exactly when the test is executing.  Doing a `if 
> self.TraceOn(): self.runCmd("bt"); print("got here")` will not print the two 
> next to each other, iirc.  I can switch to a print and confirm my memory of 
> this.
I switched this test to just `print` directly and works fine with `lldb-dotest 
-t`, I must have misremembered.  I'll remove a few places where I do this in 
this test.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157167/new/

https://reviews.llvm.org/D157167

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

Reply via email to