[U-Boot-Users] debugging U-boot with GDB on a Au1550

Cliff Brake cliff.brake at gmail.com
Mon Jul 18 15:38:54 CEST 2005

On 7/16/05, Wolfgang Denk <wd at denx.de> wrote:
> In message <f96d234e05071614186ad9526a at mail.gmail.com> you wrote:
> >
> > most ARM platforms are linked to the RAM location.  After U-boot is
> > relocated to RAM, how do I tell GDB what the new link address is
> > (0x80fdc000 in this case)?
> May I suggest that you start reading the manual? Especially section
> http://www.denx.de/twiki/bin/view/DULG/DebuggingUBoot#Section_10.1.2.

Thanks for the suggestion -- very helpful.  Things still are not
working for me.  Setup:

- Au1550
- U-boot CVS tip
- using MIPS toolchain from ELDK 3.3.1
- BDI2000

When I try to reload the symbol files after re-location into RAM, GDB
still does not seem to be able to sync up to source code (see
transcript below).  Also, when I do "mips-linux-objdump -dS u-boot",
the result does not include C code mixed w/ ASM.  This does work when
building u-boot for ARM.  Does anyone have any suggestions?

Another strange thing w/ GDB, when I type "break <function name>" the
resulting breakpoint is 10 instructions past the start of the


GDB transcript:

cbrake at notebook ~/workspace/u-boot $ mips-linux-gdb u-boot
Warning: Cannot initialize solib-absolute-prefix
GNU gdb Yellow Dog Linux (5.2.1-4b_8)
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 conditions.
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=mips-linux"...
(gdb) symbol-file
Discard symbol table from `/home/cbrake/workspace/u-boot/u-boot'? (y or n) y
No symbol file now.
(gdb) add-symbol-file u-boot 0x80fdc000
add symbol table from file "u-boot" at
        .text_addr = 0x80fdc000
(y or n) y
Reading symbols from u-boot...done.
(gdb) target remote bdi:2001
Remote debugging using bdi:2001
0x80fdd158 in ?? ()
(gdb) break printf
Breakpoint 1 at 0x80fe9ecc: file console.c, line 225.
(gdb) ni

Program received signal SIGABRT, Aborted.
warning: Warning: GDB can't find the start of the function at 0x80fdd15c.

    GDB is unable to find the start of the function at 0x80fdd15c
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
    This problem is most likely caused by an invalid program counter or
stack pointer.
    However, if you think GDB should simply search farther back
from 0x80fdd15c for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
0x80fdd15c in ?? ()

Cliff Brake

More information about the U-Boot mailing list