[Lldb-commits] [PATCH] D68671: Add the ability to pass extra args to a Python breakpoint command function
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 14 16:40:21 PDT 2019
jingham updated this revision to Diff 224929.
jingham added a comment.
Addressed Pavel's comments.
I explicitly want the number of fixed arguments, so I changed the function name to GetNumFixedArguments. The docs say explicitly that you have to make the function take either three or four fixed arguments, and that's what I have to check against. I don't want to know about varargs and optional named arguments.
I added the Expected, though I didn't plumb the change into PythonCallable::GetNumArguments. That's of marginal extra benefit, and orthogonal to the purposes of this patch.
Note also, the fact that I was now checking argument signatures when adding the command means you can no longer do:
(lldb) break command add -F myfunc.function
(lldb) command script import myfunc.py
which TestBreakpointCommand.py was doing. You have to make the Python function available BEFORE adding it to the breakpoint. I don't think this was an feature, and I don't see any harm in adding that requirement. But it is a change in behavior so I thought I'd bring it up.
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68671/new/
https://reviews.llvm.org/D68671
Files:
lldb/include/lldb/API/SBBreakpoint.h
lldb/include/lldb/API/SBBreakpointLocation.h
lldb/include/lldb/API/SBBreakpointName.h
lldb/include/lldb/API/SBStructuredData.h
lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h
lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/bktptcmd.py
lldb/scripts/Python/python-wrapper.swig
lldb/scripts/interface/SBBreakpoint.i
lldb/scripts/interface/SBBreakpointLocation.i
lldb/scripts/interface/SBBreakpointName.i
lldb/source/API/SBBreakpoint.cpp
lldb/source/API/SBBreakpointLocation.cpp
lldb/source/API/SBBreakpointName.cpp
lldb/source/Commands/CommandObjectBreakpoint.cpp
lldb/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Commands/Options.td
lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp
lldb/source/Interpreter/ScriptInterpreter.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68671.224929.patch
Type: text/x-patch
Size: 55732 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191014/7f3a2fb8/attachment-0001.bin>
More information about the lldb-commits
mailing list