[ELDK] gdbserver issues on xilinx PPC440 Virtex5FX with ELDK4.2

Curran, Tom Tom.Curran at Avnet.com
Fri Feb 20 02:50:32 CET 2009

I have duplicated this problem on the Avnet V5FX30T board with the ELDK
4.2 toolchain and 2.6.27rc4, 2.6.27rc9 and 2.6.28 kernels.

I have also duplicated this problem on the Xilinx ML507 board with the
ELDK 4.2 toolchain and 2.6.27rc9 kernel.

Telling gdb to "continue"  hangs the debug session and, of course, the
breakpoint is never hit.

I configure the kernel to mount the ELDK root file system over NFS.  The
kernel boots and runs 
with no issues.

Here are the rest of my steps:
Compile my application and copy the exe to the NFS share:
$ ppc_4xx-gcc -Wall -ggdb -o hello_world hello_world.c
$ cp hello_world ~/ELDK/ppc_4xx/bin/.

Start gdbserver on the target:
-bash-3.2# gdbserver /bin/hello_world
(I see the expected "process created" and "Listening on port 1234"
messages in the console)

Start gdb on the host:
ppc_4xx-gdb hello_world
(I see the typical and expected startup messages.  One interesting thing
here - gdb says the target architecture is set automatically to
powerpc:403.  Attempts to set the target arch with "set processor
powerpc:440" fail with an "Undefined item: "powerpc:440"" message.)

Set breakpoint, connect to target, and attempt to hit the breakpoint:
(gdb) break 5 (the printf statement is on line 5)
(gdb) target remote
(gdb) continue

At this point the debug session hangs and the board goes out to lunch.
I can halt the debug session and get gdb back with a <ctrl-c> <ctrl-c>,
but the board does not recover.  I have to re-download the kernel elf to
essentially reset the board.

Most interesting of all is that I know - and have documented - this
exact process for debugging applications in this same environment.
Something obviously has gone very wrong.  Anyone have any ideas?
Suggestions?  Thanks in advance.


-----Original Message-----
From: eldk-bounces at lists.denx.de [mailto:eldk-bounces at lists.denx.de] On
Behalf Of Frederic LEGER
Sent: Wednesday, February 18, 2009 9:51 AM
To: eldk at lists.denx.de
Subject: Re: [ELDK] gdbserver issues on xilinx PPC440 Virtex5FX with

Since my last message I tried several things, without real success...

Just for information, I am developping on a  Linux Ubuntu Ibex 32bit

Hello.c is

#include <stdio.h>
int main(int argc, char **argv)
	printf("Hello World !\n");
	printf("Hello World Again !\n");
	printf("Still Hello World!\n");
	return 0;

I cross-compile my executable for a generic powerpc target:

${CROSS_COMPILE}gcc hello.c -o helloppcstatic -g -static  (produced
executable is 700kB) I put in the SELF filesystem(1.8MB) gdbserver
libc.so.6 and
libthread_db.so.1 (use of ${CROSS_COMPILE}ldd).
Filesystem is 5.4MB => I reserved 8MB for the ramdisk in Linux bootargs
(which was default also). 

Host and target are connected using a crossover cable.
I verified the TCP Link between host and target using a ping, we used
also netperf days ago.

On target:
Gdbserver helloppcstatic On host:

If I use GDB-insight 6.5.0 included in Xilinx EDK10.1i
cpu settings : PPC440  (set processor powerpc:440  => this option
doesn't exist in ELDK's GDB)

without setting any breakpoints => just a full run is OK many times on
the target

Hello World !
Hello World Again !
Still Hello World !
Child exited with retcode=14
Child exited with status 20
GDBserver exiting

With setting a break point at exit
I can see just 

Hello World !  On target


Program stopped 0x10000140 on host
Every is frozen.

If I use ELDK4.2 ${CROSS_COMPILE}gdb

GDB version is 6.7-1rh

Cpu setting is common => powerpc 403
(using shared libraries , I understand I have to set
/home/xilinx/V5FX/eldk/ppc_4xx   )

${CROSS_COMPILE}gdb --tui helloppcstatic Then under gdb: target remote 

Now, after connecting to target I got:
Remote debugging using
0x10000140 in _start()

Then if I use 'c' => program ends up correctly on the target.
Hello World !
Hello World Again !
Still Hello World !
GDBserver exiting

If I use step => first step to 0x10000630 in __libc_start_main() =>
crash on the second time within function __libc_start_main.

If I add one or more breakpoints (ie: break *main , break 5) and then
'c' => crash 

If I add a breakpoint (ie: break *main) and then 'continue' => crash
(gdb)Break main Breakpoint 1 at 0x100002b8: file hello.c, line 5.
=> output nothing more, target crashed.

I can't add any breakpoints, and 'continue' isn't working ...

Do you have any idea on what wrong I could have done ? Missed ?

Best regards,


eldk mailing list
eldk at lists.denx.de

More information about the eldk mailing list