[Lldb-commits] [lldb] 483ec13 - Use internal_dict everywhere we refer to the python session dict in docs.

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 9 17:49:04 PST 2021


Author: Jim Ingham
Date: 2021-02-09T17:48:47-08:00
New Revision: 483ec136da7193de781a5284f1c37929cc27c05c

URL: https://github.com/llvm/llvm-project/commit/483ec136da7193de781a5284f1c37929cc27c05c
DIFF: https://github.com/llvm/llvm-project/commit/483ec136da7193de781a5284f1c37929cc27c05c.diff

LOG: Use internal_dict everywhere we refer to the python session dict in docs.

Added: 
    

Modified: 
    lldb/docs/use/python-reference.rst
    lldb/source/Commands/CommandObjectBreakpointCommand.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/docs/use/python-reference.rst b/lldb/docs/use/python-reference.rst
index f3ce744128c9..a1bdc87ab912 100644
--- a/lldb/docs/use/python-reference.rst
+++ b/lldb/docs/use/python-reference.rst
@@ -179,35 +179,35 @@ arguments:
 
 ::
 
-  def breakpoint_function_wrapper(frame, bp_loc, dict):
+  def breakpoint_function_wrapper(frame, bp_loc, internal_dict):
      # Your code goes here
 
 or:
 
 ::
 
-  def breakpoint_function_wrapper(frame, bp_loc, extra_args, dict):
+  def breakpoint_function_wrapper(frame, bp_loc, extra_args, internal_dict):
      # Your code goes here
 
 
-+----------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
-| Argument       | Type                          | Description                                                                                                                               |
-+----------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
-| **frame**      | **lldb.SBFrame**              | The current stack frame where the breakpoint got hit.                                                                                     |
-|                |                               | The object will always be valid.                                                                                                          |
-|                |                               | This **frame** argument might *not* match the currently selected stack frame found in the **lldb** module global variable **lldb.frame**. |
-+----------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
-| **bp_loc**     | **lldb.SBBreakpointLocation** | The breakpoint location that just got hit. Breakpoints are represented by **lldb.SBBreakpoint**                                           |
-|                |                               | objects. These breakpoint objects can have one or more locations. These locations                                                         |
-|                |                               | are represented by **lldb.SBBreakpointLocation** objects.                                                                                 |
-+----------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
-| **extra_args** | **lldb.SBStructuredData**     | **Optional** If your breakpoint callback function takes this extra parameter, then when the callback gets added to a breakpoint, its      |
-|                |                               | contents can parametrize this use of the callback.  For instance, instead of writing a callback that stops when the caller is "Foo",      |
-|                |                               | you could take the function name from a field in the **extra_args**, making the callback more general.  The **-k** and **-v** options     |
-|                |                               | to **breakpoint command add** will be passed as a Dictionary in the **extra_args** parameter, or you can provide it with the SB API's.    |
-+----------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
-| **dict**       | **dict**                      | The python session dictionary as a standard python dictionary object.                                                                     |
-+----------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
++-------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| Argument          | Type                          | Description                                                                                                                               |
++-------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| **frame**         | **lldb.SBFrame**              | The current stack frame where the breakpoint got hit.                                                                                     |
+|                   |                               | The object will always be valid.                                                                                                          |
+|                   |                               | This **frame** argument might *not* match the currently selected stack frame found in the **lldb** module global variable **lldb.frame**. |
++-------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| **bp_loc**        | **lldb.SBBreakpointLocation** | The breakpoint location that just got hit. Breakpoints are represented by **lldb.SBBreakpoint**                                           |
+|                   |                               | objects. These breakpoint objects can have one or more locations. These locations                                                         |
+|                   |                               | are represented by **lldb.SBBreakpointLocation** objects.                                                                                 |
++-------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| **extra_args**    | **lldb.SBStructuredData**     | **Optional** If your breakpoint callback function takes this extra parameter, then when the callback gets added to a breakpoint, its      |
+|                   |                               | contents can parametrize this use of the callback.  For instance, instead of writing a callback that stops when the caller is "Foo",      |
+|                   |                               | you could take the function name from a field in the **extra_args**, making the callback more general.  The **-k** and **-v** options     |
+|                   |                               | to **breakpoint command add** will be passed as a Dictionary in the **extra_args** parameter, or you can provide it with the SB API's.    |
++-------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
+| **internal_dict** | **dict**                      | The python session dictionary as a standard python dictionary object.                                                                     |
++-------------------+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
 
 Optionally, a Python breakpoint command can return a value. Returning False
 tells LLDB that you do not want to stop at the breakpoint. Any other return
@@ -546,7 +546,7 @@ which should implement the following interface:
 ::
 
   class CommandObjectType:
-      def __init__(self, debugger, session_dict):
+      def __init__(self, debugger, internal_dict):
           this call should initialize the command with respect to the command interpreter for the passed-in debugger
       def __call__(self, debugger, command, exe_ctx, result):
           this is the actual bulk of the command, akin to Python command functions

diff  --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 1b2149525d80..3489b5cffb9f 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -119,12 +119,12 @@ to supply the function name prepended by the module name:"
 
 The function itself must have either of the following prototypes:
 
-def breakpoint_callback(frame, bp_loc, dict):
+def breakpoint_callback(frame, bp_loc, internal_dict):
   # Your code goes here
 
 or:
 
-def breakpoint_callback(frame, bp_loc, extra_args, dict):
+def breakpoint_callback(frame, bp_loc, extra_args, internal_dict):
   # Your code goes here
 
 )"


        


More information about the lldb-commits mailing list