From 365b186c242b0c3516d7dbb174f3a258c1c8361c Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 9 Feb 2021 15:32:45 -0800 Subject: Add documentation for the extra_args parameter to breakpoint commands. Differential Revision: https://reviews.llvm.org/D96368 --- lldb/source/Commands/CommandObjectBreakpointCommand.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lldb/source/Commands/CommandObjectBreakpointCommand.cpp') diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index caaf3bf..241a75e 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -117,14 +117,22 @@ to supply the function name prepended by the module name:" --python-function myutils.breakpoint_callback -The function itself must have the following prototype: +The function itself must have either of the following prototypes: def breakpoint_callback(frame, bp_loc, dict): # Your code goes here +or: + +def breakpoint_callback(frame, bp_loc, extra_args, dict): + # Your code goes here + )" "The arguments are the same as the arguments passed to generated functions as \ -described above. Note that the global variable 'lldb.frame' will NOT be updated when \ +described above. In the second form, any -k and -v pairs provided to the command will \ +be packaged into a SBDictionary in an SBStructuredData and passed as the extra_args parameter. \ +\n\n\ +Note that the global variable 'lldb.frame' will NOT be updated when \ this function is called, so be sure to use the 'frame' argument. The 'frame' argument \ can get you to the thread via frame.GetThread(), the thread can get you to the \ process via thread.GetProcess(), and the process can get you back to the target \ -- cgit v1.1