http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816
Bug #: 50816
Summary: [4.6.1] Discriminators are emitted in DWARF 2 format
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: debug
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 25566
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25566
testcase to reproduce the bug
GCC 4.6.1 emits discriminators even in dwarf2 format. For e.g,
$avr-gcc test.c -gstrict-dwarf -S -mmcu=atxmega128a1 -g -gdwarf-2
It gives the following assembly:
delay_ms:
.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
ldd r25,Y+4
...
Version:
$ avr-gcc -v
Using built-in specs.
COLLECT_GCC=c:\Program Files\Atmel\AVR Tools\AVR
Toolchain\avr8-gnu-toolchain-de
v-win32_x86\bin\avr-gcc.exe
COLLECT_LTO_WRAPPER=c:/program files/atmel/avr tools/avr
toolchain/avr8-gnu-tool
chain-dev-win32_x86/bin/../libexec/gcc/avr/4.6.1/lto-wrapper.exe
Target: avr
...
Thread model: single
gcc version 4.6.1