[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225746. lawrence_danna added a comment. rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69214/new/ https://reviews.llvm.org/D69214 Files: lldb/include/lldb/Interpreter/ScriptInterpreter.h lldb

[Lldb-commits] [PATCH] D69133: eliminate nontrivial Reset(...) from TypedPythonObject

2019-10-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225758. lawrence_danna added a comment. comment on NullTerminated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69133/new/ https://reviews.llvm.org/D69133 Files: lldb/source/Plugins/ScriptInterpreter/

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked an inline comment as done. lawrence_danna added inline comments. Comment at: lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp:1057 + + // global is protected by the GIL + static PythonScript read_exception(read_exception_script, "read_ex

[Lldb-commits] [PATCH] D69133: eliminate nontrivial Reset(...) from TypedPythonObject

2019-10-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG722b61892454: eliminate nontrivial Reset(...) from TypedPythonObject (authored by lawrence_danna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69133/new/

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225767. lawrence_danna marked 16 inline comments as done. lawrence_danna added a comment. fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69214/new/ https://reviews.llvm.org/D69214 Files: lldb/inc

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added inline comments. Comment at: lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp:261-264 void PythonBytes::SetBytes(llvm::ArrayRef bytes) { const char *data = reinterpret_cast(bytes.data()); - PyObject *py_bytes = PyBytes_FromStringAndSiz

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225775. lawrence_danna added a comment. comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69214/new/ https://reviews.llvm.org/D69214 Files: lldb/include/lldb/Interpreter/ScriptInterpreter.h lldb

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-20 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. fixed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69214/new/ https://reviews.llvm.org/D69214 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.ll

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-20 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225800. lawrence_danna added a comment. oops Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69214/new/ https://reviews.llvm.org/D69214 Files: lldb/include/lldb/Interpreter/ScriptInterpreter.h lldb/sc

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-20 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225799. lawrence_danna marked 3 inline comments as done. lawrence_danna added a comment. fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69214/new/ https://reviews.llvm.org/D69214 Files: lldb/incl

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added inline comments. Comment at: lldb/scripts/Python/python-extensions.swig:683-686 if (desc_len > 0) -return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release(); +return PythonString(llv

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225942. lawrence_danna marked 14 inline comments as done. lawrence_danna added a comment. fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69214/new/ https://reviews.llvm.org/D69214 Files: lldb/inc

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D68856#1717207 , @mgorny wrote: > I'm afraid this causes a few test failures on NetBSD, e.g.: > http://lab.llvm.org:8011/builders/netbsd-amd64/builds/22255/steps/run%20unit%20tests/logs/FAIL%3A%20lldb-api%3A%3ATestDefaul

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D68856#1717257 , @mgorny wrote: > In D68856#1717247 , @lawrence_danna > wrote: > > > sure, um do you have a netbsd machine handy? > > > If you mean one I could you access to, then

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. I spoke too soon, I don't have a *usable* netbsd VM. @mgorny, Do you have a machine you can debug on yourself? Do those errors happen if you run the same test on an interactive terminal? It could be the stdin stream is not set to a valid file descriptor for th

[Lldb-commits] [PATCH] D69230: RFC: specialized Optional for T that can represent its own invalid state

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225965. lawrence_danna added a comment. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. remove empty lines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69230/new/ https://reviews.

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225969. lawrence_danna added a comment. removed blank lines from python-wrapper.swig Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69214/new/ https://reviews.llvm.org/D69214 Files: lldb/include/lldb/I

[Lldb-commits] [PATCH] D69230: RFC: specialized Optional for T that can represent its own invalid state

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225967. lawrence_danna added a comment. ugh I edited the wrong revision, reverted. Sorry for the noise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69230/new/ https://reviews.llvm.org/D69230 Files:

[Lldb-commits] [PATCH] D69230: RFC: specialized Optional for T that can represent its own invalid state

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225975. lawrence_danna added a comment. fix some silly bugs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69230/new/ https://reviews.llvm.org/D69230 Files: llvm/include/llvm/ADT/Optional.h llvm/unit

[Lldb-commits] [PATCH] D69230: RFC: specialized Optional for T that can represent its own invalid state

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225980. lawrence_danna added a comment. call the traits struct OptionalInfo for consistency with DenseMap Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69230/new/ https://reviews.llvm.org/D69230 Files:

[Lldb-commits] [PATCH] D69230: RFC: specialized Optional for T that can represent its own invalid state

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D69230#1717364 , @labath wrote: > > The thing I would like to see here is to have this behaviour be configurable > via a traits argument of the Optional class, similarly to how DenseMap allows > the type to specify

[Lldb-commits] [PATCH] D69230: RFC: specialized Optional for T that can represent its own invalid state

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225984. lawrence_danna added a comment. edit comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69230/new/ https://reviews.llvm.org/D69230 Files: llvm/include/llvm/ADT/Optional.h llvm/unittests/A

[Lldb-commits] [PATCH] D69230: RFC: specialized Optional for T that can represent its own invalid state

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 225983. lawrence_danna added a comment. add a comment explaining OptionalInfo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69230/new/ https://reviews.llvm.org/D69230 Files: llvm/include/llvm/ADT/Opti

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. @mgorny can you at least point me at the setup scripts buildbot us using for netbsd? What dependencies are installed? How is cmake invoked? I'm getting a ton on unrelated problems just trying to build it. Repository: rG LLVM Github Monorepo CHANGES SINC

[Lldb-commits] [PATCH] D69214: remove multi-argument form of PythonObject::Reset()

2019-10-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG04edd1893c2d: remove multi-argument form of PythonObject::Reset() (authored by lawrence_danna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69214/new/ htt

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. @mgorny I can't get anything to work. I've tried running a local VM with virtualbox but it's networking driver crashes my kernel. I've tried a local VM with VMware but it won't boot netbsd. I've tried AWS but they only have netbsd 7, which is too old. I

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D68856#1717767 , @krytarowski wrote: > In D68856#1717683 , @lawrence_danna > wrote: > > > @mgorny > > > > I can't get anything to work. I've tried running a local VM with > >

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. now I'm stuck on this trying to install cmake. pkg_add: no pkg found for 'libunistring>=0.9.4', sorry. pkg_add: Can't install dependency libunistring>=0.9.4 pkg_add: 1 package addition failed *** Error code 1 Repository: rG LLVM Github Monorepo CHAN

[Lldb-commits] [PATCH] D69230: RFC: specialized Optional for T that can represent its own invalid state

2019-10-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. Seems like there's a consensus that if we have something like this it should be called `DenseOptional`, and changes to `Optional` should only make it more like `std::optional` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D68856#1718240 , @mgorny wrote: > In the meantime, I found the root issue. It's in `PythonDataObjects.cpp`, > `PythonFile::ConvertToFile(bool borrowed)`. The function unconditionally > calls `flush()` on the fd. However

[Lldb-commits] [PATCH] D69320: [lldb] [Python] Do not attempt to flush() a read-only fd

2019-10-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna accepted this revision. lawrence_danna added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69320/new/ https://reviews.llvm.org/D69320 ___ lldb-commits mailing l

[Lldb-commits] [PATCH] D69320: [lldb] [Python] Do not attempt to flush() a read-only fd

2019-10-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D69320#1718288 , @mgorny wrote: > Could you push this for me? It seems that I have missed the GitHub migration > and I didn't get commit access to the new repository. looks like i've got the same problem CHANGES SINC

[Lldb-commits] [PATCH] D68737: SBFile::GetFile: convert SBFile back into python native files.

2019-10-26 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D68737#1722181 , @mgorny wrote: > Well, I found another problem with these series, specifically starting at > this commit. Any use of `script` in LLDB ends up with: > > (lldb) script True > True > close failed in f

[Lldb-commits] [PATCH] D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args

2019-10-26 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: labath, jingham, JDevlieghere. Herald added a project: LLDB. Move breakpoints from the old, bad ArgInfo::count to the new, better ArgInfo::max_positional_args. Soon ArgInfo::count will be no more. It looks like this functiona

[Lldb-commits] [PATCH] D69469: [LLDB][formatters] ArgInfo::count -> ArgInfo::max_positional_args

2019-10-26 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: labath, jingham, JDevlieghere. Herald added a project: LLDB. Move breakpoints from the old, bad ArgInfo::count to the new, better ArgInfo::max_positional_args. Soon ArgInfo::count will be no more. This functionality is tested

[Lldb-commits] [PATCH] D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked an inline comment as done. lawrence_danna added inline comments. Comment at: lldb/scripts/Python/python-wrapper.swig:64 +unsigned max_positional_args = PythonCallable::ArgInfo::UNBOUNDED; +if (auto arg_info = pfunc.GetArgInfo()) {

[Lldb-commits] [PATCH] D68737: SBFile::GetFile: convert SBFile back into python native files.

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D68737#1722556 , @mgorny wrote: > Which Python version are you using? 3.7.I'll try it with 2.7. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68737/new/ https://revi

[Lldb-commits] [PATCH] D68737: SBFile::GetFile: convert SBFile back into python native files.

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D68737#1722255 , @mgorny wrote: > However, I think this is only a symptom of a more generic problem. I don't > think we should really be creating a second system of file objects outside > Python, and injecting it into P

[Lldb-commits] [PATCH] D68737: SBFile::GetFile: convert SBFile back into python native files.

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D68737#1722620 , @mgorny wrote: > In D68737#1722575 , @lawrence_danna > wrote: > > > In D68737#1722255 , @mgorny wrote: > > > > > However,

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: labath, mgorny. Herald added a subscriber: krytarowski. Herald added a project: LLDB. Here's another instance where we were calling fflush on an input stream, which is illegal on NetBSD. Repository: rG LLVM Github Monorepo

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 226595. lawrence_danna added a comment. py2_const_cast shouldn't be static as a free function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69488/new/ https://reviews.llvm.org/D69488 Files: lldb/sourc

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 226597. lawrence_danna added a comment. found another one Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69488/new/ https://reviews.llvm.org/D69488 Files: lldb/packages/Python/lldbsuite/test/python_api

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 226599. lawrence_danna added a comment. and another Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69488/new/ https://reviews.llvm.org/D69488 Files: lldb/packages/Python/lldbsuite/test/python_api/file_

[Lldb-commits] [PATCH] D69469: [LLDB][formatters] ArgInfo::count -> ArgInfo::max_positional_args

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG40b0fa7ef212: [LLDB][formatters] ArgInfo::count -> ArgInfo::max_positional_args (authored by lawrence_danna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked 2 inline comments as done. lawrence_danna added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py:854 files = list(i(sbf)) +# delete them in reverse order, again because each i

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-27 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked an inline comment as done. lawrence_danna added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py:854 files = list(i(sbf)) +# delete them in reverse order, again because each i

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-28 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 226618. lawrence_danna added a comment. protect python from being exposed to C++ reference borrowing semantics Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69488/new/ https://reviews.llvm.org/D69488 Fi

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-28 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. There, I think that fixes the issue with borrow semantics and the NetBSD issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69488/new/ https://reviews.llvm.org/D69488 ___

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-28 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D69488#1723481 , @labath wrote: > I am not thrilled by all of that duping going around. Having multiple FILE > objects means that you have multiple independent file caches too. That can > cause different kinds of strang

[Lldb-commits] [PATCH] D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args

2019-10-28 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 226737. lawrence_danna added a comment. improved error handling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69468/new/ https://reviews.llvm.org/D69468 Files: lldb/include/lldb/Interpreter/ScriptInte

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-28 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D69488#1724178 , @mgorny wrote: > I have confirmed that your previous revision fixed the problem in question. > The newer one would probably require full test suite run which I can't do > right now. As I said, I would p

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-28 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 226747. lawrence_danna added a comment. revert to previous version Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69488/new/ https://reviews.llvm.org/D69488 Files: lldb/packages/Python/lldbsuite/test/p

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-28 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: labath, mgorny. Herald added a project: LLDB. It is, I think, inherently unsafe to hand a borrowed native file object to a python program on python 2. This is because the python file object must be created with a FILE*, not

[Lldb-commits] [PATCH] D69488: [LLDB][Python] fix another fflush issue on NetBSD

2019-10-29 Thread Lawrence D';Anna via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6a93a12a8dd9: [LLDB][Python] fix another fflush issue on NetBSD (authored by lawrence_danna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69488/new/ https

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-29 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D69532#1724806 , @labath wrote: > So, if I understand correctly. The problem here is the final call to > `fflush`, which can end up referencing a closed FILE*. Can we just not call > `fflush` then? Hrm, maybe. I'll t

[Lldb-commits] [PATCH] D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args

2019-10-29 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked 4 inline comments as done. lawrence_danna added inline comments. Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:76-79 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreturn-type-c-linkage" + +extern

[Lldb-commits] [PATCH] D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args

2019-10-29 Thread Lawrence D';Anna via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa69bbe02a235: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args (authored by lawrence_danna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-29 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 227007. lawrence_danna added a comment. just don't even flush Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69532/new/ https://reviews.llvm.org/D69532 Files: lldb/source/Plugins/ScriptInterpreter/Pyth

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-29 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 227009. lawrence_danna added a comment. fix the test too Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69532/new/ https://reviews.llvm.org/D69532 Files: lldb/packages/Python/lldbsuite/test/python_api/

[Lldb-commits] [PATCH] D69230: RFC: specialized Optional for T that can represent its own invalid state

2019-10-29 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna abandoned this revision. lawrence_danna added a comment. thanks for the feedback, I'll come back with a "Dense" version of this at some point Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69230/new/ https://reviews.llvm.org/D69230

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-29 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. @labath looks like you were right, just not flushing seems to work fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69532/new/ https://reviews.llvm.org/D69532 ___ lld

[Lldb-commits] [PATCH] D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2

2019-10-30 Thread Lawrence D';Anna via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3071ebf7b383: [LLDB][PythonFile] fix dangerous borrow semantics on python2 (authored by lawrence_danna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69532/

[Lldb-commits] [PATCH] D69742: [LLDB][Python] remove ArgInfo::count

2019-11-01 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: labath, mgorny, JDevlieghere. Herald added a project: LLDB. This patch updates the last user of ArgInfo::count and deletes it. I also delete `GetNumInitArguments()` and `GetInitArgInfo()`. Classess are callables and `GetArgI

[Lldb-commits] [PATCH] D69742: [LLDB][Python] remove ArgInfo::count

2019-11-04 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked 2 inline comments as done. lawrence_danna added inline comments. Comment at: lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp:764 } #if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3 JDevlieghere wrote: > Should we c

[Lldb-commits] [PATCH] D69742: [LLDB][Python] remove ArgInfo::count

2019-11-04 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked 2 inline comments as done. lawrence_danna added a comment. In D69742#1732608 , @labath wrote: > At this point, should we just delete the ArgInfo struct altogether, and > replace it with a plain `unsigned`? Sounds like a good idea t

[Lldb-commits] [PATCH] D69742: [LLDB][Python] remove ArgInfo::count

2019-11-04 Thread Lawrence D';Anna via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGadbf64ccc9e1: [LLDB][Python] remove ArgInfo::count (authored by lawrence_danna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69742/new/ https://reviews.ll

[Lldb-commits] [PATCH] D67786: support for arbitrary python file objects

2019-09-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna abandoned this revision. lawrence_danna added a comment. will re-submit as individual patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67786/new/ https://reviews.llvm.org/D67786 __

[Lldb-commits] [PATCH] D67789: bugfix: File::GetWaitableHandle() should call fileno()

2019-09-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: JDevlieghere, jasonmolenda. Herald added a project: LLDB. If the file has m_stream, it may not have a m_descriptor. GetWaitableHandle() should call GetDescriptor(), which will call fileno(), so it will get waitable descriptor wh

[Lldb-commits] [PATCH] D67790: prepare_binding_Python: print readable errors if SWIG fails

2019-09-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: JDevlieghere, jasonmolenda. Herald added a project: LLDB. When swig fails, all the errors are squished onto one line with `\n` quoting. It's very hard to read. This will print them out in a more reasonable format. Repository

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

2019-09-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna abandoned this revision. lawrence_danna added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. I've reworked this -- finally -- as zturner suggested. I'll be posting it as a bunch of individual commits, so i'm abandoning this one. Repository: r

[Lldb-commits] [PATCH] D67791: dotest.py: bugfix: test filters with -f do not work on Python3

2019-09-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: JDevlieghere, jasonmolenda. Herald added a project: LLDB. `dotest -f` does not work on Python3. The name types.UnboundMethodType was an alias for types.MethodType in 2.7, but it does not exist in python3. MethodType works in

[Lldb-commits] [PATCH] D67792: bugfix: llvm_private::File::GetStream() can fail if m_options == 0

2019-09-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: JDevlieghere, jasonmolenda. Herald added a project: LLDB. It's not clear from the header a File created with a descriptor will be not be usable by LLDB unless SetOptions is also called, but it is. This is because some parts of

[Lldb-commits] [PATCH] D67793: new api class: SBFile

2019-09-19 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: JDevlieghere, jasonmolenda, zturner, jingham. Herald added a subscriber: mgorny. Herald added a project: LLDB. SBFile is a scripting API wrapper for lldb_private::File This is the first step in a rework of https://reviews.llvm.

[Lldb-commits] [PATCH] D67792: bugfix: llvm_private::File::GetStream() can fail if m_options == 0

2019-09-20 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D67792#1676556 , @labath wrote: > It doesn't look like this will work on windows (I find no trace of fcntl in > the windows docs). Even if we find a way to guess the open mode on windows > somehow, I am not convinced th

[Lldb-commits] [PATCH] D67793: new api class: SBFile

2019-09-20 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D67793#1676592 , @labath wrote: > The api seems reasonably straight-forward. The one thing that struck me is > that you're using unique_ptrs for the pimpled objects. That would mean the > SBFile objects are non-copyable

[Lldb-commits] [PATCH] D67792: bugfix: llvm_private::File::GetStream() can fail if m_options == 0

2019-09-20 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221047. lawrence_danna added a comment. Added options to SetDescriptor instead of using ::fcntl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67792/new/ https://reviews.llvm.org/D67792 Files: lldb/inc

[Lldb-commits] [PATCH] D67789: bugfix: File::GetWaitableHandle() should call fileno()

2019-09-20 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221082. lawrence_danna added a comment. Herald added a subscriber: mgorny. added a unit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67789/new/ https://reviews.llvm.org/D67789 Files: lldb/source

[Lldb-commits] [PATCH] D67792: File::SetDescriptor() should require options

2019-09-20 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221093. lawrence_danna edited the summary of this revision. lawrence_danna added a comment. removed SetOptions() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67792/new/ https://reviews.llvm.org/D67792

[Lldb-commits] [PATCH] D67793: new api class: SBFile

2019-09-20 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221113. lawrence_danna added a comment. added some tests, rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67793/new/ https://reviews.llvm.org/D67793 Files: lldb/include/lldb/API/LLDB.h lldb/in

[Lldb-commits] [PATCH] D67793: new api class: SBFile

2019-09-21 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. @labath So what do you think? Update all the lldb_private::File clients to use shared_ptr instead? Or do it this way, with sharing handled inside of File? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67793/new/

[Lldb-commits] [PATCH] D67891: remove File::SetStream(), make new files instead.

2019-09-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath. Herald added a project: LLDB. This patch removes File::SetStream() and File::SetDescriptor(), and replaces most direct uses of File with std::shared_ptr. Instead of calling

[Lldb-commits] [PATCH] D67891: remove File::SetStream(), make new files instead.

2019-09-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221222. lawrence_danna edited the summary of this revision. lawrence_danna added a comment. updated description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67891/new/ https://reviews.llvm.org/D67891 F

[Lldb-commits] [PATCH] D67793: new api class: SBFile

2019-09-22 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. @labath I wrote a patch for the shared_ptr approach. It's simple, but it touches a lot of lines. https://reviews.llvm.org/D67891 Now that I've gone and done it, I kind of like it better that way. If you approve the other patch, I'll update this one accordin

[Lldb-commits] [PATCH] D67891: remove File::SetStream(), make new files instead.

2019-09-23 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D67891#1678933 , @labath wrote: > The first option would require making the File class movable I don't think making File movable will work. I'll be wanting a PythonFile subclass, which overrides virtual metho

[Lldb-commits] [PATCH] D67789: bugfix: File::GetWaitableHandle() should call fileno()

2019-09-23 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221383. lawrence_danna added a comment. nits fixed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67789/new/ https://reviews.llvm.org/D67789 Files: lldb/source/Host/common/File.cpp lldb/unittests/Hos

[Lldb-commits] [PATCH] D67789: bugfix: File::GetWaitableHandle() should call fileno()

2019-09-23 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked 2 inline comments as done. lawrence_danna added a comment. nits fixed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67789/new/ https://reviews.llvm.org/D67789 ___ lldb-commits mai

[Lldb-commits] [PATCH] D67792: File::SetDescriptor() should require options

2019-09-23 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221390. lawrence_danna added a comment. added unit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67792/new/ https://reviews.llvm.org/D67792 Files: lldb/include/lldb/Host/File.h lldb/source/Core

[Lldb-commits] [PATCH] D67891: remove File::SetStream(), make new files instead.

2019-09-23 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna added a comment. @labath How's it look now? I made FileSystem::Open return a unique_ptr, and only convert that over to a shared_ptr where necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67891/new/ https://reviews.llvm.org/

[Lldb-commits] [PATCH] D67891: remove File::SetStream(), make new files instead.

2019-09-23 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221431. lawrence_danna edited the summary of this revision. lawrence_danna added a comment. converted many uses of shared_ptr into unique_ptr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67891/new/ http

[Lldb-commits] [PATCH] D67943: documentation: update test.rst

2019-09-23 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: JDevlieghere, jasonmolenda, labath. Herald added a project: LLDB. The testing documentation appears to be from an era when the only kind of tests were the lldbsuite python tests. This patch adds a short description of the unit

[Lldb-commits] [PATCH] D67996: Convert FileSystem::Open() to return Expected

2019-09-24 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: JDevlieghere, jasonmolenda, labath. lawrence_danna added a project: LLDB. This patch converts FileSystem::Open from this prototype: Status Open(File &File, const FileSpec &file_spec, ...); to this one: llvm::Expected> Open(co

[Lldb-commits] [PATCH] D67891: remove File::SetStream(), make new files instead.

2019-09-24 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221621. lawrence_danna edited the summary of this revision. lawrence_danna added a comment. converted to Expected, and split into two separate patches Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67891/n

[Lldb-commits] [PATCH] D67943: documentation: update test.rst

2019-09-24 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221625. lawrence_danna added a comment. added note about passing --filter to lit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67943/new/ https://reviews.llvm.org/D67943 Files: lldb/docs/resources/tes

[Lldb-commits] [PATCH] D67793: new api class: SBFile

2019-09-24 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221627. lawrence_danna added a comment. changed unique_ptr to shared_ptr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67793/new/ https://reviews.llvm.org/D67793 Files: lldb/include/lldb/API/LLDB.h

[Lldb-commits] [PATCH] D67793: new api class: SBFile

2019-09-24 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked 2 inline comments as done. lawrence_danna added inline comments. Comment at: lldb/source/API/SBFile.cpp:20-26 +void SBFile::SetStream(FILE *file, bool transfer_ownership) { +m_opaque_up = std::make_unique(file, transfer_ownership); +} + +void SBFile::Set

[Lldb-commits] [PATCH] D68001: remove unused method ResetOutputFileHandle()

2019-09-24 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: JDevlieghere, jasonmolenda, labath. Herald added a project: LLDB. ResetOutputFileHandle() isn't being used by anything. Also it's using FILE*, which is something we should be doing less of. Remove it. Repository: rG LLVM

[Lldb-commits] [PATCH] D67996: Convert FileSystem::Open() to return Expected

2019-09-25 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked 19 inline comments as done. lawrence_danna added a comment. wow, I didn't realize the part about actually consuming the error. I thought the asserts only checked that you checked if there was an error. Uploading fixes momentarily Comment at: lldb/uni

[Lldb-commits] [PATCH] D67996: Convert FileSystem::Open() to return Expected

2019-09-25 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221842. lawrence_danna marked an inline comment as done. lawrence_danna added a comment. Herald added a subscriber: mgorny. Fixed according to reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[Lldb-commits] [PATCH] D67996: Convert FileSystem::Open() to return Expected

2019-09-25 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna marked 2 inline comments as done. lawrence_danna added inline comments. Comment at: lldb/include/lldb/Core/StreamFile.h:48-53 + void SetFile(std::shared_ptr file) { +if (file) + m_file_sp = file; +else + m_file_sp = std::make_shared(); + } -

[Lldb-commits] [PATCH] D67996: Convert FileSystem::Open() to return Expected

2019-09-25 Thread Lawrence D';Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 221864. lawrence_danna added a comment. got rid of StreamFile::SetFile Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67996/new/ https://reviews.llvm.org/D67996 Files: lldb/include/lldb/Core/StreamFile

<    1   2   3   4   5   >