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


================
Comment at: lldb/include/lldb/API/SBDebugger.h:97-102
+  SBError SetInputFile(FileSP file);
+
+  SBError SetOutputFile(FileSP file);
+
+  SBError SetErrorFile(FileSP file);
+
----------------
clayborg wrote:
> Are these really for public consumption? I would hope not, and might add then 
> as protected and friend in any code that needs to use them? At the very least 
> a comment specifying these are for internal use. Does SBFile not have a way 
> to construct with a FileSP? Maybe these are not needed if that is the case?
They are //kind of// for public consumption.    They're impossible to use from 
a C++ client, because they can't see the definition of lldb_private::File.

But the SWIG wrappers can bind against them.     They will convert a native 
python file
into a FileSP.

That way SetInputFile works just like SetInputFileHandle works, except it 
doesn't have the bugs and limitations that SetInputFileHandle has.     Normally 
you can just use the FileSP version, and not create a SBFile.    But in some 
cases creating a SBFile manually is required, such as if you want to control 
how the file object is translated from python into C++.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68734



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

Reply via email to