Re: [uCsimm] success story: GDB on uClinux

From: David Smead (smead@amplepower.com)
Date: Fri Jan 14 2000 - 00:27:36 EST


Congratulations!

Yes, we do want to know how you did it!

Sincerely,

David Smead
http://www.amplepower.com.
http://www.ampletech.com.

On Fri, 14 Jan 2000, 권석근 wrote:

> hi, all
> I finally finish the job - remote debugging user application with GDB on
> uClinux.
> I've waited success story about debug from this mailing list but
> could'nt see it. So i tried myself and finally got working gdb.
> well, we also have graphical debugger if we could debug with gdb (my guess)
>
> there could be three paths for getting gdb works on uClinux
> 1) make native gdb on uClinux (local debug)
> 2) make gdb-stub for uClinux (remote debug)
> 3) make gdbserver for uClinux (remote debug)
>
> 1) is almost impossible, 2) is tedious (it's best for controller without OS
> or kernel debug, if
> you try this for user app. on uClinux, you will be messed up with os stuff,
> it uses too many
> assembly which could disturb working kernel)
> 3) it was my choice.
>
> one good point of using gdbserver is i could debug program that do
> printf on serial line. because gdbserver make connection through TCP/IP
>
> Problems i met were,
> 1) kernel has ptrace support, linker says that i don't have ptrace function.
> 2) how to support "TRAP #1", uClinux kernel transform this instruction to
> illeagal inst.
> and generate SIGILL rather than SIGTRAP. GDB use trap1 as a breakpoint
> instruction.
> 3) No mm problem of course. GDB get symbol info from .coff but it's
> addresses are
> different from actual program address.
>
> All problems are solved and now i could debug my program using GDB (source
> level
> debugging of course).
> I'm preparing docu about exactly what steps did i do.
> Not many changes, please give me some time. i'll show you all.
>
> usage:
> target side:
> #/mnt/gdbserver :3000 /mnt/test
> host side:
> >gdb-m68k test.coff
> ...
> gdb) targe remote 192.168.1.200:3000
> gdb) everything you want
>
> BTW, if somebody have done this, please give me a note.
> Thanks.
> kwonsk
>
>
> This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/
>

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:33 EST