This is the mail archive of the
mailing list for the GCC project.
[LTO, committed] Add FIXME about DW_FORM_ref_addr and dwarf2 vs dwarf3
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Sep 2006 23:39:13 -0700
- Subject: [LTO, committed] Add FIXME about DW_FORM_ref_addr and dwarf2 vs dwarf3
I noticed while looking a different bug, that we might be handling
DW_FORM_ref_addr incorrectly on the LTO branch reader. Dwarf3 changed
the definition of DW_FORM_ref_addr slightly for the size of the operand.
In Dwarf2, it was the size of that target address while in Dwarf3, it is
the offset size. Also right now we (GCC) output the dwarf2 format of
so we are going to incorrect read this right now.
I added a FIXME to make the note of it as I cannot test a real fix for
this and I don't see where we mark the dwarf2 version we are reading in
* gcc/lto/lto.c (lto_read_form <case DW_FORM_ref_addr>): Add
FIXME note about differences dwarf2 between dwarf3 with
--- lto.c (revision 117072)
+++ lto.c (working copy)
@@ -922,6 +922,8 @@ lto_read_form (lto_info_fd *info_fd,
"In the 32-bit DWARF format, this offset is a 4-byte unsigned
value; in the 64-bit DWARF format, it is an 8-byte unsigned
+ FIXME: Dwarf2 is different than Dwarf3 here: Dwarf2 says offet is
+ the native address size and not offset size.
offset = lto_read_uword (fd);