Page MenuHomePhabricator

lawrence_danna (Lawrence D'Anna)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 11 2017, 3:24 PM (119 w, 4 d)

Recent Activity

Mon, Jan 13

lawrence_danna added inline comments to D67793: new api class: SBFile.
Mon, Jan 13, 11:13 AM · Restricted Project, Restricted Project

Nov 4 2019

lawrence_danna committed rGadbf64ccc9e1: [LLDB][Python] remove ArgInfo::count (authored by lawrence_danna).
[LLDB][Python] remove ArgInfo::count
Nov 4 2019, 12:50 PM
lawrence_danna closed D69742: [LLDB][Python] remove ArgInfo::count.
Nov 4 2019, 12:50 PM · Restricted Project
lawrence_danna added a comment to D69742: [LLDB][Python] remove ArgInfo::count.

At this point, should we just delete the ArgInfo struct altogether, and replace it with a plain unsigned?

Nov 4 2019, 12:50 PM · Restricted Project
lawrence_danna added inline comments to D69742: [LLDB][Python] remove ArgInfo::count.
Nov 4 2019, 10:47 AM · Restricted Project

Nov 1 2019

lawrence_danna updated the summary of D69742: [LLDB][Python] remove ArgInfo::count.
Nov 1 2019, 5:47 PM · Restricted Project
lawrence_danna created D69742: [LLDB][Python] remove ArgInfo::count.
Nov 1 2019, 5:38 PM · Restricted Project

Oct 30 2019

lawrence_danna committed rG3071ebf7b383: [LLDB][PythonFile] fix dangerous borrow semantics on python2 (authored by lawrence_danna).
[LLDB][PythonFile] fix dangerous borrow semantics on python2
Oct 30 2019, 9:49 AM
lawrence_danna committed rGfb01c01bf3f6: [LLDB][Python] warning fix for LLDBSwigPythonBreakpointCallbackFunction (authored by lawrence_danna).
[LLDB][Python] warning fix for LLDBSwigPythonBreakpointCallbackFunction
Oct 30 2019, 9:49 AM
lawrence_danna closed D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2.
Oct 30 2019, 9:49 AM · Restricted Project

Oct 29 2019

lawrence_danna added a comment to D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2.

@labath looks like you were right, just not flushing seems to work fine.

Oct 29 2019, 8:21 PM · Restricted Project
lawrence_danna abandoned D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.

thanks for the feedback, I'll come back with a "Dense" version of this at some point

Oct 29 2019, 8:21 PM · Restricted Project, Restricted Project
lawrence_danna updated the summary of D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2.
Oct 29 2019, 6:19 PM · Restricted Project
lawrence_danna updated the diff for D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2.

fix the test too

Oct 29 2019, 6:19 PM · Restricted Project
lawrence_danna updated the diff for D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2.

just don't even flush

Oct 29 2019, 6:14 PM · Restricted Project
lawrence_danna committed rGa69bbe02a235: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args (authored by lawrence_danna).
[LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args
Oct 29 2019, 5:45 PM
lawrence_danna closed D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args.
Oct 29 2019, 5:45 PM · Restricted Project
lawrence_danna added inline comments to D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args.
Oct 29 2019, 1:40 PM · Restricted Project
lawrence_danna added a comment to D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2.

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?

Oct 29 2019, 11:23 AM · Restricted Project
lawrence_danna committed rG6a93a12a8dd9: [LLDB][Python] fix another fflush issue on NetBSD (authored by lawrence_danna).
[LLDB][Python] fix another fflush issue on NetBSD
Oct 29 2019, 9:49 AM
lawrence_danna closed D69488: [LLDB][Python] fix another fflush issue on NetBSD.
Oct 29 2019, 9:49 AM · Restricted Project

Oct 28 2019

lawrence_danna added a parent revision for D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2: D69488: [LLDB][Python] fix another fflush issue on NetBSD.
Oct 28 2019, 2:06 PM · Restricted Project
lawrence_danna created D69532: [LLDB][PythonFile] fix dangerous borrow semantics on python2.
Oct 28 2019, 2:06 PM · Restricted Project
lawrence_danna updated the diff for D69488: [LLDB][Python] fix another fflush issue on NetBSD.

revert to previous version

Oct 28 2019, 2:02 PM · Restricted Project
lawrence_danna added a comment to D69488: [LLDB][Python] fix another fflush issue on NetBSD.

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 prefer those two changes to be committed separately, preferably with a few hours delay so that it would be clear if it causes any breakage on buildbot.

Oct 28 2019, 1:48 PM · Restricted Project
lawrence_danna updated the diff for D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args.

improved error handling

Oct 28 2019, 1:14 PM · Restricted Project
lawrence_danna added a comment to D69488: [LLDB][Python] fix another fflush issue on NetBSD.

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 strange behavior if multiple things start reading/writing to the different FILE objects simultaneously. I think I'd rather just keep the existing borrow semantics. I don't think that should be a problem in practice -- it's just that this test is weird because is testing the extreme cases of this behavior (which is fine). Normally you'll just use one level of wrapping and so the underlying file will be naturally kept around, since lldb will still be holding onto it.

Oct 28 2019, 11:46 AM · Restricted Project
lawrence_danna added a comment to D69488: [LLDB][Python] fix another fflush issue on NetBSD.

There, I think that fixes the issue with borrow semantics and the NetBSD issues.

Oct 28 2019, 12:23 AM · Restricted Project
lawrence_danna updated the diff for D69488: [LLDB][Python] fix another fflush issue on NetBSD.

protect python from being exposed to C++ reference borrowing semantics

Oct 28 2019, 12:12 AM · Restricted Project

Oct 27 2019

lawrence_danna added inline comments to D69488: [LLDB][Python] fix another fflush issue on NetBSD.
Oct 27 2019, 11:16 PM · Restricted Project
lawrence_danna added inline comments to D69488: [LLDB][Python] fix another fflush issue on NetBSD.
Oct 27 2019, 11:09 PM · Restricted Project
lawrence_danna committed rG40b0fa7ef212: [LLDB][formatters] ArgInfo::count -> ArgInfo::max_positional_args (authored by lawrence_danna).
[LLDB][formatters] ArgInfo::count -> ArgInfo::max_positional_args
Oct 27 2019, 6:08 PM
lawrence_danna closed D69469: [LLDB][formatters] ArgInfo::count -> ArgInfo::max_positional_args.
Oct 27 2019, 6:08 PM · Restricted Project
lawrence_danna updated the diff for D69488: [LLDB][Python] fix another fflush issue on NetBSD.

and another

Oct 27 2019, 5:20 PM · Restricted Project
lawrence_danna updated the diff for D69488: [LLDB][Python] fix another fflush issue on NetBSD.

found another one

Oct 27 2019, 4:48 PM · Restricted Project
lawrence_danna updated the diff for D69488: [LLDB][Python] fix another fflush issue on NetBSD.

py2_const_cast shouldn't be static as a free function

Oct 27 2019, 4:20 PM · Restricted Project
lawrence_danna created D69488: [LLDB][Python] fix another fflush issue on NetBSD.
Oct 27 2019, 2:29 PM · Restricted Project
lawrence_danna added a comment to D68737: SBFile::GetFile: convert SBFile back into python native files..

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 Python file objects like this. I have a bad feeling for e.g. creating low-level a new file object for stdin, and then having Python destroy it alongside its own stdin object.

What do you mean "a second system of file objects outside Python, and injecting it into Python file objects"? That's not what it does. We have lldb_private::File proxies for python files, not the other way around.

Hmm, I guess I've been reading that code wrong. I guess I'm out of clues then.

Oct 27 2019, 1:16 PM · Restricted Project
lawrence_danna added a comment to D68737: SBFile::GetFile: convert SBFile back into python native files..

Which Python version are you using?

Oct 27 2019, 11:13 AM · Restricted Project
lawrence_danna added a comment to D68737: SBFile::GetFile: convert SBFile back into python native files..

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 Python file objects like this. I have a bad feeling for e.g. creating low-level a new file object for stdin, and then having Python destroy it alongside its own stdin object.

Oct 27 2019, 11:13 AM · Restricted Project
lawrence_danna added inline comments to D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args.
Oct 27 2019, 10:54 AM · Restricted Project

Oct 26 2019

lawrence_danna created D69469: [LLDB][formatters] ArgInfo::count -> ArgInfo::max_positional_args.
Oct 26 2019, 6:09 PM · Restricted Project
lawrence_danna created D69468: [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_args.
Oct 26 2019, 2:52 PM · Restricted Project
lawrence_danna added a comment to D68737: SBFile::GetFile: convert SBFile back into python native files..

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 file object destructor:
IOError: [Errno 9] Bad file descriptor

I'd suspect the same fd is using in more than one file but that's only a guess.

The curious part is that I've tried ktruss-ing the process and I don't see any failed close() syscalls.

Oct 26 2019, 12:11 AM · Restricted Project

Oct 22 2019

lawrence_danna added a comment to D69320: [lldb] [Python] Do not attempt to flush() a read-only fd.

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.

Oct 22 2019, 2:03 PM · Restricted Project
lawrence_danna accepted D69320: [lldb] [Python] Do not attempt to flush() a read-only fd.

LGTM

Oct 22 2019, 12:59 PM · Restricted Project
lawrence_danna added a comment to D68856: convert SBDebugger::***FileHandle() wrappers to native files..

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, it's invalid to call flush() on stdin or — more generally — on file open only for reading. I'm going to submit a patch in a few minutes.

Oct 22 2019, 12:49 PM · Restricted Project
lawrence_danna added a comment to D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.

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

Oct 22 2019, 12:02 PM · Restricted Project, Restricted Project
lawrence_danna added a comment to D68856: convert SBDebugger::***FileHandle() wrappers to native files..

now I'm stuck on this trying to install cmake.

Oct 22 2019, 10:27 AM · Restricted Project
lawrence_danna added a comment to D68856: convert SBDebugger::***FileHandle() wrappers to native files..

@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've tried google cloud, but their image creator script only works for netbsd 9, and python won't build because x11 isn't installed. I've tried installing the pkgsrc binaries from netbsd 8 onto netbsd 9, but that doesn't work either. I'm completely at a loss. I can't figure out how to make a netbsd VM that can actually build LLDB.

Do you have a machine image on AWS or google cloud or even a VMDK or something that I could use?

For the python part, you need to either install all basesystem sets (including x11) or set X11_TYPE=modular in /etc/mk.conf.

Oct 22 2019, 10:08 AM · Restricted Project
lawrence_danna added a comment to D68856: convert SBDebugger::***FileHandle() wrappers to native files..

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've tried google cloud, but their image creator script only works for netbsd 9, and python won't build because x11 isn't installed. I've tried installing the pkgsrc binaries from netbsd 8 onto netbsd 9, but that doesn't work either. I'm completely at a loss. I can't figure out how to make a netbsd VM that can actually build LLDB.

Oct 22 2019, 12:03 AM · Restricted Project

Oct 21 2019

lawrence_danna committed rGd602e0d0cab2: fix PythonDataObjectsTest.TestExceptions on windows (authored by lawrence_danna).
fix PythonDataObjectsTest.TestExceptions on windows
Oct 21 2019, 9:00 PM
lawrence_danna committed rL375477: fix PythonDataObjectsTest.TestExceptions on windows.
fix PythonDataObjectsTest.TestExceptions on windows
Oct 21 2019, 8:59 PM
lawrence_danna committed rG04edd1893c2d: remove multi-argument form of PythonObject::Reset() (authored by lawrence_danna).
remove multi-argument form of PythonObject::Reset()
Oct 21 2019, 7:36 PM
lawrence_danna committed rL375475: remove multi-argument form of PythonObject::Reset().
remove multi-argument form of PythonObject::Reset()
Oct 21 2019, 7:36 PM
lawrence_danna closed D69214: remove multi-argument form of PythonObject::Reset().
Oct 21 2019, 7:36 PM · Restricted Project
lawrence_danna added a comment to D68856: convert SBDebugger::***FileHandle() wrappers to native files..

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.

Oct 21 2019, 6:50 PM · Restricted Project
lawrence_danna updated the diff for D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.

edit comment

Oct 21 2019, 5:57 PM · Restricted Project, Restricted Project
lawrence_danna updated the diff for D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.

add a comment explaining OptionalInfo

Oct 21 2019, 5:57 PM · Restricted Project, Restricted Project
lawrence_danna added a comment to D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.
Oct 21 2019, 5:29 PM · Restricted Project, Restricted Project
lawrence_danna updated the diff for D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.

call the traits struct OptionalInfo for consistency with DenseMap

Oct 21 2019, 5:20 PM · Restricted Project, Restricted Project
lawrence_danna updated the diff for D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.

fix some silly bugs

Oct 21 2019, 4:33 PM · Restricted Project, Restricted Project
lawrence_danna updated the diff for D69214: remove multi-argument form of PythonObject::Reset().

removed blank lines from python-wrapper.swig

Oct 21 2019, 3:56 PM · Restricted Project
lawrence_danna updated the diff for D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.

ugh I edited the wrong revision, reverted. Sorry for the noise.

Oct 21 2019, 3:56 PM · Restricted Project, Restricted Project
lawrence_danna updated the diff for D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.

remove empty lines

Oct 21 2019, 3:46 PM · Restricted Project, Restricted Project
lawrence_danna added a comment to D68856: convert SBDebugger::***FileHandle() wrappers to native files..

I spoke too soon, I don't have a *usable* netbsd VM.

Oct 21 2019, 3:18 PM · Restricted Project
lawrence_danna added a comment to D68856: convert SBDebugger::***FileHandle() wrappers to native files..

sure, um do you have a netbsd machine handy?

If you mean one I could you access to, then I'm afraid not.

Oct 21 2019, 2:32 PM · Restricted Project
lawrence_danna added a comment to D68856: convert SBDebugger::***FileHandle() wrappers to native files..

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%3ATestDefaultConstructorForAPIObjects.py

Could you help me debugging it? I haven't been working on the Python API that deep, so I'd use any help I can get. For a start, a way to make that error message point to a specific operation would be helpful.

Oct 21 2019, 1:36 PM · Restricted Project
lawrence_danna updated the diff for D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.

moved MakeInvalid and IsValid into the trait struct.

Oct 21 2019, 1:26 PM · Restricted Project, Restricted Project
lawrence_danna updated the diff for D69214: remove multi-argument form of PythonObject::Reset().

fixes

Oct 21 2019, 12:59 PM · Restricted Project
lawrence_danna added inline comments to D69214: remove multi-argument form of PythonObject::Reset().
Oct 21 2019, 12:59 PM · Restricted Project

Oct 20 2019

lawrence_danna added a reviewer for D69230: RFC: specialized Optional<T> for T that can represent its own invalid state: dexonsmith.
Oct 20 2019, 6:41 PM · Restricted Project, Restricted Project
lawrence_danna created D69230: RFC: specialized Optional<T> for T that can represent its own invalid state.
Oct 20 2019, 6:32 PM · Restricted Project, Restricted Project
lawrence_danna updated the diff for D69214: remove multi-argument form of PythonObject::Reset().

oops

Oct 20 2019, 1:07 PM · Restricted Project
lawrence_danna updated the diff for D69214: remove multi-argument form of PythonObject::Reset().

fixes

Oct 20 2019, 1:06 PM · Restricted Project
lawrence_danna added a comment to D69214: remove multi-argument form of PythonObject::Reset().

fixed

Oct 20 2019, 1:06 PM · Restricted Project

Oct 19 2019

lawrence_danna updated the diff for D69214: remove multi-argument form of PythonObject::Reset().

comment

Oct 19 2019, 4:45 PM · Restricted Project
lawrence_danna updated the diff for D69214: remove multi-argument form of PythonObject::Reset().

fixes

Oct 19 2019, 2:27 PM · Restricted Project
lawrence_danna added inline comments to D69214: remove multi-argument form of PythonObject::Reset().
Oct 19 2019, 2:27 PM · Restricted Project
lawrence_danna committed rG722b61892454: eliminate nontrivial Reset(...) from TypedPythonObject (authored by lawrence_danna).
eliminate nontrivial Reset(...) from TypedPythonObject
Oct 19 2019, 11:43 AM
lawrence_danna closed D69133: eliminate nontrivial Reset(...) from TypedPythonObject.
Oct 19 2019, 11:43 AM · Restricted Project
lawrence_danna committed rL375350: eliminate nontrivial Reset(...) from TypedPythonObject.
eliminate nontrivial Reset(...) from TypedPythonObject
Oct 19 2019, 11:42 AM
lawrence_danna added inline comments to D69214: remove multi-argument form of PythonObject::Reset().
Oct 19 2019, 10:34 AM · Restricted Project
lawrence_danna updated the diff for D69133: eliminate nontrivial Reset(...) from TypedPythonObject.

comment on NullTerminated

Oct 19 2019, 10:20 AM · Restricted Project
lawrence_danna updated the diff for D69214: remove multi-argument form of PythonObject::Reset().

rebased

Oct 19 2019, 1:51 AM · Restricted Project
lawrence_danna updated the diff for D69133: eliminate nontrivial Reset(...) from TypedPythonObject.

fixed

Oct 19 2019, 1:42 AM · Restricted Project
lawrence_danna added a comment to D69133: eliminate nontrivial Reset(...) from TypedPythonObject.

While I appreciate the desire to reduce "boilerplate", I also think there's a lot of value in consistency....

Oct 19 2019, 1:06 AM · Restricted Project
lawrence_danna committed rG2386537c2469: [LLDB] bugfix: command script add -f doesn't work for some callables (authored by lawrence_danna).
[LLDB] bugfix: command script add -f doesn't work for some callables
Oct 19 2019, 12:11 AM
lawrence_danna committed rGbdcad0aca0a0: convert LLDBSwigPythonCallTypeScript to ArgInfo::max_positional_args (authored by lawrence_danna).
convert LLDBSwigPythonCallTypeScript to ArgInfo::max_positional_args
Oct 19 2019, 12:11 AM
lawrence_danna closed D69153: convert LLDBSwigPythonCallTypeScript to ArgInfo::max_positional_args.
Oct 19 2019, 12:11 AM · Restricted Project
lawrence_danna closed D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.
Oct 19 2019, 12:11 AM · Restricted Project
lawrence_danna committed rL375333: [LLDB] bugfix: command script add -f doesn't work for some callables.
[LLDB] bugfix: command script add -f doesn't work for some callables
Oct 19 2019, 12:11 AM
lawrence_danna committed rL375334: convert LLDBSwigPythonCallTypeScript to ArgInfo::max_positional_args.
convert LLDBSwigPythonCallTypeScript to ArgInfo::max_positional_args
Oct 19 2019, 12:11 AM

Oct 18 2019

lawrence_danna created D69214: remove multi-argument form of PythonObject::Reset().
Oct 18 2019, 9:37 PM · Restricted Project
lawrence_danna updated the diff for D69133: eliminate nontrivial Reset(...) from TypedPythonObject.

use enable_if on CStringArg so the other constructors take precedence

Oct 18 2019, 8:41 PM · Restricted Project
lawrence_danna updated the diff for D69133: eliminate nontrivial Reset(...) from TypedPythonObject.

spelling

Oct 18 2019, 1:27 PM · Restricted Project
lawrence_danna added inline comments to D69133: eliminate nontrivial Reset(...) from TypedPythonObject.
Oct 18 2019, 1:27 PM · Restricted Project
lawrence_danna added a comment to D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.

@jingham , @labath what do you think?

Oct 18 2019, 1:27 PM · Restricted Project
lawrence_danna updated the diff for D69133: eliminate nontrivial Reset(...) from TypedPythonObject.

fixed

Oct 18 2019, 1:27 PM · Restricted Project

Oct 17 2019

lawrence_danna added a comment to D67793: new api class: SBFile.

BTW, I've had to add (or rather, extend) a fairly ugly hack in r373573 in order to get the new tests running on non-darwin platforms. The reason for that is that the FILE* out typemap needs to get the "mode" of the object in order to construct the python wrapper.

My hope is that we can be improved once you're finished your work here. For instance by reimplementing GetOutputFileHandle on top of GetOutputFile in swig, as the latter will (hopefully) be able to get the mode of a file correctly. Does that sound reasonable, or am I totally off-track here?

Oct 17 2019, 6:57 PM · Restricted Project, Restricted Project