Summary: | [4.0/4.1 Regression] avr dwarf-2 support is broken for head 4.0/4.1 | ||
---|---|---|---|
Product: | gcc | Reporter: | Björn Haase <bjoern.m.haase> |
Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | berndtrog, eric.weddington, gcc-bugs, schlie, tsandnes, vikram.varshney |
Priority: | P2 | Keywords: | build, ice-on-valid-code |
Version: | 4.0.0 | ||
Target Milestone: | 4.0.2 | ||
Host: | Target: | avr-*-none | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2005-06-26 18:15:15 | |
Bug Depends on: | |||
Bug Blocks: | 17993, 17994, 19087 | ||
Attachments: |
Preprocessed source of the libgcc functions
Patch for avr.h Patch for PR19885 |
Description
Björn Haase
2005-02-10 23:25:15 UTC
Could you attach the preprocessed source (so someone like me can reproduce it without a cross binutils). As an aside, DWARF2 is about to become the default debugging information used in WinAVR, for both Atmel's AVR Studio and for use with avr-gdb/avr-insight. So this one is crucial for having a successful 4.0.0 release for the avr target. Created attachment 8167 [details]
Preprocessed source of the libgcc functions
This is the command I have used for generating the attached
preprocessed file:
/home/bmh/gnucvs/head/build_dwarf/gcc/xgcc
-B/home/bmh/gnucvs/head/build_dwarf/gcc/ -B/home/bmh/avr/bin/
-B/home/bmh/avr/lib/ -isystem /home/bmh/avr/include -isystem
/home/bmh/avr/sys-include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -DDF=SF -Dinhibit_libc -mcall-prologues -g -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.-I../../gcc/gcc
-I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include
-DL_muldi3 -E ../../gcc/gcc/libgcc2.c -o failure.E
This looks like a debugging problem, I want to say that dwar2out.c does not really support 16bit pointers but there was a patch a long time ago to support it. It was applied a long time ago (1999 or so). But maybe this is a target problem for not being able to output a integer for SImode size for a HImode pointer. I have tried to trace back the date when dwarf2 support startet to fail. So far I have found out that it was broken already at december 5th 2004. Yours, Björn Subject: Re: [4.0 Regression] avr dwarf-2 support is broken for head 4.0
Am Freitag, 11. Februar 2005 00:36 schrieb ericw at evcohs dot com:
> ------- Additional Comments From ericw at evcohs dot com 2005-02-10 23:36
> ------- As an aside, DWARF2 is about to become the default debugging
> information used in WinAVR, for both Atmel's AVR Studio and for use with
> avr-gdb/avr-insight. So this one is crucial for having a successful 4.0.0
> release for the avr target.
Hi Eric,
brief question:
As far as I know you have monitored Thorleif Sandes attempts of getting the
dwarf support working for avr-studio. Do you remember that it was necessary
at the time to implement bug-fixes for getting it functional for gcc 3.4. ?
Yours,
Björn
For the 3.4.1, I am quite sure that no bugfixes were implemented to get Dwarf support from avr-gcc. After configuring gcc like this: ./configure --enable-languages=c,c++ --target=avr --with-dwarf2 and building it, the Dwarf support was generally ok. (Apart from the bugs I have reported earlier) Torleif It seems that when disabling two sanity checks, one again gets head to compile also with dwarf2 support. The following patch might be a workaround until the problem is solved by addressing it's roots. Yours, Björn Index: simplify-rtx.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/simplify-rtx.c,v retrieving revision 1.237 diff -u -r1.237 simplify-rtx.c --- simplify-rtx.c 13 Apr 2005 19:47:28 -0000 1.237 +++ simplify-rtx.c 6 May 2005 07:41:08 -0000 @@ -3737,8 +3737,8 @@ gcc_assert (innermode != BLKmode); gcc_assert (outermode != BLKmode); - gcc_assert (GET_MODE (op) == innermode - || GET_MODE (op) == VOIDmode); +// gcc_assert (GET_MODE (op) == innermode +// || GET_MODE (op) == VOIDmode); gcc_assert ((byte % GET_MODE_SIZE (outermode)) == 0); gcc_assert (byte < GET_MODE_SIZE (innermode)); Index: varasm.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/varasm.c,v retrieving revision 1.498 diff -u -r1.498 varasm.c --- varasm.c 13 Apr 2005 14:34:13 -0000 1.498 +++ varasm.c 6 May 2005 07:41:17 -0000 @@ -2212,7 +2212,7 @@ gcc_assert (!i); } - gcc_assert (!force); + //gcc_assert (!force); return false; } Created attachment 8828 [details] Patch for avr.h Hi, I have traced back the origin of the bug and I think that the attached patch should resolve the problem. In case that the patch is considered OK, I'd like to see it in 4.0.1 as well: IMHO gcc-4.0.0 is useless for all the windows users that use avrstudio for debugging unless this bug is resolved. Yours, Björn 2005-05-05 Bjoern Haase <bjoern.m.haase@web.de> * config/avr/avr.h: (ASM_OUTPUT_DWARF_DELTA): add (ASM_OUTPUT_DWARF_OFFSET): add Subject: Re: [4.0/4.1 Regression] avr dwarf-2 support is broken for head 4.0/4.1 bjoern dot m dot haase at web dot de wrote: >------- Additional Comments From bjoern dot m dot haase at web dot de 2005-05-06 14:21 ------- >Created an attachment (id=8828) > --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8828&action=view) >Patch for avr.h > >Hi, > >I have traced back the origin of the bug and I think that the attached patch >should resolve the problem. In case that the patch is considered OK, I'd like >to see it in 4.0.1 as well: IMHO gcc-4.0.0 is useless for all the windows users >that use avrstudio for debugging unless this bug is resolved. > >Yours, > >Björn > >2005-05-05 Bjoern Haase <bjoern.m.haase@web.de> > > * config/avr/avr.h: > (ASM_OUTPUT_DWARF_DELTA): add > (ASM_OUTPUT_DWARF_OFFSET): add > > > Björn, Don't forget to send the patch to gcc-patches. You also might want to ping Denis Chertykov and Marek Michalkiewicz (AVR maintainters) so they can review and approve. Thanks for taking the time to look into this! Eric Created attachment 8906 [details] Patch for PR19885 The attached Patch (dwarf_patch3) is merely a copy and paste version of the output functions from config/darwin.c that are adapted to the case of the avr target. Tested with avr-gdb. 2005-05-16 Bjoern Haase <bjoern.m.haase@web.de> * config/avr/avr.h: (ASM_OUTPUT_DWARF_OFFSET): Add. (ASM_OUTPUT_DWARF_DELTA): Add. * config/avr/avr.c: (avr_asm_output_dwarf_delta): Add. (avr_asm_output_dwarf_offset): Add. Subject: Re: [4.0/4.1 Regression] avr dwarf-2 support is broken for head 4.0/4.1 Hi Andrew, One question about gcc policy: There exists a patch resolving 19885 since a couple of weeks. The latest revision had been approved by Richard Henderson. Could you tell me what to do in order to get such a patch integrated into gcc? The present maintainers of the AVR port seem to be very busy at the moment. Yours, Björn Björn, what's your .plan with the patch from comment #11? What's the plan? I'd like to see it in CVS. The patch I posted on gcc-patches in may 05 is already approved (it's a straight-forward change) by Richard Henderson. Unfortunately, I don't have write access to CVS. So, IIUC, the patch presently still waits to be committed. Yours, Björn Sorry: Let me correct myself. I just see that You have been refering to an earlier revision of the patch that I had posted on this bugzilla entry. This is not the current state of the patch. The approved fix for this PR is posted in gcc-patches and not here! Yours, Björn Bjorn, do you have a copyright assignment filed with the FSF? This is the patch RTH already approved for head and 4.0: http://gcc.gnu.org/ml/gcc-patches/2005-05/msg01899.html >Bjorn, do you have a copyright assignment filed with the FSF?
Yes. It took quite a while but since a couple of weeks the paperwork is
finished.
Subject: Bug 19885 CVSROOT: /cvs/gcc Module name: gcc Changes by: giovannibajo@gcc.gnu.org 2005-07-27 22:29:47 Modified files: gcc : ChangeLog gcc/config/avr : avr.c Log message: PR target/19885 * config/avr/avr.c (TARGET_ASM_ALIGNED_SI_OP): Add. (TARGET_ASM_UNALIGNED_HI_OP): Add. (TARGET_ASM_UNALIGNED_SI_OP): Add. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9570&r2=2.9571 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/avr/avr.c.diff?cvsroot=gcc&r1=1.140&r2=1.141 Subject: Bug 19885 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: giovannibajo@gcc.gnu.org 2005-07-27 23:37:13 Modified files: gcc : ChangeLog gcc/config/avr : avr.c Log message: PR target/19885 * config/avr/avr.c (TARGET_ASM_ALIGNED_SI_OP): Add. (TARGET_ASM_UNALIGNED_HI_OP): Add. (TARGET_ASM_UNALIGNED_SI_OP): Add. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.333&r2=2.7592.2.334 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/avr/avr.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.129.6.3&r2=1.129.6.4 Fixed for GCC 4.0.2 and GCC 4.1.0. *** Bug 38029 has been marked as a duplicate of this bug. *** *** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla. |