diff options
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r-- | lldb/scripts/Python/interface/SBBreakpoint.i | 22 | ||||
-rw-r--r-- | lldb/scripts/Python/interface/SBBreakpointLocation.i | 23 |
2 files changed, 44 insertions, 1 deletions
diff --git a/lldb/scripts/Python/interface/SBBreakpoint.i b/lldb/scripts/Python/interface/SBBreakpoint.i index 34274dda8b0..190c9b90dd6 100644 --- a/lldb/scripts/Python/interface/SBBreakpoint.i +++ b/lldb/scripts/Python/interface/SBBreakpoint.i @@ -177,9 +177,29 @@ public: const char * GetQueueName () const; + %feature("docstring", " + //------------------------------------------------------------------ + /// Set the name of the script function to be called when the breakpoint is hit. + //------------------------------------------------------------------ + ") SetScriptCallbackFunction; void - SetCallback (BreakpointHitCallback callback, void *baton); + SetScriptCallbackFunction (const char *callback_function_name); + %feature("docstring", " + //------------------------------------------------------------------ + /// Provide the body for the script function to be called when the breakpoint is hit. + /// The body will be wrapped in a function, which be passed two arguments: + /// 'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint + /// 'bpno' - which is the SBBreakpointLocation to which the callback was attached. + /// + /// The error parameter is currently ignored, but will at some point hold the Python + /// compilation diagnostics. + /// Returns true if the body compiles successfully, false if not. + //------------------------------------------------------------------ + ") SetScriptCallbackBody; + SBError + SetScriptCallbackBody (const char *script_body_text); + size_t GetNumResolvedLocations() const; diff --git a/lldb/scripts/Python/interface/SBBreakpointLocation.i b/lldb/scripts/Python/interface/SBBreakpointLocation.i index 8c9b9c78246..a3073538e67 100644 --- a/lldb/scripts/Python/interface/SBBreakpointLocation.i +++ b/lldb/scripts/Python/interface/SBBreakpointLocation.i @@ -70,6 +70,29 @@ public: const char * GetCondition (); + %feature("docstring", " + //------------------------------------------------------------------ + /// Set the callback to the given Python function name. + //------------------------------------------------------------------ + ") SetScriptCallbackFunction; + void + SetScriptCallbackFunction (const char *callback_function_name); + + %feature("docstring", " + //------------------------------------------------------------------ + /// Provide the body for the script function to be called when the breakpoint location is hit. + /// The body will be wrapped in a function, which be passed two arguments: + /// 'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint + /// 'bpno' - which is the SBBreakpointLocation to which the callback was attached. + /// + /// The error parameter is currently ignored, but will at some point hold the Python + /// compilation diagnostics. + /// Returns true if the body compiles successfully, false if not. + //------------------------------------------------------------------ + ") SetScriptCallbackBody; + SBError + SetScriptCallbackBody (const char *script_body_text); + void SetThreadID (lldb::tid_t sb_thread_id); |