You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'''A helper object that will lazily hand out watchpoints for a target when supplied an index.'''
1107
+
def __init__(self, sbtarget):
1108
+
self.sbtarget = sbtarget
1109
+
1110
+
def __len__(self):
1111
+
if self.sbtarget:
1112
+
returnint(self.sbtarget.GetNumWatchpoints())
1113
+
return0
1114
+
1115
+
def __getitem__(self, key):
1116
+
ifisinstance(key, int):
1117
+
count = len(self)
1118
+
if -count <= key < count:
1119
+
key %= count
1120
+
return self.sbtarget.GetWatchpointAtIndex(key)
1121
+
return None
1122
+
1123
+
def get_watchpoints_access_object(self):
1124
+
'''An accessor function that returns a watchpoints_access() object which allows lazy watchpoint access from a lldb.SBtarget object.'''
1125
+
return self.watchpoints_access(self)
1126
+
1127
+
def get_target_watchpoints(self):
1128
+
'''An accessor function that returns a list() that contains all watchpoints in a lldb.SBtarget object.'''
1129
+
watchpoints = []
1130
+
for idx in range(self.GetNumWatchpoints()):
1131
+
bkpts.append(self.GetWatchpointAtIndex(idx))
1132
+
return watchpoints
1133
+
1134
+
1076
1135
modules = property(get_modules_array, None, doc='''A read only property that returns a list() of lldb.SBModule objects contained in this target. This list is a list all modules that the target currently is tracking (the main executable and all dependent shared libraries).''')
1077
1136
module = property(get_modules_access_object, None, doc=r'''A read only property that returns an object that implements python operator overloading with the square brackets().\n target.module[<int>] allows array access to any modules.\n target.module[<str>] allows access to modules by basename, full path, or uuid string value.\n target.module[uuid.UUID()] allows module access by UUID.\n target.module[re] allows module access using a regular expression that matches the module full path.''')
1078
1137
process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that this target owns.''')
1079
1138
executable = property(GetExecutable, None, doc='''A read only property that returns an lldb object that represents the main executable module (lldb.SBModule) for this target.''')
1080
1139
debugger = property(GetDebugger, None, doc='''A read only property that returns an lldb object that represents the debugger (lldb.SBDebugger) that owns this target.''')
1081
1140
num_breakpoints = property(GetNumBreakpoints, None, doc='''A read only property that returns the number of breakpoints that this target has as an integer.''')
1141
+
breakpoints = property(get_target_bkpts, None, doc='''A read only property that returns a list() of lldb.SBBreakpoint objects for all breakpoints in this target.''')
1142
+
breakpoint = property(get_bkpts_access_object, None, doc='''A read only property that returns an object that can be used to access breakpoints as an array ("bkpt_12 = lldb.target.bkpt[12]").''')
1082
1143
num_watchpoints = property(GetNumWatchpoints, None, doc='''A read only property that returns the number of watchpoints that this target has as an integer.''')
1144
+
watchpoints = property(get_target_watchpoints, None, doc='''A read only property that returns a list() of lldb.SBwatchpoint objects for all watchpoints in this target.''')
1145
+
watchpoint = property(get_watchpoints_access_object, None, doc='''A read only property that returns an object that can be used to access watchpoints as an array ("watchpoint_12 = lldb.target.watchpoint[12]").''')
1083
1146
broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this target.''')
1084
1147
byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this target.''')
1085
1148
addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this target.''')
0 commit comments