This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Aug 2005 17:16:33 -0000
- Subject: [Bug debug/23190] [4.0/4.1 Regression] debug info omitted for uninitialized variables (stabs)
- References: <20050802003405.23190.dpatel@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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