public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peter Barada <peter.barada@logicpd.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Problem using CodeSourcery 2010.9-50 ARM GDB to debug U-boot w/BDI
Date: Mon, 17 Jan 2011 13:55:12 -0500	[thread overview]
Message-ID: <4D349090.10401@logicpd.com> (raw)

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.  Apparenlty 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/board/ti/logic/
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 at logicpd.com

                 reply	other threads:[~2011-01-17 18:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D349090.10401@logicpd.com \
    --to=peter.barada@logicpd.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox