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

Frederic LEGER frederic.leger at esisar.grenoble-inp.fr
Wed Feb 18 15:50:39 CET 2009


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

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




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 172.20.20.4:5678 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

And 

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 solib-absolute-prefix
/home/xilinx/V5FX/eldk/ppc_4xx   )


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

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

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.
(gdb)continue
=> 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,

Frederic




More information about the eldk mailing list