[rfc] Make DWARF-2 "address size" explicit

Daniel Jacobowitz drow@false.org
Mon Jan 28 23:48:00 GMT 2008


On Mon, Jan 28, 2008 at 09:52:32PM +0100, Ulrich Weigand wrote:
> When comparing all this with what GDB currently does, there is
> one obvious error: GDB does not take the FDE encoding into
> account *at all* when accessing the operand of DW_CFA_set_loc
> in the .eh_frame section.  It looks like this was already noticed
> by Dan some time ago, but the associated patch:
> 
> http://www.cygwin.com/ml/gdb-patches/2006-10/msg00063.html
> 
> apparently was never applied.  Dan, are you still planning on
> applying this patch?

If you could look over that patch and tell me if it looks right, I'll
apply it.  I had no way to test it with valid debug information.

> Apart from that, it would appear that the most logical size to
> use for target addresses in DWARF expression evaluation would
> be the target "void *" size for .eh_frame FDEs, and the value
> of the associated compilation unit's .debug_info address size
> header field value for .debug_frame FDEs (however, I'm not sure
> how to best determine that).

DJ Delorie ran into this same mess on the GCC list a few days ago and
Ian had the helpful suggestion to just avoid the bits that depend on
the ambiguous "address size".  If enough people do that, maybe it
won't matter what we pick... I think your choices sound correct.  It's
hard for .debug_info, though, as there is no direct correlation or
dependency between the sections.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list