-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy path__init__.py
More file actions
43 lines (35 loc) · 949 Bytes
/
__init__.py
File metadata and controls
43 lines (35 loc) · 949 Bytes
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
import gdb
from .cpu import Cpu
from .kdump import Kdump
from .kgmon import Kgmon
from .klog import Klog
from .ktrace import Ktrace
from .proc import Kprocess, Process, CurrentProcess
from .struct import BinTime
from .sync import CondVar, Mutex
from .thread import Kthread, Thread, CurrentThread
from .events import stop_handler
from .virtmem import VmInfo
def addPrettyPrinters():
pp = gdb.printing.RegexpCollectionPrettyPrinter('mimiker')
pp.add_printer('mtx', 'mtx', Mutex)
pp.add_printer('condvar', 'condvar', CondVar)
pp.add_printer('thread', 'thread', Thread)
pp.add_printer('process', 'process', Process)
pp.add_printer('bintime', 'bintime', BinTime)
gdb.printing.register_pretty_printer(gdb.current_objfile(), pp)
addPrettyPrinters()
# Commands
Cpu()
Kdump()
Klog()
Kprocess()
Kthread()
Ktrace()
Kgmon()
VmInfo()
# Functions
CurrentThread()
CurrentProcess()
# Events
gdb.events.stop.connect(stop_handler)