mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
44 lines
918 B
Plaintext
44 lines
918 B
Plaintext
# General options
|
|
set verbose off
|
|
set confirm off
|
|
set disassembly-flavor intel
|
|
set output-radix 0x10
|
|
set input-radix 10.
|
|
|
|
# helpful shortcuts
|
|
define lsbp
|
|
info breakpoints
|
|
end
|
|
document lsbp
|
|
List all breakpoints
|
|
end
|
|
|
|
define iframe
|
|
info frame
|
|
info args
|
|
info locals
|
|
end
|
|
define reg
|
|
info registers
|
|
end
|
|
|
|
# Fancy sourcing of modules
|
|
python
|
|
import sys
|
|
import os.path
|
|
gef = os.path.expanduser('~/tools/gef/gef.py')
|
|
pwndbg = os.path.expanduser('~/tools/pwndbg/gdbinit.py')
|
|
peda = os.path.expanduser('~/.peda/peda.py')
|
|
if os.path.isfile(gef):
|
|
gdb.execute('source {}'.format(gef))
|
|
elif os.path.isfile(pwndbg):
|
|
sys.path.insert(0, os.path.expanduser('~/tools/pwndbg/vendor'))
|
|
gdb.execute('source {}'.format(pwndbg))
|
|
elif os.path.isfile(peda):
|
|
gdb.execute('source {}'.format(peda))
|
|
|
|
local_init = os.path.expanduser('~/.gdbinit.local')
|
|
if os.path.isfile(local_init):
|
|
gdb.execute('source {}'.format(local_init))
|
|
end
|