GDB cheat sheet
Load symbols from file (mess):
> file mess
Reading symbols from mess...done.
> target exec mess
> b main
> r
Renesas simulator:
> file rx52n.elf
> target sim
> load
> b main
> r
Script from file:
gdb -x mess.gdb
Script from file (CLI):
> source mess_gdb.py
Python API for scripts (https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html#Python-API)
Pause running process:
> [CTRL+C]
TUI:
> [CTRL+x+a]
> layout asm
Print:
> p/x $x30 - hex
> p/t $x30 - binary
> p/d $x30 - decimal
> display/x $x30 - print after each gdb stop
> i r x30