[Lldb-commits] [PATCH] D114796: [lldb/qemu] Add support for pty redirection

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 30 07:39:15 PST 2021


labath marked an inline comment as done.
labath added inline comments.


================
Comment at: lldb/source/Target/Target.cpp:3324
 
-      if (default_to_use_pty &&
-          (!in_file_spec || !out_file_spec || !err_file_spec)) {
+      if (default_to_use_pty) {
         llvm::Error Err = info.SetUpPtyRedirection();
----------------
DavidSpickett wrote:
> What's the logic to this change? I thought maybe the `!in_file_spec...` were redundant but not 100% sure.
The original code was trying to avoid calling this function in case all three actions were set. It was almost redundant, as `SetUpPtyRedirection` had the same checks already -- the only difference was that the function would unconditionally create the pty master (and then not use it). So I've added an early exit to that function and that way I could avoid doing the same checks in the new platform.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114796



More information about the lldb-commits mailing list