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]

[AVR] Fix target/19087, Overflowed address in dwarf debug line information


Hello.

For AVR target POINTER_SIZE = 16 results in DWARF2_ADDR_SIZE 
being derived as 2 when it should be 4.  This would normally not be an issue 
except that in code generation the pointers appear to address 64k words (128k 
bytes), but for debug info the address fields appears to address program space 
in bytes, thus wrapping for the second 64k when the address field size is 16 
bits.

This patch define DWARF2_ADDR_SIZE = 4.

ChangeLog:

	PR target/19087

	* config/avr/avr.c (DWARF2_ADDR_SIZE): Define.

Index: gcc/config/avr/avr.h
===================================================================
--- gcc/config/avr/avr.h        (revision 121363)
+++ gcc/config/avr/avr.h        (working copy)
@@ -922,4 +922,6 @@

 #define DWARF2_DEBUGGING_INFO 1

+#define DWARF2_ADDR_SIZE 4
+
 #define OBJECT_FORMAT_ELF

Anatoly.


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