Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Matt Kern <matt.kern@undue.org>
Cc: gdb@sourceware.org
Subject: Re: DWARF2 FDE Address Mismatch
Date: Fri, 01 Jun 2007 17:14:00 -0000	[thread overview]
Message-ID: <20070601171454.GA4992@them.org> (raw)
In-Reply-To: <20070601142613.GA19779@pling.qwghlm.org>

On Fri, Jun 01, 2007 at 03:26:13PM +0100, Matt Kern wrote:
> On Fri, Jun 01, 2007 at 09:43:55AM -0400, Daniel Jacobowitz wrote:
> > On Fri, Jun 01, 2007 at 01:20:49PM +0100, Matt Kern wrote:
> > > ...
> > > In short it looks like GDB DWARF2 support lacks a mechanism to override
> > > the address size (comparable to DWARF2_ADDR_SIZE in gcc).  Is my
> > > understanding correct?
> > 
> > Yes, that looks true.  Perhaps it should be using TARGET_ADDR_BIT
> > instead.
> 
> A quick look at GCC tells me:
> 
>   * For EH data it uses a potentially arch-specific macro,
>     ASM_PREFERRED_EH_DATA_FORMAT() to determine the address siz.  This
>     macro is parameterised by code (data, code label, function ptr) and
>     global (true if may be affected by dynamic relocs).
> 
>   * For non-EH data, DWARF2_ADDR_SIZE is used.

For .eh_frame we have to do this funny dance with GCC to determine the
"right" behavior.  For .debug_frame, there is a standard and we should
be following it - and so should GCC.  What does it have to say?  If it
says "the size of an address on the target machine" then we should
probably use TARGET_ADDR_BIT; otherwise I'm not sure.  I think this
format ambiguity has come up before.

-- 
Daniel Jacobowitz
CodeSourcery


  parent reply	other threads:[~2007-06-01 17:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-01 12:20 Matt Kern
2007-06-01 13:44 ` Daniel Jacobowitz
2007-06-01 14:26   ` Matt Kern
2007-06-01 14:55     ` Matt Kern
2007-06-01 17:14     ` Daniel Jacobowitz [this message]
2007-06-05 10:37       ` Matt Kern

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=20070601171454.GA4992@them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=matt.kern@undue.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