MCPcopy Create free account
hub / github.com/Vector35/debugger / DebugBreakpoint

Class DebugBreakpoint

api/python/debuggercontroller.py:221–258  ·  view source on GitHub ↗

DebugBreakpoint represents a breakpoint in the target. It has the following fields: * ``module``: the name of the module for which the breakpoint is in * ``offset``: the offset of the breakpoint to the start of the module * ``address``: the absolute address of the breakpoint *

Source from the content-addressed store, hash-verified

219
220
221class DebugBreakpoint:
222 """
223 DebugBreakpoint represents a breakpoint in the target. It has the following fields:
224
225 * ``module``: the name of the module for which the breakpoint is in
226 * ``offset``: the offset of the breakpoint to the start of the module
227 * ``address``: the absolute address of the breakpoint
228 * ``enabled``: not used
229
230 """
231 def __init__(self, module, offset, address, enabled):
232 self.module = module
233 self.offset = offset
234 self.address = address
235 self.enabled = enabled
236
237 def __eq__(self, other):
238 if not isinstance(other, self.__class__):
239 return NotImplemented
240 return self.module == other.module and self.offset == other.offset and self.address == other.address \
241 and self.enabled == other.enabled
242
243 def __ne__(self, other):
244 if not isinstance(other, self.__class__):
245 return NotImplemented
246 return not (self == other)
247
248 def __hash__(self):
249 return hash((self.module, self.offset, self.address. self.enabled))
250
251 def __setattr__(self, name, value):
252 try:
253 object.__setattr__(self, name, value)
254 except AttributeError:
255 raise AttributeError(f"attribute '{name}' is read only")
256
257 def __repr__(self):
258 return f"<DebugBreakpoint: {self.module}:{self.offset:#x}, {self.address:#x}>"
259
260
261class ModuleNameAndOffset:

Callers 1

breakpointsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected