forked from RoderickChan/docker_pwn_env
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gdbinit
85 lines (70 loc) · 1.4 KB
/
.gdbinit
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
source ~/pwndbg/gdbinit.py
source ~/Pwngdb/pwngdb.py
source ~/Pwngdb/angelheap/gdbinit.py
# don't skip repeat value when use telescope
set telescope-skip-repeating-val off
# show flags
set show-flags on
# show LR in aarch64
set show-retaddr-reg on
# set backtrace lines 4
set context-backtrace-lines 4
# don't stop the process when catch alarm signal
handle SIGALRM nostop print
# set follow-fork-mode parent
# don't detach when fork is called
set detach-on-fork off
# set sourcecode directory
# directory /usr/src/glibc/glibc-2.27/malloc
# show content of address using offset when PIE is enabled
define sbase
if $argc == 1
telescope $rebase($arg0) 10
end
if $argc == 2
telescope $rebase($arg0) $arg1
end
end
# set breakpoints using offset when PIE is enabled
define bbase
b *$rebase($arg0)
end
define dq
if $argc == 1
x /8gx $arg0
end
if $argc == 2
x /$arg1gx $arg0
end
end
define dd
if $argc == 1
x /16wx $arg0
end
if $argc == 2
x /$arg1wx $arg0
end
end
define dw
if $argc == 1
x /32hx $arg0
end
if $argc == 2
x /$arg1hx $arg0
end
end
define db
if $argc == 1
x /64bx $arg0
end
if $argc == 2
x /$arg1bx $arg0
end
end
# enable Pwngdb from https://github.com/scwuaptx/Pwngdb
define hook-run
python
import angelheap
angelheap.init_angelheap()
end
end