-
Notifications
You must be signed in to change notification settings - Fork 0
/
gdbinit
executable file
·75 lines (59 loc) · 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
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
# GDB settings
# tbreak <file/sym>:[loc] - Temporary breakpoints
# break <sym>:loc if (cond) - Conditional breakpoint
# rbreak file::<regex> - Regex match breakpoint
#show solib-search-path
#set solib-search-path /non/standard/path/to/libs
#info sharedlibrary
# history across invocations. up/down arrows do not work, so disable.
#set history save on
#set history filename ~/.gdb_history
#set history size unlimited
#set history remove-duplicates 10
# Verbosity settings
set confirm off
set verbose off
# Pretty print options.
set print vtbl on
set print pretty on
set print array on
set print null-stop
set print union on
set print object on
# Debug deamon processes that involve fork().
set follow-fork-mode child
# These make gdb never pause in its output
set height 0
set width 0
#set pagination off
# Using tui mode (status line shows: target,pid/tid,func-name,line-num,pc-reg)
# In tui mode, up/down arrows scroll src code, use ctrl-n/p for prev/next cmds
#tui enable|disable # ctrl-x a
#layout asm|reg|src|split|next|prev # enable given window
#focus asm|reg|src|split|next|prev # shift ctrl to given window
#tui reg all|vector|system|float|general|prev|next # display given registers
#update|refersh # CTRL-L
#layout asm
#layout reg
# Default is att (AT&T)
set disassembly-flavor intel
# Set default base to hexadecimal
#set input-radix 0x10
#set output-radix 0x10
# Source scripts
#source ~/scripts/gdb/alias.gdb
#source ~/scripts/gdb/basic.gdb
# To log cmds along with output, enable tracing. 'set logging on' is deprecated
set logging file gdb.log
set logging enabled on
set trace-commands on
# Breakpoints - very imp to set bp pending option below to allow bp in future.
set breakpoint pending on
tbreak main
#b <func>
# Hack to send Ctrl-C signal to process instead of gdb
handle SIGINT stop pass
#handle SIGKILL nopass noprint nostop
#handle SIGTERM nopass noprint nostop
# Color gdb prompt. Doesn't work with --tui
#set prompt \033[\033[31;m\033] gdb $ \033[0m