# gdb * `finish` print return value of current function * `step` next source line * `stepi` one machine instruction * `next` same as `step` but skip function * `nexti` same as `stepi` but skip function `info registers` ## attach to running process `echo 0 > /proc/sys/kernel/yama/ptrace_scope` `thread apply all bt` ## remote debugging * on remote site: ``` gdbserver --attach :10000 ``` * on local site: ``` arm-linux-gnueabihf-gdb -x sysroot-file.gdbinit -ex 'target extended-remote :10000' -ex 'set remote exec-file ' --args ```