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 (105 w, 21 m)

Recent Activity

Today

lawrence_danna updated the diff for D68995: clean up the implementation of PythonCallable::GetNumArguments.

fixup: VAR_KEYWORD

Wed, Oct 16, 3:26 PM · Restricted Project
lawrence_danna accepted D68872: SBCommandReturnObject: change LLDB_RECORD_METHOD(..., FILE *, ...) to use LLDB_RECORD_DUMMY.
Wed, Oct 16, 3:17 PM
lawrence_danna added a comment to D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.

Also, @jingham, only the #if branch for python2 has easy access to the __call__ attribute. We could test for it in python3 but it wouldn't do what you're thinking it would:

Wed, Oct 16, 3:17 PM · Restricted Project
lawrence_danna added a comment to D68995: clean up the implementation of PythonCallable::GetNumArguments.

Thanks for jumping onto this. Apart from the inline comments, I have one high level question: What are the cases that the old method is wrong for? Was it just builtin functions, or are there other cases too? Is it possible to fix it to work for builtings too? (okay, those were three questions)

What I am wondering is how important it is to maintain two methods for fetching the argument information. Builtin functions are not likely to be used as lldb callbacks, so if it's just those, it may be sufficient to just leave a TODO to use the new method once we are in a position to require python>=3.3.

Wed, Oct 16, 1:59 PM · Restricted Project
lawrence_danna added inline comments to D68995: clean up the implementation of PythonCallable::GetNumArguments.
Wed, Oct 16, 1:52 PM · Restricted Project
lawrence_danna updated the diff for D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.

rebased

Wed, Oct 16, 1:52 PM · Restricted Project
lawrence_danna updated the diff for D68995: clean up the implementation of PythonCallable::GetNumArguments.

review fixes

Wed, Oct 16, 1:51 PM · Restricted Project
lawrence_danna added a comment to D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.

fixed

Wed, Oct 16, 1:09 PM · Restricted Project
lawrence_danna updated the diff for D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.

comment

Wed, Oct 16, 1:09 PM · Restricted Project
lawrence_danna updated the diff for D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.

review fixes

Wed, Oct 16, 1:09 PM · Restricted Project
lawrence_danna added a comment to D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.

IIUC, the only external change in this patch is that before if you implemented your Python command using a class with an __call__ method, it would have to be the signature that took exe_ctx. Since this is now switching off of the number of arguments (less self) you could make an __call__ form that didn't take the extra argument. I certainly want to discourage that, since the form without the exe_ctx will do the wrong thing in some contexts (e.g. if the command is used in breakpoint callbacks or stop-hooks). It looks like that would be easy to prevent, you know that you've found call right above where you check. So I think it would be better to explicitly disallow callforms that don't take the exe_ctx.

This is different from the extra_args cases in the breakpoint callbacks and thread plans and so forth. In those cases, if you don't need extra_args, there's no good reason why you should have to have them. But in the case of Python commands, it's actually more correct to get the state you are operating on from the exe_ctx. Otherwise you have to fall back on the currently selected process/thread/frame/etc, and there are contexts (like when you have multiple targets all hitting breakpoints simultaneously) where it does not make sense to have the currently selected state track what process/thread/frame are pertinent to the operation of a breakpoint command or stop hook. So I do want to gently discourage this form of command.

Wed, Oct 16, 12:40 PM · Restricted Project
lawrence_danna updated the diff for D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.

added tests for call objects, and a fix for python2

Wed, Oct 16, 12:12 PM · Restricted Project

Yesterday

lawrence_danna added a comment to D68872: SBCommandReturnObject: change LLDB_RECORD_METHOD(..., FILE *, ...) to use LLDB_RECORD_DUMMY.

I want to fix the reliance on sizeof(FILE). The underlying type of FILE is unspecified in POSIX and indeed this case on linux-musl - so lldb 9.0.0 and trunk currently fail to build on linux-musl. I know very little about the code, and I hope you or @JDevlieghere can suggest a way forward.

