-
Notifications
You must be signed in to change notification settings - Fork 5
/
gdbinit
42 lines (35 loc) · 926 Bytes
/
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
#
# SPDX-FileCopyrightText: (C) 2017-2024 Red Hat, Inc.
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
set debuginfod enabled on
#et prompt \033[91m(gdb) \033[0m
set args -f -vv
set non-stop on
set detach-on-fork off
set follow-fork-mode child
set print frame-arguments all
set print type nested-type-limit unlimited
define str_vector_dump
set $i = $arg1
while $i < $arg2
print (const char *) ((struct iovec *) $arg0)[$i].iov_base
set $i = $i + 1
end
end
document str_vector_dump
Print the string elements of struct iovec.
Usage: str_vector_dump <vector> <start_index> <end_index>
end
define print_gdb_env
show args
show follow-fork-mode
show detach-on-fork
end
alias -a btf = backtrace -full -frame-arguments all
alias -a ffmc = set follow-fork-mode child
alias -a ffmp = set follow-fork-mode parent
alias -a dof0 = set detach-on-fork off
alias -a dof1 = set detach-on-fork on
alias -a pge = print_gdb_env