public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format
@ 2011-10-21  3:15 anitha.boyapati at atmel dot com
  2011-10-21  3:17 ` [Bug debug/50816] " anitha.boyapati at atmel dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-10-21  3:15 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: anitha.boyapati@atmel.com


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
@ 2011-10-21  3:17 ` anitha.boyapati at atmel dot com
  2011-10-21  3:21 ` anitha.boyapati at atmel dot com
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-10-21  3:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #1 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-10-21 03:17:20 UTC ---

http://gcc.gnu.org/ml/gcc/2011-10/msg00348.html


The fix in trunk should be backported to gcc-4_6-branch.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
  2011-10-21  3:17 ` [Bug debug/50816] " anitha.boyapati at atmel dot com
@ 2011-10-21  3:21 ` anitha.boyapati at atmel dot com
  2011-10-21 13:08 ` anitha.boyapati at atmel dot com
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-10-21  3:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

Anitha Boyapati <anitha.boyapati at atmel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |AVR
      Known to work|                            |4.5.1
      Known to fail|                            |4.6.1

--- Comment #2 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-10-21 03:21:12 UTC ---
Severity set to major because it stops us from using gcc-4.6.1 to process dwarf
2 information. The dwarf 2 parser gets confused reading debug_line section.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
  2011-10-21  3:17 ` [Bug debug/50816] " anitha.boyapati at atmel dot com
  2011-10-21  3:21 ` anitha.boyapati at atmel dot com
