-
Notifications
You must be signed in to change notification settings - Fork 3
/
gdb.txt
40 lines (28 loc) · 784 Bytes
/
gdb.txt
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
Allow Ctrl-C passthrough to the process being debugged:
handle SIGINT pass
Ignore SIG35
handle SIG35 noprint nostop
Show all handles
info handle
Print IPv4 value:
p (char*)inet_ntoa(&my_ip4_addr)
Print IPv6 value:
p (void*)malloc(64)
p (char*)inet_ntop(10,&my_ip6_addr,$1,64)
Force printing in hexadecimal (some other printf() formatters can be used as
well):
p/x
Continue till the end of function:
finish
Print type of variable or struct:
ptype struct sockaddr_in
See backtrace of all threads:
thread apply all bt
Switch frame in a backtrace (especially useful for examining core files)
frame <frame #>
Switch to n frames above and below respectively
up <n>
down <n>
List local variables
info locals
''See also:'' [http://beej.us/guide/bggdb/](Beej's Quick Guide to GDB)