2018-11-12

Debugging With mGBA

I finally figured out how to get the mGBA debug server working:

  • Build your GBA ROM.
  • Open the ROM with mGBA.
  • Open the mGBA debug server UI (in macOS, open Tools -> Start GDB server…).
  • Using the default options (port 2345 and address 0.0.0.0), hit “Start”.
  • Open up a terminal and run /opt/devkitpro/devkitARM/bin/arm-none-eabi-gdb to start GDB.
  • In GDB, enter target remote localhost:2345 to connect to mGBA.
  • Enter file <path_to_elf>, replacing <path_to_elf> with the full path to the .elf file that should have been created alongside your ROM.
  • When asked if you want to change the file, enter y and hit Return.

Now you should be connected to mGBA, with symbols loaded, ready to start debugging.

Comments

PypeBros on 2018-11-24 at 14:11 said:

[morpheus] Welcome to the real world [/morpheus]