Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#154509 - 09/04/2003 20:27 debugging on empeg: got gdbserver now what?
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
Ok, I've decided if I'm ever going to do any serious programming on the empeg I need a debugger. I guess this means I'm a wimpy programmer but that's besides the point.

Anyways I have managed to get gdbserver compiled and running on the empeg, I've attached the file- note you have to copy the libthread_db.so.1 file from the toolchain's lib directory to the /lib directory on the empeg for it to run. Problem is I can't get GDB to use it without crashing. Basically what I'm doing is this:
empeg: gdbserver localhost:2000 test
linux box: gdb test
(gdb) target remote empeg:2000
(gdb) breakpoint main
(gdb) continue
when I do the continue everything crashes. I imagine the problem is I have to re-compile gdb to support ARM binaries... but I have no idea how to do this.. any ideas GDB wizards?


Attachments
152464-gdbserver.zip (51 downloads)


Top
#154510 - 09/04/2003 20:41 Re: debugging on empeg: got gdbserver now what? [Re: siberia37]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Ok, I've decided if I'm ever going to do any serious programming on the empeg I need a debugger.
Bah! That's what printf() is for!

If you get this working, please share your success with the community. I'm sure the pace of my development would double if I could step through programs instead of having to depend on a bunch of debug statements.
_________________________
- Tony C
my empeg stuff

Top
#154511 - 09/04/2003 23:06 Re: debugging on empeg: got gdbserver now what? [Re: siberia37]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
I've decided if I'm ever going to do any serious programming on the empeg I need a debugger.


Does this help? I found it quite useful when writing Launcher. (See another of my posts on the subject of gdb.)

Top
#154512 - 10/04/2003 06:38 Re: debugging on empeg: got gdbserver now what? [Re: tonyc]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
I think my rate of development more than doubled when I stopped relying on debuggers..

Top
#154513 - 10/04/2003 07:34 Re: debugging on empeg: got gdbserver now what? [Re: mlord]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I think my rate of development more than doubled when I stopped relying on debuggers..
Was that before or after the robotic chip was implanted in your brain?

_________________________
- Tony C
my empeg stuff

Top
#154514 - 10/04/2003 08:11 Re: debugging on empeg: got gdbserver now what? [Re: tonyc]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
I've compiled gdb 5.3 for Linux x86 and gdbserver for ARM. It's on my webpage here

- Trevor

Top
#154515 - 10/04/2003 12:14 Re: debugging on empeg: got gdbserver now what? [Re: tman]
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
sweet, I'll give that a try and seem if it works for me.

Top
#154516 - 15/04/2003 08:09 Re: debugging on empeg: got gdbserver now what? [Re: tman]
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
Update: I did finally get this working although I couldn't use the gdb binary from your site, I think because I have a distrbution with libc and your binary is compiled with glibc or something. I just did a ./configure --target=arm-linux --host=i686-pc-linux-gnu on the GDB sources and it actually built and worked. Next step for me is get GNU Insight working so I can use a debugger I can actually deal with...

Top
#154517 - 16/04/2003 20:25 Re: debugging on empeg: got gdbserver now what? [Re: mlord]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
I think my rate of development more than doubled when I stopped relying on debuggers..


Yeah, same here. Of course, the frequency of application crashing also doubled, but I'm sure the users don't mind that.

Top
#154518 - 18/04/2003 02:45 Re: debugging on empeg: got gdbserver now what? [Re: siberia37]
eslange
journeyman

Registered: 16/11/2001
Posts: 74
Loc: Utrecht, Netherlands
Alternatively you can use the GNU Visual Debugger (GVD), but I prefer Insight (but I'ven't still made it running under Win32 using Cygwin). I'm using GVD for remote debugging a board with a MIPS-processor (via ABATRON-device).

Cheers,

Eize

Top