1 //===-- SBBreakpoint.h ------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBBreakpoint_h_
11 #define LLDB_SBBreakpoint_h_
13 #include "lldb/API/SBDefines.h"
17 class LLDB_API SBBreakpoint
21 typedef bool (*BreakpointHitCallback) (void *baton,
24 lldb::SBBreakpointLocation &location);
28 SBBreakpoint (const lldb::SBBreakpoint& rhs);
32 const lldb::SBBreakpoint &
33 operator = (const lldb::SBBreakpoint& rhs);
35 // Tests to see if the opaque breakpoint object in this object matches the
36 // opaque breakpoint object in "rhs".
38 operator == (const lldb::SBBreakpoint& rhs);
41 operator != (const lldb::SBBreakpoint& rhs);
50 ClearAllBreakpointSites ();
52 lldb::SBBreakpointLocation
53 FindLocationByAddress (lldb::addr_t vm_addr);
56 FindLocationIDByAddress (lldb::addr_t vm_addr);
58 lldb::SBBreakpointLocation
59 FindLocationByID (lldb::break_id_t bp_loc_id);
61 lldb::SBBreakpointLocation
62 GetLocationAtIndex (uint32_t index);
65 SetEnabled (bool enable);
71 SetOneShot (bool one_shot);
83 SetIgnoreCount (uint32_t count);
86 GetIgnoreCount () const;
89 SetCondition (const char *condition);
95 SetThreadID (lldb::tid_t sb_thread_id);
101 SetThreadIndex (uint32_t index);
104 GetThreadIndex() const;
107 SetThreadName (const char *thread_name);
110 GetThreadName () const;
113 SetQueueName (const char *queue_name);
116 GetQueueName () const;
119 SetCallback (BreakpointHitCallback callback, void *baton);
122 SetScriptCallbackFunction (const char *callback_function_name);
125 SetScriptCallbackBody (const char *script_body_text);
128 AddName (const char *new_name);
131 RemoveName (const char *name_to_remove);
134 MatchesName (const char *name);
137 GetNames (SBStringList &names);
140 GetNumResolvedLocations() const;
143 GetNumLocations() const;
146 GetDescription (lldb::SBStream &description);
149 EventIsBreakpointEvent (const lldb::SBEvent &event);
151 static lldb::BreakpointEventType
152 GetBreakpointEventTypeFromEvent (const lldb::SBEvent& event);
154 static lldb::SBBreakpoint
155 GetBreakpointFromEvent (const lldb::SBEvent& event);
157 static lldb::SBBreakpointLocation
158 GetBreakpointLocationAtIndexFromEvent (const lldb::SBEvent& event, uint32_t loc_idx);
161 GetNumBreakpointLocationsFromEvent (const lldb::SBEvent &event_sp);
165 friend class SBBreakpointLocation;
166 friend class SBTarget;
168 SBBreakpoint (const lldb::BreakpointSP &bp_sp);
170 lldb_private::Breakpoint *
173 lldb_private::Breakpoint *
179 const lldb::BreakpointSP &
183 PrivateBreakpointHitCallback (void *baton,
184 lldb_private::StoppointCallbackContext *context,
185 lldb::user_id_t break_id,
186 lldb::user_id_t break_loc_id);
188 lldb::BreakpointSP m_opaque_sp;
193 #endif // LLDB_SBBreakpoint_h_