gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Your approaches to debugging ...

#124943 - SaruCoder - Tue Apr 10, 2007 6:42 am

Hey guys,

I was wondering what you guys use/do when debugging your homebrew?

And when I mean debugging, I mean if you want to verify that certain variables are getting correct values. Or testing your logic flow is going in the desired direction.

Because I'm developing a greater appreciation for debugging tools like gdb, ddd, and having the ability to trace through source code while your program is running. Because it sure beats print statements...

#124956 - simonjhall - Tue Apr 10, 2007 9:53 am

I wrote this ages ago:
http://forum.gbadev.org/viewtopic.php?t=10332
You can still find it if you look around on the Internet. It's a gdb stub which runs over the DS' wifi and allows you to run gdb (or something which talks to gdb, eg eclipse) on your PC and step through code, put breakpoints, inspect variables etc.

I remember masscat writing something similar too, so have a lookie.
_________________
Big thanks to everyone who donated for Quake2

#124959 - 0xtob - Tue Apr 10, 2007 11:03 am

If your app runs in DesMuMe, you can use these instructions to compile it with masscat's debug stub, which seems to work quite nicely and doesn't require additional code in the NDS file. If you leave out the OSX specific stuff, the instructions should work with Linux and Windows (Cygwin) as well.
_________________
http://blog.dev-scene.com/0xtob | http://nitrotracker.tobw.net | http://dsmi.tobw.net

#124966 - ikaris - Tue Apr 10, 2007 1:05 pm

I use DesMuMe with the GDB stub and Insight.

Works great for me.

Sure, you can't do EVERYTHING that a full-fledged debugger can, but it still works great.

Here's a quick tutorial I wrote:

http://www.vurtx.com/nds/insight_desmume.html

#125017 - masscat - Tue Apr 10, 2007 10:41 pm

You can find my GDB stub (runs on the NDS hardware) here. I have not worked on it for a while so still in a development state.

As for the the GDB in DesMuMe, the last work I did on it is the one used in the HOWTO that 0xtob linked to. You can get the source from here too. I believe that version may not work under Windows, in which case use the first version from these forums.

As there is interest in the desmume I will tidy it up and put it into the desmume cvs. May even use it to debug the on hardware GDB stub and get that into a better state :).

#125085 - SaruCoder - Wed Apr 11, 2007 5:53 am

Cool, thanks for your responses guys.

#125487 - Jevin - Fri Apr 13, 2007 9:58 pm

masscat wrote:
You can find my GDB stub (runs on the NDS hardware) here. I have not worked on it for a while so still in a development state.

As for the the GDB in DesMuMe, the last work I did on it is the one used in the HOWTO that 0xtob linked to. You can get the source from here too. I believe that version may not work under Windows, in which case use the first version from these forums.

As there is interest in the desmume I will tidy it up and put it into the desmume cvs. May even use it to debug the on hardware GDB stub and get that into a better state :).


There is great interest in desmume! How else are OS X/Linux people like me supposed to debug in an emulator? :(

#126502 - masscat - Mon Apr 23, 2007 10:16 pm

You can find an updated version of GDB stub in Desmume over on the Desmume forums. There are lots of nice new features in Desmume too.

Please test and discuss over on the Desmume forums.