Useful gdb commands
From wiki.network-crawler.de
Contents |
[edit]
Conditional breakpoints for strings
(gdb) b main.c:123 (gdb) set $str = "hello" (gdb) cond 1 strcmp (s.whatever, $str) == 0
[edit]
Watchpoints to memory
watch *((int*)0x84c52d0)
[edit]
Info about threads
(gdb) info threads
[edit]
Executing gdb
gdb -ex run <program name> gdb -ex run --args <program name> arg1 arg2 ...