Tue, Oct 15, 8:07 PM
lawrence_danna committed rGb07823f3e2da: update ScriptInterpreterPython to use File, not FILE* (authored by lawrence_danna).
update ScriptInterpreterPython to use File, not FILE*
Tue, Oct 15, 7:01 PM
lawrence_danna closed D68962: update ScriptInterpreterPython to use File, not FILE*.
Tue, Oct 15, 7:01 PM · Restricted Project
lawrence_danna committed rL374964: update ScriptInterpreterPython to use File, not FILE*.
update ScriptInterpreterPython to use File, not FILE*
Tue, Oct 15, 7:01 PM
lawrence_danna added a comment to D68872: SBCommandReturnObject: change LLDB_RECORD_METHOD(..., FILE *, ...) to use LLDB_RECORD_DUMMY.

Can you provide a replacement?

Tue, Oct 15, 6:53 PM
lawrence_danna added a child revision for D68995: clean up the implementation of PythonCallable::GetNumArguments: D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.
Tue, Oct 15, 5:44 PM · Restricted Project
lawrence_danna added a parent revision for D69014: [LLDB] bugfix: command script add -f doesn't work for some callables: D68995: clean up the implementation of PythonCallable::GetNumArguments.
Tue, Oct 15, 5:44 PM · Restricted Project
lawrence_danna created D69014: [LLDB] bugfix: command script add -f doesn't work for some callables.
Tue, Oct 15, 5:44 PM · Restricted Project
lawrence_danna updated the diff for D68995: clean up the implementation of PythonCallable::GetNumArguments.

python 2 fix

Tue, Oct 15, 5:37 PM · Restricted Project
lawrence_danna updated the diff for D68962: update ScriptInterpreterPython to use File, not FILE*.

remove superfluous resets

Tue, Oct 15, 12:13 PM · Restricted Project
lawrence_danna updated the diff for D68995: clean up the implementation of PythonCallable::GetNumArguments.

oops, revert

Tue, Oct 15, 10:58 AM · Restricted Project
lawrence_danna added inline comments to D68963: delete SWIG typemaps for FILE*.
Tue, Oct 15, 10:58 AM · Restricted Project
lawrence_danna updated the diff for D68963: delete SWIG typemaps for FILE*.

put in missing consumeError()

Tue, Oct 15, 10:58 AM · Restricted Project
lawrence_danna updated the diff for D68995: clean up the implementation of PythonCallable::GetNumArguments.

put in missing consumeError()

Tue, Oct 15, 10:58 AM · Restricted Project
lawrence_danna committed rG30cf609548d9: remove FILE* usage from SBStream.i (authored by lawrence_danna).
remove FILE* usage from SBStream.i
Tue, Oct 15, 10:49 AM
lawrence_danna closed D68960: remove FILE* usage from SBStream.i.
Tue, Oct 15, 10:48 AM · Restricted Project
lawrence_danna committed rL374924: remove FILE* usage from SBStream.i.
remove FILE* usage from SBStream.i
Tue, Oct 15, 10:39 AM
lawrence_danna added inline comments to D68671: Add the ability to pass extra args to a Python breakpoint command function.
Tue, Oct 15, 10:39 AM · Restricted Project
lawrence_danna committed rGd3bd5b3d71ae: eliminate virtual methods from PythonDataObjects (authored by lawrence_danna).
eliminate virtual methods from PythonDataObjects
Tue, Oct 15, 10:20 AM
lawrence_danna closed D68918: eliminate virtual methods from PythonDataObjects.
Tue, Oct 15, 10:20 AM · Restricted Project
lawrence_danna committed rL374916: eliminate virtual methods from PythonDataObjects.
eliminate virtual methods from PythonDataObjects
Tue, Oct 15, 10:11 AM
lawrence_danna committed rG311dbb1bd7c2: convert SBDebugger::***FileHandle() wrappers to native files. (authored by lawrence_danna).
convert SBDebugger::***FileHandle() wrappers to native files.
Tue, Oct 15, 10:01 AM
lawrence_danna committed rL374912: convert SBDebugger::***FileHandle() wrappers to native files..
convert SBDebugger::***FileHandle() wrappers to native files.
Tue, Oct 15, 10:01 AM
lawrence_danna closed D68856: convert SBDebugger::***FileHandle() wrappers to native files..
Tue, Oct 15, 10:01 AM · Restricted Project
lawrence_danna committed rGd9b553ec9961: SBFile::GetFile: convert SBFile back into python native files. (authored by lawrence_danna).
SBFile::GetFile: convert SBFile back into python native files.
Tue, Oct 15, 9:52 AM
lawrence_danna closed D68737: SBFile::GetFile: convert SBFile back into python native files..
Tue, Oct 15, 9:52 AM · Restricted Project
lawrence_danna committed rL374911: SBFile::GetFile: convert SBFile back into python native files..
SBFile::GetFile: convert SBFile back into python native files.
Tue, Oct 15, 9:52 AM
lawrence_danna created D68995: clean up the implementation of PythonCallable::GetNumArguments.
Tue, Oct 15, 8:56 AM · Restricted Project
lawrence_danna updated the diff for D68737: SBFile::GetFile: convert SBFile back into python native files..

