labath added a comment.

Looks mostly fine to me. Just a couple of questions inline...



================
Comment at: 
lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py:243-244
+                status = debugger.SetOutputFile(outsbf)
+                if status.Fail():
+                    raise Exception(status)
+
----------------
`self.assertTrue(status.Success())`


================
Comment at: lldb/source/API/SBDebugger.cpp:296-313
   if (!m_opaque_sp)
     return;
 
   repro::DataRecorder *recorder = nullptr;
   if (repro::Generator *g = repro::Reproducer::Instance().GetGenerator())
     recorder = g->GetOrCreate<repro::CommandProvider>().GetNewDataRecorder();
 
----------------
Any chance we could make this method simply delegate to the SBFile version ?


================
Comment at: lldb/source/Core/Debugger.cpp:828-833
+  if (!file_sp || !file_sp->IsValid()) {
     m_input_file_sp = std::make_shared<File>(stdin, false);
+    error.SetErrorString("invalid file");
+  } else {
+    m_input_file_sp = file_sp;
+  }
----------------
Could we make it so that the validity of the file_sp argument is checked at the 
SB level? That way you wouldn't need the Status result here. Same goes for 
stdout and stderr methods.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68181



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

Reply via email to