[ELDK] GDB hangs on PPC405

Wolfgang Denk wd at denx.de
Tue Apr 13 20:22:49 CEST 2010


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?

> # 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?

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




Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The price one pays for pursuing any profession,  or  calling,  is  an
intimate knowledge of its ugly side.                  - James Baldwin


More information about the eldk mailing list