This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 4.6.1 emits discriminators in DWARF2 mode

On 20 October 2011 20:27, Paulo J. Matos <> 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.
For e.g,

$ avr-gcc  test.c -gstrict-dwarf -S  -mmcu=atxmega128a1 -g -gdwarf-2

    .file 1 "test.c"
    .loc 1 3 0
    push r28
    .loc 1 9 0
    std Y+3,__zero_reg__
    std Y+4,__zero_reg__
    rjmp .L3
    .loc 1 9 0 is_stmt 0 discriminator 2
    ldd r24,Y+3

(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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]