pass ::flush to PyFile_FromFile

Tue, Oct 15, 5:36 AM · Restricted Project
lawrence_danna added inline comments to D68671: Add the ability to pass extra args to a Python breakpoint command function.
Tue, Oct 15, 5:26 AM · Restricted Project
lawrence_danna added inline comments to D68737: SBFile::GetFile: convert SBFile back into python native files..
Tue, Oct 15, 12:48 AM · Restricted Project

Mon, Oct 14

lawrence_danna added inline comments to D68671: Add the ability to pass extra args to a Python breakpoint command function.
Mon, Oct 14, 5:28 PM · Restricted Project
lawrence_danna added parent revisions for D68963: delete SWIG typemaps for FILE*: D68918: eliminate virtual methods from PythonDataObjects, D68856: convert SBDebugger::***FileHandle() wrappers to native files..
Mon, Oct 14, 4:49 PM · Restricted Project
lawrence_danna added a parent revision for D68962: update ScriptInterpreterPython to use File, not FILE*: D68737: SBFile::GetFile: convert SBFile back into python native files..
Mon, Oct 14, 4:49 PM · Restricted Project
lawrence_danna added a child revision for D68918: eliminate virtual methods from PythonDataObjects: D68963: delete SWIG typemaps for FILE*.
Mon, Oct 14, 4:49 PM · Restricted Project
lawrence_danna added a child revision for D68856: convert SBDebugger::***FileHandle() wrappers to native files.: D68963: delete SWIG typemaps for FILE*.
Mon, Oct 14, 4:49 PM · Restricted Project
lawrence_danna added a child revision for D68737: SBFile::GetFile: convert SBFile back into python native files.: D68962: update ScriptInterpreterPython to use File, not FILE*.
Mon, Oct 14, 4:49 PM · Restricted Project
lawrence_danna added parent revisions for D68963: delete SWIG typemaps for FILE*: D68962: update ScriptInterpreterPython to use File, not FILE*, D68960: remove FILE* usage from SBStream.i.
Mon, Oct 14, 4:42 PM · Restricted Project
lawrence_danna added a parent revision for D68960: remove FILE* usage from SBStream.i: D68737: SBFile::GetFile: convert SBFile back into python native files..
Mon, Oct 14, 4:42 PM · Restricted Project
lawrence_danna added a child revision for D68737: SBFile::GetFile: convert SBFile back into python native files.: D68960: remove FILE* usage from SBStream.i.
Mon, Oct 14, 4:42 PM · Restricted Project
lawrence_danna added a child revision for D68960: remove FILE* usage from SBStream.i: D68963: delete SWIG typemaps for FILE*.
Mon, Oct 14, 4:42 PM · Restricted Project
lawrence_danna added a child revision for D68962: update ScriptInterpreterPython to use File, not FILE*: D68963: delete SWIG typemaps for FILE*.
Mon, Oct 14, 4:42 PM · Restricted Project
lawrence_danna created D68963: delete SWIG typemaps for FILE*.
Mon, Oct 14, 4:42 PM · Restricted Project
lawrence_danna created D68962: update ScriptInterpreterPython to use File, not FILE*.
Mon, Oct 14, 4:40 PM · Restricted Project
lawrence_danna created D68960: remove FILE* usage from SBStream.i.
Mon, Oct 14, 4:29 PM · Restricted Project
lawrence_danna updated the diff for D68918: eliminate virtual methods from PythonDataObjects.

rebased, and added in explicit default constructors for MSVC's sake.

Mon, Oct 14, 3:56 PM · Restricted Project
lawrence_danna updated the diff for D68856: convert SBDebugger::***FileHandle() wrappers to native files..

