This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem using CodeSourcery 2010.9-50 ARM GDB to debug U-boot w/BDI


I'm using the latest ARM GDB from CodeSourcery with a BDI to debug
U-Boot 2010.12-rc3 on my hardware and I have a problem trying to access
symbols in .bss after loading the symbol table to the relocated
address.  Apparrenlty GDB is translating symbols in .text but not symbols
in .bss:

Current directory is
/home/peter/work/logic/eps_svn/software/products/linux/LTIB/trunk/ltib-20101216/rpm/BUILD/u-boot-svn/
GNU gdb (Sourcery G++ Lite 2010.09-50) 7.2.50.20100908-cvs
Copyright (C) 2010 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=arm-none-linux-gnueabi".
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>.
(gdb) pwd
Working directory
/home/peter/work/logic/eps_svn/software/products/linux/LTIB/trunk/ltib-20101216/rpm/BUILD/u-boot-svn.
(gdb) add-symbol-file u-boot 0x8ff74000
add symbol table from file "u-boot" at
     .text_addr = 0x8ff74000
(y or n) y
Reading symbols from
/home/peter/work/logic/eps_svn/software/products/linux/LTIB/trunk/ltib-20101216/rpm/BUILD/u-boot-svn/u-boot...done.
(gdb) p&NS16550_getc
$1 = (char (*)(NS16550_t)) 0x8ff91de0<NS16550_getc>
(gdb) p&htab
$2 = (struct hsearch_data *) 0x804783fc
(gdb) tar remote abatron:2001
Remote debugging using abatron:2001
0x8ff91de4 in NS16550_getc (com_port=0x4806a000) at ns16550.c:87
(gdb) info file
Remote serial target in gdb-specific protocol:
Debugging a target over a serial line.
(gdb) p/x ((gd_t*)$r8)->reloc_off
$3 = 0xfb74000
(gdb) p/x ((gd_t*)$r8)->relocaddr
$4 = 0x8ff74000


My version of u-boot is linked at 0x80400000, and the relevant addresses from the u-boot ELF file are: 8041dde0 T NS16550_getc 804783fc b htab

NS16650_getc has been properly translated from 0x8041dde0 by 0xfb74000
(as the symbol table is loaded at address 0x8ff74000 instead of
0x80400000), but htab has not been translated.

Has anyone seen this type of problem before?  Any suggestions?
Thanks in advance!


-- Peter Barada peter.barada@logicpd.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]