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

Class DebugProcess

api/python/debuggercontroller.py:26–59  ·  view source on GitHub ↗

DebugProcess represents a process in the target. It has the following fields: * ``pid``: the ID of the process * ``name``: the name of the process

Source from the content-addressed store, hash-verified

24
25
26class DebugProcess:
27 """
28 DebugProcess represents a process in the target. It has the following fields:
29
30 * ``pid``: the ID of the process
31 * ``name``: the name of the process
32
33 """
34
35 def __init__(self, pid, name):
36 self.pid = pid
37 self.name = name
38
39 def __eq__(self, other):
40 if not isinstance(other, self.__class__):
41 return NotImplemented
42 return self.pid == other.pid and self.name == other.name
43
44 def __ne__(self, other):
45 if not isinstance(other, self.__class__):
46 return NotImplemented
47 return not (self == other)
48
49 def __hash__(self):
50 return hash((self.pid, self.pid))
51
52 def __setattr__(self, name, value):
53 try:
54 object.__setattr__(self, name, value)
55 except AttributeError:
56 raise AttributeError(f"attribute '{name}' is read only")
57
58 def __repr__(self):
59 return f"<DebugProcess: {self.pid:#x}, {self.name}>"
60
61
62class DebugThread:

Callers 1

processesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected