This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDBServer debugging (EMAC Board & coldfire M5282)
- From: teawater <teawater at gmail dot com>
- To: "prof81 at inwind dot it" <prof81 at inwind dot it>
- Cc: gdb <gdb at sourceware dot org>, uClinux development list uClinux development list <uclinux-dev at uclinux dot org>
- Date: Wed, 21 Jan 2009 13:27:56 +0800
- Subject: Re: GDBServer debugging (EMAC Board & coldfire M5282)
- References: <KDRSSX$75FF908D10D804792E69D1FF163AF942@libero.it>
Maybe you can try command "set sysroot dirname" or "solib-search-path"
to make gdb find the right lib in your host.
On Tue, Jan 20, 2009 at 20:46, prof81@inwind.it <prof81@inwind.it> wrote:
> Hallo Everyone,
> I'm tring to use gdb/gdbserver to debug my embedded system, but i got some problem.
> First of all I give you details of my develeping system:
> HARDWARE:
> EMAC SoM100ES Carrier-Board +
> EMAC SoM-5282M Module Board Based on FreeScale Coldfire MCF5282
> SOFTWARE:
> uClinux 2.6.17-uc1
> with "gdbserver(old)" enabled
> uClinux ToolChain 4.1.1
> GDB 6.8
> downloaded form http://sourceware.org/gdb/
> copiled and istalled with "m68k-elf" options
> Latest installable Codesourcery ToolChain
> To have an alternative version of GDB and GDBServer
> (coz lot of people advice to use it, so i tried it)
> --> My program is embedded into uClinux package, so when uClinux is compiled my program is compiled too (with same configuration of other application)
>
>
> About my problem...
> Using: gdbserver of uClinux and original GDB 6.8
> I start GDB on my host:
> $ m68k-elf-gdb myfile.gdb
> (gdb)
>
> Then, on target, I start GDBSERVER
> # gdbserver 192.168.0.5:2345 myfile
> process myfile created; pid=55
> code at 0xa00040 - 0xa5d60, data at 0xa0c004
> Back on Host:
> (gdb) target remote 192.168.0.178:2345
> Remote debugging using 192.168.0.178:2345
> Warning: Target reported unsupported offsets: Text=a00040; Data=a062e4; Bss=a062e4;
> 0x00d93f30 in ?? ()
> (gdb)
> 1) First (partialy solved) problem is about the "warning on offset" previously reported; I didn't find a satisfy solution, I have just got around:
> I start gdb without any file and then I use "add-symbol-file" command with address shown by gdbserver (in this case 0xa00040)
>
> 2) Second one is about MANUAL HARD BREAK (aka CTRL-C): after using "continue" command the program starts execution, but i can't stop it with CTRL-C;
> It doesn't care my first key-press, and if i press it again GDB replies with "Interrupt while waiting for the program give up? (y or n)"
> Why does it reply me in this way?
>
> 3) Third problem is about breakpoint: I can easily set breakpoint of my program, but it doesn't work correctly at all
> After getting connection by "gdbserver&target remote" i set a breakpoint on subroutine "wait" and I send "continue" command
> (gdb) b wait
> breakpoint 1 at 0xa00086: file alberto.c, line 11
> (gdb) c
> Continuing
> The execution starts and when it reaches the breakpoint it replies in this way:
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x00a00088 in wait () at alberto.c:11
> 11 printf("aspetto\n");
> (gdb)
> Watching this reply i can undesrtand there is something wrong, it seems a MANUAL BREAK instead of a brekpoint stop; in fact if i send continue it says:
> Program received signal SIGILL, Illegal instruction.
> 0x00a00088 in wait () at alberto.c:11
> 11 printf("aspetto\n");
> If i try to continue again it replies the same adding also "The program no longer exists"
> On the target i can see:
> Child terminated with signal = 4
>
> Child terminated with signal = 0x4
> GDBserver exiting
> This happend for every funtion of my program
>
> 4) Backtrace
> If i use "where" command it always replies with "Backtrace stopped: frame did not save the PC"
>
> 5) CodeSourcery version
> As lot of people adviced, I tried CodeSourcery version but it works even worse.
> I copied gdbserver of CodeSourcery into target by tftp and execute...
> NB: First problem, previously reported, happend also in CodeSourcery Version (CodeSourcery "gdbserver" doesn't show the adress but i can find it on /proc/maps)
> If i try to execute continue host replies with "remote connection closed" and target replies with "Connection closed by foreign host".
> I don't understand why it does it in this way!!
>
> Any help would be appreciated, thank you!
>
> Alberto
>
>
>