Debug: how to use GDB

Debug an app thanks to GDB:

./speculos.py -d apps/boil.elf &
./tools/debug.sh apps/boil.elf

(Replace apps/boil.elf with your own app.)

Some useful tricks:

  • Use the -t (--trace) argument to trace every syscalls.

  • Semihosting features can be used as an additional debug mechanism.