This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[AVR] Fix target/19087, Overflowed address in dwarf debug line information
- From: "Anatoly Sokolov" <aesok at post dot ru>
- To: <gcc-patches at gcc dot gnu dot org>
- Cc: <aesok at post dot ru>, <eweddington at cso dot atmel dot com>
- Date: Wed, 31 Jan 2007 02:49:25 +0300
- Subject: [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.