[U-Boot-Users] Using the abatron to debug an image in flash

Mark Doherty mdoherty at arca-technologies.com
Thu Aug 7 17:41:59 CEST 2003

Dear Wolfgang, 

> Accessing normal static variables should be  no  problem.  It's  just
> initialized  data  pointers  which  need  manual relocation. I try to
> avoid this data type whenever possible, or we need to relocate it. If
> you find unrelocated initialized pointers please let me know.
> But accessing the variables itself should work just fine  -  if  they
> are pointers, they will just contain unrelocated addresses.

I have loaded the symbol file as mentioned previously, however to my 
unexperienced eye it appears that some of the symbols for the static 
variables have not been loaded where I would have expected ...

$ ppc-linux-gdb
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i386-redhat-linux --target=ppc-linux".
(gdb) bdi
0xff000100 in ?? ()
(gdb) ram
add symbol table from file "u-boot" at
        .text_addr = 0x7fc0000
(gdb) info address rtx
Symbol "rtx" is static storage at address 0xff0312d8.

In the unlikely case you are not aware rtx is defined in 
cpu/mpc8260/ether_fcc.c as ...

 * FCC Ethernet Tx and Rx buffer descriptors.
 * Provide for Double Buffering
 * Note: PKTBUFSRX is defined in net.h

typedef volatile struct rtxbd {
    cbd_t rxbd[PKTBUFSRX];
    cbd_t txbd[TX_BUF_CNT];

/*  Good news: the FCC supports external BDs! */
#ifdef __GNUC__
static RTXBD rtx __attribute__ ((aligned(8)));
#error "rtx must be 64-bit aligned"

Is this what you would normally expect? When I scan the assembler the code 
uses the correct address, it appears that the gdb however is a bit lost.

Best wishes,


More information about the U-Boot mailing list