This is the mail archive of the
mailing list for the GCC project.
Re: GCC 4.6.1 emits discriminators in DWARF2 mode
On 20 October 2011 20:27, Paulo J. Matos <email@example.com> wrote:
> On 20/10/11 15:06, Anitha Boyapati wrote:
>> Firstly, aren't discriminators introduced in DWARF 4? Little more
>> digging shows that the following fix is missing in 4.6.1 release. It
>> breaks the current dwarf2 parsers/readers. I think it is worth filing
>> a bug.
> Anitha, if you only want dwarf2 produced, with no extensions you should use
> on the command line -gdwarf-2 -gstrict-dwarf. That should block any
> extensions to dwarf2.
I did try that already. Inspite of giving -gstrict-dwarf2, it
generates .loc info with discriminators.
$ avr-gcc test.c -gstrict-dwarf -S -mmcu=atxmega128a1 -g -gdwarf-2
.file 1 "test.c"
.loc 1 3 0
.loc 1 9 0
.loc 1 9 0 is_stmt 0 discriminator 2
(Note that the gcc version is 4.6.1) A look at gcc-4_6_branch log says
that the fix is not backported when it got fixed in trunk (link given
in previous mail)