GP2X Using Gdb To Debug


gfoot

Member
Joined
Nov 15, 2005
Messages
218
I couldn't find any serious information on the Wiki about using gdb on the GP2X, though I know some people are. With the networking support in the latest firmware, this is an even better option than it was when I was last using the GP2X.

As such, I've tried a few things out and put some notes on the Wiki here: http://wiki.gp2x.org/wiki/Gdb

I'm also hosting some binaries on my website - one is the gdbserver that luteijn provided a few months ago (hope you don't mind) and the other is a GP2X-targetted gdb for Windows, which I built myself. http://www.glost.eclipse.co.uk/gfoot/gp2x/...gdb-package.zip

If anyone else has anything to add regarding debugging with gdb on the GP2X then please do - I haven't found much information on it from the community, which was a bit surprising.

My next plan is to get it all working in Eclipse.
 
gfoot posted on Aug 20 2006 at 03:19 AM said:
I couldn't find any serious information on the Wiki about using gdb on the GP2X, though I know some people are. With the networking support in the latest firmware, this is an even better option than it was when I was last using the GP2X.

As such, I've tried a few things out and put some notes on the Wiki here: http://wiki.gp2x.org/wiki/Gdb

I'm also hosting some binaries on my website - one is the gdbserver that luteijn provided a few months ago (hope you don't mind) and the other is a GP2X-targetted gdb for Windows, which I built myself. http://www.glost.eclipse.co.uk/gfoot/gp2x/...gdb-package.zip

If anyone else has anything to add regarding debugging with gdb on the GP2X then please do - I haven't found much information on it from the community, which was a bit surprising.

My next plan is to get it all working in Eclipse.

I'm amazed no one has replied to this... Its the best piece of news I've heard of in ages.
As you mention there is very little info on getting this up and running. I'll give your solution a bash this weekend.

Your wiki entry is concise and well written, I look forward to giving it a go, thank you!

What I really want to get going is full remote GDB through CodeBlocks (which this should make possible).
That would rock in ways I find hard to describe :)

-(e)
 
Last edited by a moderator:
I've been looking at Eclipse, as it's a supported platform for an embedded system we use at work. However, Eclipse's target management is currently not well integrated with the remote debugging plugin, and both are a bit immature it seems.

There is a well-reputed plugin for embedded system development, which handles target management and can even do kernel-level debugging via JTAG, but it's commercial. It looks like there is a free version for non-commercial use but I couldn't find it easily on their website.

Regardless of all that, it's probably quite easy to set up any gdb-based debugging shell to use gdb remote - certainly if you've got the source code. Eclipse is written in Java, though, which I don't speak.

It would be nice if gdbserver didn't need to actually load the program itself - if the remote gdb could upload the program to it. Then you could just set up gdbserver to run on startup, and launch everything through gdb scripts without even needing to use telnet.
 
gfoot posted on Aug 24 2006 at 05:52 PM said:
I've been looking at Eclipse, as it's a supported platform for an embedded system we use at work. However, Eclipse's target management is currently not well integrated with the remote debugging plugin, and both are a bit immature it seems.

There is a well-reputed plugin for embedded system development, which handles target management and can even do kernel-level debugging via JTAG, but it's commercial. It looks like there is a free version for non-commercial use but I couldn't find it easily on their website.

Regardless of all that, it's probably quite easy to set up any gdb-based debugging shell to use gdb remote - certainly if you've got the source code. Eclipse is written in Java, though, which I don't speak.

It would be nice if gdbserver didn't need to actually load the program itself - if the remote gdb could upload the program to it. Then you could just set up gdbserver to run on startup, and launch everything through gdb scripts without even needing to use telnet.

I've been going a lot of dev on the Gizmondo. There is a gcc build that targets arm-wince-pe (http://cegcc.berlios.de/).
With this you get a GDB stub that loads onto the target machine (via activesync) and that in turn loads the remote executable.

Is it not possible that something similar could be done for the gp2x?
This would make debugging truely a pleasure: Hit compile, then debug, the stub and program get uploaded, GDB starts, stub connects back to GDB and off you go.

-(e)
 
Last edited by a moderator:
Back
Top