Jump to navigation Jump to search
729 bytes added ,  12:43, 28 June 2008
no edit summary
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. Start the more user friendly versino of gdb by typing:
At the gdb command prompt, type:
You can then insert other break points manually by typing for example (assuming you are in the same directory as the source file):
break sourcefile.c:linenum
If sources are in another directory, you can tell gdb where with the command:
directory name/of/source/directory
You can then continue running the program by typing:
Particularly if you have hardcoded a breakpoint with the _break() function, it is useful to be able to run until the current function exits with the command:
Examine the value of variables by typing
print variablename
The above examples are confirmed to work under linux but may require some modification to work under windows/msys (particularly /dev/ttyUSB0).
==Diagnosing crashes==
The 800084ac is the memory address in hex of where the crash occurred. 809F0020 is the machine code for the offending instruction.
===With GDB===
Using gdb, you can find out where the relevant code is with the command:
gdb info line *0x800084ac
This should work even if you don't have a USB gecko, as it is only using the symbol information stored in the .elf file.
===Alternative Method===
*Step 1:


Navigation menu