[ELDK] GDB hangs on PPC405

hamelin.philippe at ireq.ca hamelin.philippe at ireq.ca
Tue Apr 13 20:31:30 CEST 2010


> -----Message d'origine-----
> De : Wolfgang Denk [mailto:wd at denx.de] 
> Envoyé : 13 avril 2010 14:23
> À : Hamelin, Philippe
> Cc : eldk at lists.denx.de
> Objet : Re: [ELDK] GDB hangs on PPC405
> 
> Dear Philippe,
> 
> In message 
> <76AAA44CB343D848919D13DE5B684A880144C981 at BORDEAUX.ireq.ca> you wrote:
> > 
> > i'm using Xilinx Kernel (2.6.33) on a PPC405 (ML403) and I'm having
> > problem using gdb. I created a hello world application and 
> it runs fine.
> > However, i'm not able to debug any application. I'm using 
> gdb from ELDK
> > 4.2. Here is what I get while running gdb from the target:
> 
> Are you also using the root file system and libraries form ELDK?

Yes, I'm using RFSB to build my file system. 

> 
> > # gdb hello
> > GNU gdb Red Hat Linux (6.7-1rh)
> > Copyright (C) 2007 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later
> > <http://gnu.org/licenses/gpl.html> 
> <http://gnu.org/licenses/gpl.html%3E>
> > 
> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.  Type "show
> > copying"
> > and "show warranty" for details.
> > This GDB was configured as "ppc-linux"...
> > Using host libthread_db library "/lib/libthread_db.so.1".
> > (gdb) set arch auto
> > The target architecture is set automatically (currently 
> powerpc:common)
> > (gdb) run
> > Starting program: /apps/hello
> > 
> > Then, gdb (and the processor) hangs. The same behaviour arises when
> > using gdbserver on the target with gdb on the host. Any help is very
> > welcome!
> 
> What makes you think the processor hangs? Did you try to check it's
> state using a JTAG debugger or such?
> 

I said that because the console is dead but I didn't check with the debugger the CPU state. 

> For me there are no such problems:
> 
> -bash-3.2# cat >hello.c
> #include <stdio.h>
> 
> int main (void)
> {
>         printf ("Hello world\n");
> 
>         return 0;
> }
> -bash-3.2# gcc -o hello hello.c
> -bash-3.2# gcc -g -o hello hello.c
> -bash-3.2# gdb hello
> GNU gdb Red Hat Linux (6.7-1rh)
> Copyright (C) 2007 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later 
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type 
> "show copying"
> and "show warranty" for details.
> This GDB was configured as "ppc-linux"...
> Using host libthread_db library "/lib/libthread_db.so.1".
> (gdb) list
> 1       #include <stdio.h>
> 2
> 3       int main (void)
> 4       {
> 5               printf ("Hello world\n");
> 6
> 7               return 0;
> 8       }
> (gdb) break 5
> Breakpoint 1 at 0x100003fc: file hello.c, line 5.
> (gdb) run
> Starting program: /tmp/hello 
> 
> Breakpoint 1, main () at hello.c:5
> 5               printf ("Hello world\n");
> (gdb) c
> Continuing.
> Hello world
> 
> Program exited normally.
> (gdb) q
> -bash-3.2# # cat /proc/cpuinfo 
> processor       : 0
> cpu             : 405EX
> clock           : 600.000000MHz
> revision        : 20.127 (pvr 1291 147f)
> bogomips        : 1196.03
> timebase        : 600000000
> platform        : Kilauea
> model           : amcc,kilauea
> Memory          : 256 MB
> 
> 
> 

This is strange that it works on your side. We don't have exactly the same architecture (405 vs 405EX), but I think it shouldn't matter. I will re-try with a clean install of ELDK and I will nfs mount the provided file system instead of building mine with RFSB. 

Thank you,

Philippe


More information about the eldk mailing list