Line 1:
Line 1:
==Remote Debugging with GDB==
==Remote Debugging with GDB==
−
[[DevkitPro]] comes with gdb, the gnu debugger, which has been configured to allow remote debugging over the [[USBGecko|USB Gecko]]. You compile a stub of code into your wii program and run the debugger on your pc. Firstly include the code which establishes the connection:
+
[[devkitPro]] provides gdb, the gnu debugger, which has been configured to allow remote debugging over the [[USBGecko|USB Gecko]]. You compile a stub of code into your wii program and run the debugger on your pc. Firstly include the code which establishes the connection:
#include <debug.h>
#include <debug.h>
Line 12:
Line 12:
Your wii code must be compiled with the option -g linked with the option -ldb, included before other libraries such as -logc.
Your wii code must be compiled with the option -g linked with the option -ldb, included before other libraries such as -logc.
−
Start your wii code using normal means such as the homebrew channel. There are three debugging commands available with devkitPro are:
+
Start your wii code using normal means such as the homebrew channel. There are three debugging tools available from devkitPro which are:
* powerpc-gekko-gdb: the basic text version of gdb driven from the command line
* powerpc-gekko-gdb: the basic text version of gdb driven from the command line
* powerpc-gekko-gdbtui: a version of gdb which includes a text window showing the source code of your application
* powerpc-gekko-gdbtui: a version of gdb which includes a text window showing the source code of your application
−
* powerpc-gekko-insight: a custom version of [http://sourceware.org/insight Insight], a full GUI built on top of gdb, available as a separate package within devkitPro
+
* powerpc-gekko-insight: a custom version of [http://sourceware.org/insight Insight], a full GUI built on top of gdb, available as a separate package from devkitPro
Assuming that you have started the text based gdb, at the command prompt type:
Assuming that you have started the text based gdb, at the command prompt type:
target remote /dev/ttyUSB0
target remote /dev/ttyUSB0
+
+
On windows you need to install the Virtual COM Port driver for USBGecko, this will provide an additional COM port.
+
+
target remote COM5
+
+
replace COM5 with the port installed by the USBGecko VCP driver.
Tell gdb where to find symbol information by typing
Tell gdb where to find symbol information by typing