Georg-Johann Lay schrieb: > Weddington, Eric schrieb: >>> -----Original Message----- >>> From: Georg-Johann Lay [mailto:a...@gjlay.de] >>> Sent: Friday, April 01, 2011 4:01 PM >>> To: Georg-Johann Lay >>> Cc: gcc-patches@gcc.gnu.org; Denis Chertykov; Anatoly Sokolov; Weddington, >>> Eric >>> Subject: Re: [Patch,AVR]: Fix PR45263 >>> >>> This is a better fix that does not need push/pop and does not increase >>> numer of instructions. >>> >>> r16 takes the role of r20, and the value formerly in r16, >>> i.e. hh8(__dtors_end resp. __ctors_start) is recreated as needed. >>> >> Hi Johann, >> >> Have you tested this patch against the test case in bug #45263?
Tested patch v2 from 2010-04-02 now for atmega2560 on avrtest simulator. In main, var1 and var2 are initialized as expected and anObject.getVal() is 30. Without patch the program hangs. > Using avr-gdb-7.2 to debug with stubs runs on errors and doesn't show > me any code... no assembly with "A syntax error in expression, near > `0x29c'" in assembly window. > Trying to compile with avr-gcc and dwarf crashes avr-gcc. > > __do_copy_data fails to initialize var1 and var2 (are 0x0). Seems atmega2560 is not supported in avr-gdb-7.2 simulator? Same elf fails to initialize .data. Do you know for which targets avr-gdb is supposed to work? Johann