rebased.

Mon, Oct 14, 3:56 PM · Restricted Project
lawrence_danna updated the diff for D68737: SBFile::GetFile: convert SBFile back into python native files..

rebased

Mon, Oct 14, 3:56 PM · Restricted Project
lawrence_danna added a comment to D68737: SBFile::GetFile: convert SBFile back into python native files..

@labath, how's this look now?

Mon, Oct 14, 3:56 PM · Restricted Project
lawrence_danna requested changes to D68872: SBCommandReturnObject: change LLDB_RECORD_METHOD(..., FILE *, ...) to use LLDB_RECORD_DUMMY.
Mon, Oct 14, 3:28 PM
lawrence_danna added a comment to D68872: SBCommandReturnObject: change LLDB_RECORD_METHOD(..., FILE *, ...) to use LLDB_RECORD_DUMMY.

I don't think we can just delete these. They're API that existing C++ clients might still be using.

Mon, Oct 14, 3:28 PM
lawrence_danna added a parent revision for D68856: convert SBDebugger::***FileHandle() wrappers to native files.: D68737: SBFile::GetFile: convert SBFile back into python native files..
Mon, Oct 14, 3:21 PM · Restricted Project
lawrence_danna added a child revision for D68737: SBFile::GetFile: convert SBFile back into python native files.: D68856: convert SBDebugger::***FileHandle() wrappers to native files..
Mon, Oct 14, 3:21 PM · Restricted Project
lawrence_danna added inline comments to D68918: eliminate virtual methods from PythonDataObjects.
Mon, Oct 14, 3:10 PM · Restricted Project
lawrence_danna committed rG9efbc564baab: build fix for SBInstruction. (authored by lawrence_danna).
build fix for SBInstruction.
Mon, Oct 14, 2:51 PM
lawrence_danna committed rL374825: build fix for SBInstruction..
build fix for SBInstruction.
Mon, Oct 14, 2:50 PM
lawrence_danna added a parent revision for D68918: eliminate virtual methods from PythonDataObjects: D68737: SBFile::GetFile: convert SBFile back into python native files..
Mon, Oct 14, 2:31 PM · Restricted Project
lawrence_danna added a child revision for D68737: SBFile::GetFile: convert SBFile back into python native files.: D68918: eliminate virtual methods from PythonDataObjects.
Mon, Oct 14, 2:31 PM · Restricted Project
lawrence_danna committed rGe7a9115680e2: remove FILE* bindings from SBInstruction. (authored by lawrence_danna).
remove FILE* bindings from SBInstruction.
Mon, Oct 14, 2:03 PM
lawrence_danna committed rL374820: remove FILE* bindings from SBInstruction..
remove FILE* bindings from SBInstruction.
Mon, Oct 14, 2:03 PM
lawrence_danna closed D68890: remove FILE* bindings from SBInstruction..
Mon, Oct 14, 2:03 PM · Restricted Project
lawrence_danna committed rG62c9fe4273e8: uint32_t options -> File::OpenOptions options (authored by lawrence_danna).
uint32_t options -> File::OpenOptions options
Mon, Oct 14, 1:16 PM
lawrence_danna committed rG322f12afc367: remove FILE* usage from ReportEventState() and HandleProcessEvent() (authored by lawrence_danna).
remove FILE* usage from ReportEventState() and HandleProcessEvent()
Mon, Oct 14, 1:16 PM
lawrence_danna closed D68853: uint32_t options -> File::OpenOptions options.
Mon, Oct 14, 1:16 PM · Restricted Project
lawrence_danna committed rL374817: uint32_t options -> File::OpenOptions options.
uint32_t options -> File::OpenOptions options
Mon, Oct 14, 1:16 PM
lawrence_danna closed D68546: remove FILE* usage from ReportEventState() and HandleProcessEvent().
Mon, Oct 14, 1:16 PM · Restricted Project
lawrence_danna committed rL374816: remove FILE* usage from ReportEventState() and HandleProcessEvent().
remove FILE* usage from ReportEventState() and HandleProcessEvent()
Mon, Oct 14, 1:16 PM
lawrence_danna committed rGd5768e3d0e88: Fix test breakage caused by r374424 (authored by lawrence_danna).
Fix test breakage caused by r374424
Mon, Oct 14, 11:59 AM
lawrence_danna committed rL374803: Fix test breakage caused by r374424.
Fix test breakage caused by r374424
Mon, Oct 14, 11:59 AM
lawrence_danna closed D68951: Fix test breakage caused by r374424.
Mon, Oct 14, 11:59 AM · Restricted Project
lawrence_danna created D68951: Fix test breakage caused by r374424.
Mon, Oct 14, 11:39 AM · Restricted Project
lawrence_danna added a comment to D68738: update TestRunCommandInterpreterAPI to use SBFile.

