[ELDK] gdb does not connect to BDI2000

Detlev Zundel dzu at denx.de
Tue Feb 3 16:42:24 CET 2009

Hi Dirk,

>> The current gdb has the nasty habit of not taking its command 

["current gdb" = version of gdb in eldk 4.2]

>> name seriously, i.e. the name you call the debugger is *not* 
>> the ultimate configuration choice.  Rather "CROSS_COMPILE" 
>> overrides this.  Please be sure that CROSS_COMPILE=ppc_4xxFP- 
>> and check again.
> de at bob2:~/src/u-boot/u-boot-git$ export CROSS_COMPILE=ppc_4xxFP-
> de at bob2:~/src/u-boot/u-boot-git$ ppc_4xxFP-gdb u-boot
> 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 "--host=i686-pc-linux-gnu
> --target=ppc-linux".
> The target architecture is set automatically (currently powerpc:403)
> ..
>> It is also helpful to check what architecture gdb thinks it 
>> debugs, so check 
>> (gdb) show architecture
>> The target architecture is set automatically (currently powerpc:403)
> (gdb) show architecture
> The target architecture is set automatically (currently powerpc:e500) 
> Hmmm, not what I hoped to see...

Argh.  This indeed looks bad.  We just diagnosed that this gets set on
reading the ELF binary.  Unfortunately, we currently do not know where
this information in the ELF file is and how we can influence it.
Moreover, we know that gdb in eldk 4.2 not only has this above mentioned
problem, but it also refuses a manual "set architecture" command to set
things straight.

I can offer you a workaround for the time being however - use
ppc_4xxFP-gdb from eldk 4.1 and force a "set architecture powerpc:403"
after loading the elf file.


The GNU GPL makes sense in terms of its purpose: freedom and social
solidarity.  Trying to understand it in terms of the goals and values of
open source is like trying understand a CD drive's retractable drawer as
a cupholder.  You can use it for that, but that is not what it was
designed for.                      -- Richard Stallman
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

More information about the eldk mailing list