diff options
author | Jim Ingham <jingham@apple.com> | 2021-02-09 15:32:45 -0800 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2021-02-09 15:33:36 -0800 |
commit | 365b186c242b0c3516d7dbb174f3a258c1c8361c (patch) | |
tree | 46dee6b6f81b360a976b6e3657fab0e26d7167ea /lldb/source/Commands/CommandObjectBreakpointCommand.cpp | |
parent | 4bd68f238cf28413f6ad1d24fd5de1e02ff06d33 (diff) | |
download | llvm-365b186c242b0c3516d7dbb174f3a258c1c8361c.zip llvm-365b186c242b0c3516d7dbb174f3a258c1c8361c.tar.gz llvm-365b186c242b0c3516d7dbb174f3a258c1c8361c.tar.bz2 |
Add documentation for the extra_args parameter to breakpoint commands.
Differential Revision: https://reviews.llvm.org/D96368
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpointCommand.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpointCommand.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 \ |