blob: 4b6888f86b77f4772e8b8e461796b20fcf3d4699 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
%pythoncode %{
from abc import ABC, abstractmethod
from typing import List
import lldb
class ScriptedProcess(ABC):
@abstractmethod
def __init__(self):
pass
# Optional initializer
def __init__(self, dictionary: lldb.SBStructuredData):
pass
### Main funcitonnalities
@abstractmethod
def get_num_memory_regions(self) -> int:
pass
@abstractmethod
def get_memory_region_at_index(self, idx: int) -> lldb.SBMemoryRegionInfo:
pass
@abstractmethod
def get_num_threads(self):
pass
@abstractmethod
def get_thread_at_index(self, idx: int) -> lldb.SBThread:
pass
@abstractmethod
def get_register_for_thread(self, tid:int):
pass
@abstractmethod
def read_memory_at_address(self, addr:int) -> lldb.SBData:
pass
@abstractmethod
def get_loaded_images(self) -> List[str]: # -> List[lldb.SBModule]:
pass
### Process state
@abstractmethod
def can_debug(self) -> bool:
pass
@abstractmethod
def is_alive(self) -> bool:
pass
%}
|