@ 2011-10-21 13:08 ` anitha.boyapati at atmel dot com
  2011-10-23 10:23 ` anitha.boyapati at atmel dot com
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-10-21 13:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #3 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-10-21 13:07:33 UTC ---
Can someone confirm this and fix this? We are blocked otherwise :-(


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (2 preceding siblings ...)
  2011-10-21 13:08 ` anitha.boyapati at atmel dot com
@ 2011-10-23 10:23 ` anitha.boyapati at atmel dot com
  2011-10-23 22:48 ` gjl at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-10-23 10:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

Anitha Boyapati <anitha.boyapati at atmel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rth at gcc dot gnu.org

--- Comment #4 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-10-23 10:22:49 UTC ---
I think it can be fixed for gcc 4.6.2 release since the candidate is around to
be released.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (3 preceding siblings ...)
  2011-10-23 10:23 ` anitha.boyapati at atmel dot com
@ 2011-10-23 22:48 ` gjl at gcc dot gnu.org
  2011-10-23 22:50 ` gjl at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-10-23 22:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gjl at gcc dot gnu.org

--- Comment #5 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-10-23 22:47:44 UTC ---
Please probide a testcase according to http://gcc.gnu.org/bugs/#need

- Please, no external includes
- Please, supply the configue options


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (4 preceding siblings ...)
  2011-10-23 22:48 ` gjl at gcc dot gnu.org
@ 2011-10-23 22:50 ` gjl at gcc dot gnu.org
  2011-10-24  4:19 ` anitha.boyapati at atmel dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-10-23 22:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011-10-23
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (5 preceding siblings ...)
  2011-10-23 22:50 ` gjl at gcc dot gnu.org
@ 2011-10-24  4:19 ` anitha.boyapati at atmel dot com
  2011-10-24  4:21 ` anitha.boyapati at atmel dot com
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-10-24  4:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #6 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-10-24 04:18:10 UTC ---
(In reply to comment #5)
> Please probide a testcase according to http://gcc.gnu.org/bugs/#need
> 
> - Please, no external includes

Sorry! I thought I have provided pre-processed file.



> - Please, supply the configue options

Configured with: avr8-gnu-toolchain-dev/src/gcc/configure
LDFLAGS=-L/toolsavr8-gnu-toolchain-dev/avr8-gnu-toolchain-dev-win32_x86/lib
CPPFLAGS= --target=avr --host=i686-mingw32 --build=x86_64-pc-linux-gnu
--prefix=avr8-gnu-toolchain-dev/avr8-gnu-toolchain-dev-win32_x86
--libdir=avr8-gnu-toolchain-dev/avr8-gnu-toolchain-dev-win32_x86/lib
--enable-languages=c,c++ --with-dwarf2 --enable-doc --disable-shared
--disable-libada --disable-libssp --disable-nls
--with-mpfr=avr8-gnu-toolchain-dev/avr8-gnu-toolchain-dev-win32_x86
--with-gmp=avr8-gnu-toolchain-dev/avr8-gnu-toolchain-dev-win32_x86
--with-mpc=avr8-gnu-toolchain-dev/avr8-gnu-toolchain-dev-win32_x86
--enable-win32-registry=a
vrtoolchain --enable-fixed-point 
Thread model: single
gcc version 4.6.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (6 preceding siblings ...)
  2011-10-24  4:19 ` anitha.boyapati at atmel dot com
@ 2011-10-24  4:21 ` anitha.boyapati at atmel dot com
  2011-10-24 11:53 ` gjl at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-10-24  4:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #7 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-10-24 04:21:17 UTC ---
Created attachment 25583
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25583
Relevant testcase that is compilable


Compile it as:

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

The resulting file gives assembly interspersed with .loc directives (and
discriminators)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (7 preceding siblings ...)
  2011-10-24  4:21 ` anitha.boyapati at atmel dot com
@ 2011-10-24 11:53 ` gjl at gcc dot gnu.org
  2011-10-24 18:10 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-10-24 11:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #8 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-10-24 11:53:16 UTC ---
(In reply to comment #7)
> Compile it as:
> 
> $avr-gcc -mmcu=atxmega128a1 -g -gdwarf-2 test.c -S

You are left alone with that: -mmcu=atxmega128a1 is not supported.

See avr-gcc --target-help for a list of supported devices.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (8 preceding siblings ...)
  2011-10-24 11:53 ` gjl at gcc dot gnu.org
@ 2011-10-24 18:10 ` jakub at gcc dot gnu.org
  2011-10-25  2:31 ` anitha.boyapati at atmel dot com
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-24 18:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-24 18:09:24 UTC ---
Author: jakub
Date: Mon Oct 24 18:09:21 2011
New Revision: 180398

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180398
Log:
    PR debug/50816
    * dwarf2out.c (dwarf2out_source_line): Emit discriminators only if
    -gdwarf-4 or not -gstrict-dwarf.

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/dwarf2out.c


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (9 preceding siblings ...)
  2011-10-24 18:10 ` jakub at gcc dot gnu.org
@ 2011-10-25  2:31 ` anitha.boyapati at atmel dot com
  2011-10-25  2:34 ` anitha.boyapati at atmel dot com
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-10-25  2:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #10 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-10-25 02:31:12 UTC ---
(In reply to comment #9)
> Author: jakub
> Date: Mon Oct 24 18:09:21 2011
> New Revision: 180398
> 
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180398
> Log:
>     PR debug/50816
>     * dwarf2out.c (dwarf2out_source_line): Emit discriminators only if
>     -gdwarf-4 or not -gstrict-dwarf.
> 
> Modified:
>     branches/gcc-4_6-branch/gcc/ChangeLog
>     branches/gcc-4_6-branch/gcc/dwarf2out.c


Thanks Jakub.  I thought this suffices:

http://gcc.gnu.org/viewcvs/trunk/gcc/dwarf2out.c?r1=171846&r2=171852&diff_format=h


This however requires us to use -gstrict-dwarf option.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (10 preceding siblings ...)
  2011-10-25  2:31 ` anitha.boyapati at atmel dot com
@ 2011-10-25  2:34 ` anitha.boyapati at atmel dot com
  2011-10-25  8:06 ` jakub at gcc dot gnu.org
  2011-10-28 21:43 ` gjl at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-10-25  2:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

--- Comment #11 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-10-25 02:33:50 UTC ---
(In reply to comment #8)
> (In reply to comment #7)
> > Compile it as:
> > 
> > $avr-gcc -mmcu=atxmega128a1 -g -gdwarf-2 test.c -S
> 
> You are left alone with that: -mmcu=atxmega128a1 is not supported.
> 
> See avr-gcc --target-help for a list of supported devices.

ok. The bug holds good for any device. Infact '-mmcu' can be dropped. 

$avr-gcc -g -gdwarf-2 test.c -S


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (11 preceding siblings ...)
  2011-10-25  2:34 ` anitha.boyapati at atmel dot com
@ 2011-10-25  8:06 ` jakub at gcc dot gnu.org
  2011-10-28 21:43 ` gjl at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-25  8:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-25 08:05:17 UTC ---
If you for whatever weird reason use assembler that handles discriminators, but
debugger or other part of the toolchain that doesn't, then yes, you need
-gstrict-dwarf.  If you used assembler that doesn't handle discriminators, gcc
wouldn't emit them obviously.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug debug/50816] [4.6.1] Discriminators are emitted in DWARF 2 format
  2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
                   ` (12 preceding siblings ...)
  2011-10-25  8:06 ` jakub at gcc dot gnu.org
@ 2011-10-28 21:43 ` gjl at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-10-28 21:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50816

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-debug
      Known to work|                            |4.6.2
            Version|unknown                     |4.6.1
   Target Milestone|---                         |4.6.2


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-10-28 21:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-21  3:15 [Bug debug/50816] New: [4.6.1] Discriminators are emitted in DWARF 2 format anitha.boyapati at atmel dot com
2011-10-21  3:17 ` [Bug debug/50816] " anitha.boyapati at atmel dot com
2011-10-21  3:21 ` anitha.boyapati at atmel dot com
2011-10-21 13:08 ` anitha.boyapati at atmel dot com
2011-10-23 10:23 ` anitha.boyapati at atmel dot com
2011-10-23 22:48 ` gjl at gcc dot gnu.org
2011-10-23 22:50 ` gjl at gcc dot gnu.org
2011-10-24  4:19 ` anitha.boyapati at atmel dot com
2011-10-24  4:21 ` anitha.boyapati at atmel dot com
2011-10-24 11:53 ` gjl at gcc dot gnu.org
2011-10-24 18:10 ` jakub at gcc dot gnu.org
2011-10-25  2:31 ` anitha.boyapati at atmel dot com
2011-10-25  2:34 ` anitha.boyapati at atmel dot com
2011-10-25  8:06 ` jakub at gcc dot gnu.org
2011-10-28 21:43 ` gjl at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).