debugging on empeg: got gdbserver now what?

Posted by: siberia37

debugging on empeg: got gdbserver now what? - 09/04/2003 20:27

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?
Posted by: tonyc

Re: debugging on empeg: got gdbserver now what? - 09/04/2003 20:41

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.
Posted by: canuckInOR

Re: debugging on empeg: got gdbserver now what? - 09/04/2003 23:06

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.)
Posted by: mlord

Re: debugging on empeg: got gdbserver now what? - 10/04/2003 06:38

I think my rate of development more than doubled when I stopped relying on debuggers..
Posted by: tonyc

Re: debugging on empeg: got gdbserver now what? - 10/04/2003 07:34

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?

Posted by: tman

Re: debugging on empeg: got gdbserver now what? - 10/04/2003 08:11

I've compiled gdb 5.3 for Linux x86 and gdbserver for ARM. It's on my webpage here

- Trevor
Posted by: siberia37

Re: debugging on empeg: got gdbserver now what? - 10/04/2003 12:14

sweet, I'll give that a try and seem if it works for me.
Posted by: siberia37

Re: debugging on empeg: got gdbserver now what? - 15/04/2003 08:09

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...
Posted by: canuckInOR

Re: debugging on empeg: got gdbserver now what? - 16/04/2003 20:25

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.
Posted by: eslange

Re: debugging on empeg: got gdbserver now what? - 18/04/2003 02:45

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