This is still failing on the Windows bot. Please fix it ASAP or revert it.

Mon, Oct 14, 11:39 AM · Restricted Project
lawrence_danna added a comment to D68738: update TestRunCommandInterpreterAPI to use SBFile.

This is still failing on the Windows bot. Please fix it ASAP or revert it.

Mon, Oct 14, 9:38 AM · Restricted Project

Sat, Oct 12

lawrence_danna created D68918: eliminate virtual methods from PythonDataObjects.
Sat, Oct 12, 3:28 PM · Restricted Project

Fri, Oct 11

lawrence_danna created D68890: remove FILE* bindings from SBInstruction..
Fri, Oct 11, 2:13 PM · Restricted Project
lawrence_danna updated the diff for D68546: remove FILE* usage from ReportEventState() and HandleProcessEvent().

swig 3 fix

Fri, Oct 11, 1:24 PM · Restricted Project
lawrence_danna updated the diff for D68546: remove FILE* usage from ReportEventState() and HandleProcessEvent().

use stream

Fri, Oct 11, 1:24 PM · Restricted Project
lawrence_danna added a comment to D68546: remove FILE* usage from ReportEventState() and HandleProcessEvent().

Well... if we agree that SBStream is the future for APIs like this, then I don't think that would be too strange. The FileSP and FILE* variants would both be "legacy/deprecated" and present only to support legacy c++/python uses, and the SBStream would be the thing which we expect new users to use.

That said, I don't think that having an SBFile-based API is that bad either (though I would still like if it is used via an SBStream internally).. The main advantage of the "higher level" stream interface I see is that it is easier to provide your own implementation of it (less methods to override). However, given that we've just went through the exercise of making the file API overridable externally, I don't think we'll want to create an overridable stream abstraction any time soon.

Fri, Oct 11, 1:05 PM · Restricted Project
lawrence_danna updated the diff for D68737: SBFile::GetFile: convert SBFile back into python native files..

review fixes

Fri, Oct 11, 12:55 PM · Restricted Project
lawrence_danna added inline comments to D68737: SBFile::GetFile: convert SBFile back into python native files..
Fri, Oct 11, 12:55 PM · Restricted Project
lawrence_danna updated the diff for D68853: uint32_t options -> File::OpenOptions options.

fix

Fri, Oct 11, 12:55 PM · Restricted Project
lawrence_danna updated the diff for D68856: convert SBDebugger::***FileHandle() wrappers to native files..

fix for swig 3

Fri, Oct 11, 11:01 AM · Restricted Project
lawrence_danna committed rGb3faa01ff962: IOHandler: fall back on File::Read if a FILE* isn't available. (authored by lawrence_danna).
IOHandler: fall back on File::Read if a FILE* isn't available.
Fri, Oct 11, 10:43 AM
lawrence_danna closed D68622: IOHandler: fall back on File::Read if a FILE* isn't available..
Fri, Oct 11, 10:43 AM · Restricted Project
lawrence_danna committed rL374576: IOHandler: fall back on File::Read if a FILE* isn't available..
IOHandler: fall back on File::Read if a FILE* isn't available.
Fri, Oct 11, 10:42 AM
lawrence_danna added inline comments to D68853: uint32_t options -> File::OpenOptions options.
Fri, Oct 11, 10:42 AM · Restricted Project
lawrence_danna updated the diff for D68853: uint32_t options -> File::OpenOptions options.

review fixes

Fri, Oct 11, 10:34 AM · Restricted Project
lawrence_danna updated the diff for D68622: IOHandler: fall back on File::Read if a FILE* isn't available..

move using declarations

Fri, Oct 11, 10:33 AM · Restricted Project