Johnny Chen | 5de6a79 | 2011-07-18 21:30:21 +0000 | [diff] [blame] | 1 | //===-- SWIG Interface for SBBreakpointLocation -----------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | namespace lldb { |
| 11 | |
| 12 | %feature("docstring", |
| 13 | "Represents one unique instance (by address) of a logical breakpoint. |
| 14 | |
| 15 | A breakpoint location is defined by the breakpoint that produces it, |
| 16 | and the address that resulted in this particular instantiation. |
| 17 | Each breakpoint location has its settable options. |
| 18 | |
| 19 | SBBreakpoint contains SBBreakpointLocation(s). See docstring of SBBreakpoint |
| 20 | for retrieval of an SBBreakpointLocation from an SBBreakpoint." |
| 21 | ) SBBreakpointLocation; |
| 22 | class SBBreakpointLocation |
| 23 | { |
| 24 | public: |
| 25 | |
| 26 | SBBreakpointLocation (); |
| 27 | |
| 28 | SBBreakpointLocation (const lldb::SBBreakpointLocation &rhs); |
| 29 | |
| 30 | ~SBBreakpointLocation (); |
| 31 | |
Jim Ingham | 6904a93 | 2012-05-16 17:15:08 +0000 | [diff] [blame] | 32 | break_id_t |
| 33 | GetID (); |
| 34 | |
Johnny Chen | 5de6a79 | 2011-07-18 21:30:21 +0000 | [diff] [blame] | 35 | bool |
| 36 | IsValid() const; |
| 37 | |
Jim Ingham | 1b040c1 | 2011-10-07 22:27:25 +0000 | [diff] [blame] | 38 | lldb::SBAddress |
| 39 | GetAddress(); |
| 40 | |
Johnny Chen | 5de6a79 | 2011-07-18 21:30:21 +0000 | [diff] [blame] | 41 | lldb::addr_t |
| 42 | GetLoadAddress (); |
| 43 | |
| 44 | void |
| 45 | SetEnabled(bool enabled); |
| 46 | |
| 47 | bool |
| 48 | IsEnabled (); |
| 49 | |
| 50 | uint32_t |
| 51 | GetIgnoreCount (); |
| 52 | |
| 53 | void |
| 54 | SetIgnoreCount (uint32_t n); |
| 55 | |
Johnny Chen | 85ced80 | 2011-10-18 19:13:06 +0000 | [diff] [blame] | 56 | %feature("docstring", " |
| 57 | //-------------------------------------------------------------------------- |
| 58 | /// The breakpoint location stops only if the condition expression evaluates |
| 59 | /// to true. |
| 60 | //-------------------------------------------------------------------------- |
| 61 | ") SetCondition; |
Johnny Chen | 5de6a79 | 2011-07-18 21:30:21 +0000 | [diff] [blame] | 62 | void |
| 63 | SetCondition (const char *condition); |
| 64 | |
Johnny Chen | 85ced80 | 2011-10-18 19:13:06 +0000 | [diff] [blame] | 65 | %feature("docstring", " |
| 66 | //------------------------------------------------------------------ |
| 67 | /// Get the condition expression for the breakpoint location. |
| 68 | //------------------------------------------------------------------ |
| 69 | ") GetCondition; |
Johnny Chen | 5de6a79 | 2011-07-18 21:30:21 +0000 | [diff] [blame] | 70 | const char * |
| 71 | GetCondition (); |
| 72 | |
Jim Ingham | d80102e | 2014-04-02 01:04:55 +0000 | [diff] [blame] | 73 | %feature("docstring", " |
| 74 | //------------------------------------------------------------------ |
| 75 | /// Set the callback to the given Python function name. |
| 76 | //------------------------------------------------------------------ |
| 77 | ") SetScriptCallbackFunction; |
| 78 | void |
| 79 | SetScriptCallbackFunction (const char *callback_function_name); |
| 80 | |
| 81 | %feature("docstring", " |
| 82 | //------------------------------------------------------------------ |
| 83 | /// Provide the body for the script function to be called when the breakpoint location is hit. |
| 84 | /// The body will be wrapped in a function, which be passed two arguments: |
| 85 | /// 'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint |
| 86 | /// 'bpno' - which is the SBBreakpointLocation to which the callback was attached. |
| 87 | /// |
| 88 | /// The error parameter is currently ignored, but will at some point hold the Python |
| 89 | /// compilation diagnostics. |
| 90 | /// Returns true if the body compiles successfully, false if not. |
| 91 | //------------------------------------------------------------------ |
| 92 | ") SetScriptCallbackBody; |
| 93 | SBError |
| 94 | SetScriptCallbackBody (const char *script_body_text); |
| 95 | |
Johnny Chen | 5de6a79 | 2011-07-18 21:30:21 +0000 | [diff] [blame] | 96 | void |
| 97 | SetThreadID (lldb::tid_t sb_thread_id); |
| 98 | |
| 99 | lldb::tid_t |
| 100 | GetThreadID (); |
| 101 | |
| 102 | void |
| 103 | SetThreadIndex (uint32_t index); |
| 104 | |
| 105 | uint32_t |
| 106 | GetThreadIndex() const; |
| 107 | |
| 108 | void |
| 109 | SetThreadName (const char *thread_name); |
| 110 | |
| 111 | const char * |
| 112 | GetThreadName () const; |
| 113 | |
| 114 | void |
| 115 | SetQueueName (const char *queue_name); |
| 116 | |
| 117 | const char * |
| 118 | GetQueueName () const; |
| 119 | |
| 120 | bool |
| 121 | IsResolved (); |
| 122 | |
| 123 | bool |
| 124 | GetDescription (lldb::SBStream &description, DescriptionLevel level); |
| 125 | |
| 126 | SBBreakpoint |
| 127 | GetBreakpoint (); |
| 128 | }; |
| 129 | |
| 130 | } // namespace lldb |