-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gdbinit
80 lines (72 loc) · 1.17 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
set history save
# golang support
#source /usr/local/go/src/runtime/runtime-gdb.py
# NOT USED ANYMORE
# set breakpoint on main and run
#define bmainrun
# b main.main
# run
#end
# full python tracebacks
#set python print-stack full
#define reload
# source ~/.gdbinit
#end
# Disable confirm for quit
define hook-quit
set confirm off
end
# NO LONGER WORKS - please see direct tmux command to set tmux buffer
# Get location and store in loc
#py
#import gdb
#loc = None
#def setloc():
# global loc
# sal = gdb.decode_line()
# if len(sal):
# sal = sal[1][0]
# loc = "%i:%s"%(sal.line, sal.symtab.filename)
#
## Get loc and store in tmux buffer
#def setloc_tmux():
# gdb.execute("shell tmux set-buffer '%s'"%loc)
#
#end
#
#define setloc_tmux
# py setloc()
# py setloc_tmux()
#end
#
#define hookpost-next
# setloc_tmux
#end
#
#define hookpost-run
# setloc_tmux
#end
#
#define hookpost-step
# setloc_tmux
#end
#
#define hookpost-advance
# setloc_tmux
#end
#
#define hookpost-finish
# setloc_tmux
#end
#
#define hookpost-up
# setloc_tmux
#end
#
#define hookpost-down
# setloc_tmux
#end
#
#define hookpost-continue
# setloc_tmux
#end