------- Additional Comments From mark at codesourcery dot com 2005-08-02 17:16 ------- Subject: Re: [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
dpatel at apple dot com wrote: > ------- Additional Comments From dpatel at apple dot com 2005-08-02 17:12 > ------- > Subject: Re: [4.0/4.1 Regression] debug info omitted for uninitialized > variables (stabs) > > > On Aug 2, 2005, at 10:00 AM, mmitchel at gcc dot gnu dot org wrote: > > >>------- Additional Comments From mmitchel at gcc dot gnu dot org >>2005-08-02 17:00 ------- >>Devang -- >> >>The DWARF-2 information looks correct to me, from the section of >>DWARF-2 code >>that you posted in the original report for this bug. I know GDB >>doesn't print >>the variable, but I don't think that's the compiler's fault; the >>information >>looks OK. Is there something wrong with the DWARF-2 generated, or >>is this just >>a GDB bug? > > > Without the patch, GCC does not emit DW_OP_addr and DW_AT_location. Yes -- but that's no excuse for GDB not being able to show us the type! > There is only one regression. One way to avoid it is to split > wrapup_global... > in two halves. One to emit code and second to generate debug info. > This allows > C front end to put cgraph_optimize() after writing globals but before > generating debug info. It sounds sensible enough, but I really haven't studied how the C front end does things well enough to know for sure. I would ask Joseph and RTH. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23190