[uClibc]Gdb with uClibc

Paul Rimmer paul-rimmer at ronin-tech.com
Wed Feb 5 19:10:43 UTC 2003


I don't believe you want to be using "run" for embedded apps.  Use "cont"
instead.  Check this link out:

http://www.ucdot.org/article.pl?sid=03/01/30/0548223&mode=thread

It's written based on the coldfire but many of the gdb concepts apply.

Cheers,

Paul
Calgary, ALberta, Calgary
>
> Hi
>
> I'm trying to get gdb to work with uClibc as a remote cross debugger.
> I've never done this before so I'm not quite sure what I'm doing wrong.
>
> I compiled gdbserver against uClibc for arm-linux, and I run it on my
> arm board.  I then compiled gdb with the options --host=i386-linux
> --target=arm-linux.  I made a simple HelloWorld program with debugging
> symbols, and I compiled uClibc with debugging information.
>
> On the arm board I run "gdbserver (my ip):(random port #) HelloWorld",
> and on the PC I run "arm-linux-gdb HelloWorld".  I then run in the gdb
> program "target remote (arm board ip):(same random port #)", and the 2
> connect.
>
> Now as far as I can tell this is all I need to make them work like
> normal gdb, but I can't get anything to work at this point.  Below is
> output from GDB
>
>
> ~/tmp$ arm-linux-gdb HelloWorld
> GNU gdb 5.3
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "--host=i386-linux --target=arm-linux"...
> (gdb) target remote 192.168.0.109:1500
> Remote debugging using 192.168.0.109:1500
> 0x00008084 in _start ()
> (gdb) list
> 1	#include <stdio.h>
> 2
> 3	int main() {
> 4		printf("Hello World\n");
> 5		return 0;
> 6	}
> (gdb) run
> The program being debugged has been started already.
> Start it from the beginning? (y or n) y
> Starting program: /home/david/tmp/HelloWorld
> Don't know how to run.  Try "help target".
> (gdb)
>
> and at this point the arm board process quits with the message "Killing
> inferior"
>
>
> If anybody has used this successfully, I'd appreciate to hear how.
>
>
> Thanks
> David
>
> P.S.  GNU GDB is version 5.3, uClibc is version 0.9.16, GCC is version
> 3.2.1






More information about the uClibc mailing list