From: Daniel Jacobowitz <drow@mvista.com>
To: Bruce Ashfield <Bruce.Ashfield@seawaynetworks.com>
Cc: gdb@sources.redhat.com
Subject: Re: Accessing variables in .sdata
Date: Wed, 12 Mar 2003 18:28:00 -0000 [thread overview]
Message-ID: <20030312182804.GA26459@nevyn.them.org> (raw)
In-Reply-To: <20030312175317.GA2464@seawaynetworks.com>
On Wed, Mar 12, 2003 at 12:53:17PM -0500, Bruce Ashfield wrote:
> Hi all,
>
> I've been trying to characterize the types of variables I
> can't access when using a linker script during the construction
> of our bootable image. The linker script in question is a
> slightly modified one from ppcboot and I can't see any
> fundamental problems with the script.
>
> I've been dumping the map file during the link and comparing
> the one that the linker internally generates to the one that
> results from our supplied linker map. I'm seeing a different
> location for the .text,.bss,.data segments and some other
> ordering differences, but again nothing fundamentally wrong.
>
> But my problem persists. If I use a linker script and try to
> print the value of a variable in a .sdata I'm presented with
> the gdb error "Cannot access memory at address 0x...". Where
> address 0xABCD.. is no where near where the map file says
> that section and variable should be found. It's like gdb is
> missing the offset of the sections.
>
> I've also tried using add-symbol-file to force gdb to recognize
> the start address for the various sections, but at best I see
> the error address moving around.
>
> I've been told from people around the office that if they load
> the symbol file multiple times the error address changes and
> they can breakpoint functions, but not usually inside a
> function.
This sounds like the sdata offset is uninitialized for some reason. I
don't know why it would affect breakpoints, though. Did you try
valgrind? Do you have a smaller testcase working yet based on this new
insight?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-03-12 18:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-12 17:53 Bruce Ashfield
2003-03-12 18:28 ` Daniel Jacobowitz [this message]
2003-03-20 14:54 ` Bruce Ashfield
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=20030312182804.GA26459@nevyn.them.org \
--to=drow@mvista.com \
--cc=Bruce.Ashfield@seawaynetworks.com \
--cc=gdb@sources.redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).