Debugger help


gdbserver commands from r2 shell

Directly using gdbserver steps

  • Set up and attach gdbserver to a process/binary. Example: gdbserver localhost:8000 /bin/ls
  • ๐Ÿš€ Connect to gdbserver using r2. radare2 -d gdb://localhost:8000 asciinema
  • Use radare2 commands normally
    • Note that gdbserver implemented this way will die once the r2 session exits

gdbserver subhelp

Usage: =!cmd args
 =!pid             - show targeted pid
 =!pkt s           - send packet 's'
 =!monitor cmd     - hex-encode monitor command and pass to target interpreter
 =!detach [pid]    - detach from remote/detach specific pid
 =!inv.reg         - invalidate reg cache
 =!pktsz           - get max packet size used
 =!pktsz bytes     - set max. packet size as 'bytes' bytes
 =!exec_file [pid] - get file which was executed for current/specified pid

gdbserver monitor commands =!monitor help


Remote WinDbg ยท Radare2 Book windbg usage example