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]

Re: DWARF2 FDE Address Mismatch


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


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