-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gdbinit
64 lines (52 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
# .gdbinit
set print pretty
# disable clumsy paging (use terminal scrollback buffer instead)
set height 0
# for freertos POSIX simulation:
handle SIGUSR1 nostop noignore noprint
handle SIG34 nostop noignore noprint
set prompt [31m(gdb) [m
# log gdb output (defaults to gdb.txt in current directory)
#set logging on
set history save
set history filename ~/.gdb_history
set history size 10000
set history remove-duplicates 500
set confirm off
define bta
thread apply all backtrace
end
document bta
Alias for 'thread apply all backtrace'
end
define btaf
thread apply all backtrace full
end
document btaf
Alias for 'thread apply all backtrace full'
end
define lon
set scheduler-locking on
end
document lon
Alias for 'set scheduler-locking on'
end
define loff
set scheduler-locking off
end
document loff
Alias for 'set scheduler-locking off'
end
# Based on tip from http://elinux.org/Debugging_The_Linux_Kernel_Using_Gdb
define dmesg
set $x = log_start
echo "
while ($x < log_end)
set $c = (char)((__log_buf)[$x++])
printf "%c" , $c
end
echo "\n
end
document dmesg
Print the content of the kernel message buffer
end