From WiiBrew
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Remote Debugging with GDB

devkitPro comes with gdb, the gnu debugger, which has been configured to allow remote debugging over the USB Gecko. You compile a stub of code into your wii program and run the debugger on your pc. Firstly initialise the link with:

  1. include <debug.h>


You can then manually insert breakpoint into your code with the line:


Your wii code must be linked with the option -ldb, included before other libraries such as -logc.

Start your wii code using normal means such as the homebrew channel. Start gdb by typing:


At the gdb command prompt, type:

target remote /dev/ttyUSB0

You can then continue running the program by typing "cont"