forked from bloomberg/pystack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcorefile.pxd
More file actions
55 lines (49 loc) · 1.5 KB
/
corefile.pxd
File metadata and controls
55 lines (49 loc) · 1.5 KB
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
54
55
from posix.types cimport pid_t
from _pystack.elf_common cimport CoreFileAnalyzer
from _pystack.mem cimport SimpleVirtualMap
from libc.stdint cimport uintptr_t
from libcpp.memory cimport shared_ptr
from libcpp.string cimport string as cppstring
from libcpp.vector cimport vector
cdef extern from "corefile.h" namespace "pystack":
struct CoreCrashInfo:
int si_signo
int si_errno
int si_code
int sender_pid
int sender_uid
uintptr_t failed_addr
struct CorePsInfo:
char state
char sname
char zomb
char nice
unsigned long flag
int uid
int gid
pid_t pid
pid_t ppid
pid_t pgrp
pid_t sid
char fname[16]
char psargs[80]
struct CoreVirtualMap:
uintptr_t start
uintptr_t end
unsigned long filesize
cppstring flags
unsigned long offset
cppstring device
unsigned long inode
cppstring path
cppstring buildid
cdef cppclass CoreFileExtractor:
CoreFileExtractor(shared_ptr[CoreFileAnalyzer] analyzer) except+
int Pid() except+
vector[CoreVirtualMap] MemoryMaps() except+
vector[SimpleVirtualMap] ModuleInformation() except+
cppstring extractExecutable() except+
CoreCrashInfo extractFailureInfo() except+
CorePsInfo extractPSInfo() except+
vector[cppstring] missingModules() except+
vector[CoreVirtualMap] extractMappedFiles() except+