I ported SDL Paradroid over the Wii hombrew and while I thought I had found all of the freeze-up issues (without using a debugger), apparently I have not. The frequency of the freeze up is somewhat rare, but in the course of testing the game from start to finish in 'god mode' I froze up twice...which is disappointing to say the least.
The freezes don't give me a register dump or stack trace, and I don't own a USB Gecko at this point. Since they occur in no set pattern that I can recreate, I can't add file logging to narrow the location. During the freeze up the screen goes black and and the sound lets out an interesting series of noises...
So a couple questions-
1. Would a USB Gecko catch such a freeze condition and let me debug it?
2. Are there byte/word alignment issues that I need to be aware of and explicitly code for, or are those taken care of by the compiler? It seems like my last build prior to the addition of the god mode for testing was not freezing up- but the game isn't easy and I had only played about 2/3 through. The only difference is that some very minor damage code was commented out with #idef's. So I have to wonder if I'm incidentally running into some kind of alignment issue by moving things around.
That said, I'm hoping to find and fix this issue and move onto something new, and I have a few more questions:
1. Does the devkitPPC tools have support for any kind of dynamic loader? Can you use shared objects and something like dlopen()?
2. What about file memory mapping from files on the SD-CARD?
3. Has anyone ported a tool like electric fence to the Wii to catch buffer over/underruns or uninitialized variables?
4. Is there any way to install a debug stub around your binary and attach to the debugger over TCP/IP?
5. Has anyone written a simple library for TCP IP based logging?
If anyone with a USB Gecko wants to run the God Mode binary through the game and try to catch the crash and send me a stack trace or core dump I'd also be very obliged.