GDB

gdb

  • python and guile interpreters
  • tui mode with C-x 2 (emacs like bindings)
  • backtrace with bt
  • examine current with pc then x $1
  • step back one instruction reverse-step
  • loop program using breakpoints on main and exit with commands
break main
break _exit
command 1
record
continue
end
command 2
run
end

debug win32 app

  • wine /usr/i686-w64-mingw32/bin/gdbserver.exe localhost:10000 ./some-win32.exe for tcp server
    • test connection with i686-w64-mingw32-gdb and target extended-remote 10000 / file ./some-win32.exe
    • when using ghidra use GADP for the connection or local gdb