[Lldb-commits] [PATCH] D38829: Python: SetOutputFileHandle doesn't work with IOBase

Lawrence D'Anna via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 2 11:58:16 PDT 2017


lawrence_danna added a comment.

@labath

> (Please add lldb-commits to future reviews, so that people are aware of what's going on.)

ok

> Couldn't we just change the File::Read/Write functions to call these directly

Like I said to @zturner , this is possible, but it can't work with the existing APIs in SBDebugger.h.   We'd need to add new APIs that take SBIOBase instead of FILE *.     Do you agree with that plan?

> And it would be great to see some tests for this

yup, there's tests in TestFileHandle.py



================
Comment at: lldb/trunk/include/lldb/Host/File.h:65
 
+  File(File &&rhs);
+
----------------
labath wrote:
> Why are you changing the File to be movable? I don't see the connection between this and the fopencookie part.
I use the move constructor here: 

file = File(m_py_obj, readable ? readfn : NULL, writable ? writefn : NULL, closefn);



Repository:
  rL LLVM

https://reviews.llvm.org/D38829





More information about the lldb-commits mailing list