info sources # Print list of source with debug information info functions # Print list of functions info variables

info address info symbol <ADDRESS>

file EXECUTABLE symbol-file add-symbol-file

set substitute-path directory

whatis ptype

x/FMT ADDRESS # fmt = count-format-size. # x=hex, c=chars, d=signed integers, i=instructions, s=C-strings p *[email protected] p/x (short[2])0x12345678

set write on # Enable patching return # Return early from function jump FUNCTION # Jump to location

Watching memory or variables. -l (for location) means that the address of expr is watched The hardware uses special comparator registers. Cortex-M0 4 breakpoints, 2 watch points Cortex-M3/M4 6 breakpoints, 4 watch points When singlestepping 1 hw bkpt register is temporarily used.

There are many gdb frontends that supports setting watchpoints on memory and variables watch EXPR # Stop wath written to expr awatch EXPR # Stop when read/written to expr rwatch EXPR # Stop read to expr You need to dereference a numerically entered address (gdb) watch 0x600850 Cannot watch constant value 0x600850. (gdb) watch *(int *) 0x600850 Watchpoint 1: *(int *) 6293584