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

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

.LFB0:
    .file 1 "test.c"
    .loc 1 3 0
    push r28
...
.L5:
    .loc 1 9 0
    std Y+3,__zero_reg__
    std Y+4,__zero_reg__
    rjmp .L3
.L4:
    .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)




-- 
 Anitha

Reply via email to