From: Daniel Jacobowitz <drow@false.org>
To: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: gdb@sourceware.org
Subject: Re: debugging something with multiple text sections in one compilation unit
Date: Fri, 03 Aug 2007 11:37:00 -0000 [thread overview]
Message-ID: <20070803113743.GA16769@caradoc.them.org> (raw)
In-Reply-To: <200708030009.46899.rgetz@blackfin.uclinux.org>
On Fri, Aug 03, 2007 at 12:09:46AM -0400, Robin Getz wrote:
> As far as we can tell - there seems to be a limitation in DWARF spec (or DWARF
> implementation of gcc/gdb) - there seems to be only only one single base
> address. All other addresses are an offset to that base in the same
> compilation unit.
>
> When we use l1_text attribute, we have two code segments in one compilation
> unit and the offset between them is determined only when it's loaded. So one
> segment cannot get symbol addresses computed correctly - and we can not set
> breakpoints in functions that are in L1, and debugging applications is pretty
> difficult.
There is no requirement to use a single base address in DWARF, or in
GDB's implementation of it; just use .debug_aranges. GCC does the
right thing if you use __attribute__((section)).
You're supposed to tell GDB the section offsets, so that it can adjust
debug info appropriately. See add-symbol-file in the manual. There's
no way yet to do this automatically for a single section, though; only
by hand.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-08-03 11:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 4:06 Robin Getz
2007-08-03 11:37 ` Daniel Jacobowitz [this message]
2007-08-03 13:57 ` debugging something with multiple text sections in onecompilation unit Robin Getz
2007-08-03 14:02 ` Daniel Jacobowitz
2007-08-03 23:04 ` debugging something with multiple text sections inonecompilation unit Robin Getz
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=20070803113743.GA16769@caradoc.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=rgetz@blackfin.uclinux.org \
/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