my gdb - stanislawbartkowski/wikis GitHub Wiki
Command | Description | Example |
---|---|---|
gdb - pid | Attach to running exec | gdb - 28456 |
dir <directory> | Add directory to source path | dir /usr/src/proc |
show directories | List current source directories | |
bt | Show current running stack | |
b | Set breakpoint at current location | |
b <source>:<line number> | Set breakpoint at current position in the source file | b load.cpp:28 |
s | Step into | |
n | Next instruction without stepping into | |
finish | Return from current function | |
list | Current source file | |
p <variable> | Print the content of the variable | print I |
f | Current position in the code | |
finish | Execute until current function completed | |
info b | List breakpoints |
echo 0 >/proc/sys/kernel/yama/ptrace_scope