-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gdbinit
40 lines (32 loc) · 1.2 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
set history save on
set history size 10000
set history filename ~/.gdbhist
add-auto-load-safe-path /usr/share/go-1.*/src/runtime/runtime-gdb.py
add-auto-load-safe-path /home/riatre/.rustup/toolchains/*-x86_64-unknown-linux-gnu/lib/rustlib/etc/
python
class IgnoreErrorsCommand (gdb.Command):
'''Execute a single command, ignoring all errors.
Only one-line commands are supported.
This is primarily useful in scripts.'''
def __init__ (self):
super (IgnoreErrorsCommand, self).__init__ ("ignore-errors",
gdb.COMMAND_OBSCURE,
# FIXME...
gdb.COMPLETE_COMMAND)
def invoke (self, arg, from_tty):
try:
gdb.execute (arg, from_tty)
except:
pass
IgnoreErrorsCommand ()
end
# Ignore errors during set disassembly-flavor as it is bogus on aarch64.
ignore-errors set disassembly-flavor intel
python
import os
if os.getenv("GDB_GEF"):
gdb.execute("ignore-errors source ~/lib/gef/gef.py")
elif not os.getenv("GDB_BARE"):
gdb.execute("ignore-errors source ~/lib/pwndbg/gdbinit.py")
end
set debuginfod enabled on