-
Notifications
You must be signed in to change notification settings - Fork 2
/
gdbinit
67 lines (56 loc) · 978 Bytes
/
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
set disassembly-flavor intel
set disassemble-next-line auto
set pagination off
set step-mode on
set history filename ~/.gdb_history
set history save on
set history size unlimited
set history expansion on
set print array-indexes on
set print array on
set print asm-demangle on
set print demangle on
set print frame-arguments all
set print object on
set print pretty on
set print static-members on
set print symbol-filename on
set print thread-events off
set print vtbl on
set prompt \001\033[1;31m\002\n(^q^) \001\033[0m\002
# helpers
define chr
printf "[%c]", $arg0
end
define hex
printf "0x%x", $arg0
end
define ord
printf "[%d]", $arg0
end
define bin
p/t $arg0
end
# aliases
define px
p/x $arg0
end
define ps
p/s $arg0
end
define pu
p/u $arg0
end
define pb
p/t $arg0
end
define py
python-interactive
end
define pc
x/8i $pc-10
end
# https://github.com/longld/peda
# source ~/work/peda.py
# https://github.com/hugsy/gef
# source ~/work/gef/gef.py