summaryrefslogtreecommitdiff
path: root/scripts/interface/SBBreakpoint.i
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/interface/SBBreakpoint.i')
-rw-r--r--scripts/interface/SBBreakpoint.i43
1 files changed, 37 insertions, 6 deletions
diff --git a/scripts/interface/SBBreakpoint.i b/scripts/interface/SBBreakpoint.i
index 95bc0cda0051..525797ad91f1 100644
--- a/scripts/interface/SBBreakpoint.i
+++ b/scripts/interface/SBBreakpoint.i
@@ -6,7 +6,6 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-
namespace lldb {
%feature("docstring",
@@ -81,11 +80,6 @@ class SBBreakpoint
{
public:
- typedef bool (*BreakpointHitCallback) (void *baton,
- SBProcess &process,
- SBThread &thread,
- lldb::SBBreakpointLocation &location);
-
SBBreakpoint ();
SBBreakpoint (const lldb::SBBreakpoint& rhs);
@@ -153,6 +147,10 @@ public:
const char *
GetCondition ();
+ void SetAutoContinue(bool auto_continue);
+
+ bool GetAutoContinue();
+
void
SetThreadID (lldb::tid_t sb_thread_id);
@@ -251,6 +249,39 @@ public:
%pythoncode %{
+ class locations_access(object):
+ '''A helper object that will lazily hand out locations for a breakpoint when supplied an index.'''
+ def __init__(self, sbbreakpoint):
+ self.sbbreakpoint = sbbreakpoint
+
+ def __len__(self):
+ if self.sbbreakpoint:
+ return int(self.sbbreakpoint.GetNumLocations())
+ return 0
+
+ def __getitem__(self, key):
+ if type(key) is int and key < len(self):
+ return self.sbbreakpoint.GetLocationAtIndex(key)
+ return None
+
+ def get_locations_access_object(self):
+ '''An accessor function that returns a locations_access() object which allows lazy location access from a lldb.SBBreakpoint object.'''
+ return self.locations_access (self)
+
+ def get_breakpoint_location_list(self):
+ '''An accessor function that returns a list() that contains all locations in a lldb.SBBreakpoint object.'''
+ locations = []
+ accessor = self.get_locations_access_object()
+ for idx in range(len(accessor)):
+ locations.append(accessor[idx])
+ return locations
+
+ __swig_getmethods__["locations"] = get_breakpoint_location_list
+ if _newclass: locations = property(get_breakpoint_location_list, None, doc='''A read only property that returns a list() of lldb.SBBreakpointLocation objects for this breakpoint.''')
+
+ __swig_getmethods__["location"] = get_locations_access_object
+ if _newclass: location = property(get_locations_access_object, None, doc='''A read only property that returns an object that can access locations by index (not location ID) (location = bkpt.location[12]).''')
+
__swig_getmethods__["id"] = GetID
if _newclass: id = property(GetID, None, doc='''A read only property that returns the ID of this breakpoint.''')