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-gdbto start GDB.
- In GDB, enter
target remote localhost:2345to connect to mGBA.
file <path_to_elf>, replacing
<path_to_elf>with the full path to the
.elffile that should have been created alongside your ROM.
- When asked if you want to change the file, enter
yand hit Return.
Now you should be connected to mGBA, with symbols loaded, ready to start debugging.