This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[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
either.

Thanks,
Andrew Pinski

ChangeLog:

	* gcc/lto/lto.c (lto_read_form <case DW_FORM_ref_addr>): Add
	FIXME note about differences dwarf2 between dwarf3 with
	DW_FORM_ref_addr.
Index: lto.c
===================================================================
--- 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
 	   value"
+	   FIXME: Dwarf2 is different than Dwarf3 here: Dwarf2 says offet is
+	   the native address size and not offset size.
 	*/
 	if (!fd->dwarf64)
 	  offset = lto_read_uword (fd);

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