public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/44113]  New: bad
@ 2010-05-13 13:43 andi-gcc at firstfloor dot org
  2010-05-13 13:45 ` [Bug debug/44113] bad andi-gcc at firstfloor dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: andi-gcc at firstfloor dot org @ 2010-05-13 13:43 UTC (permalink / raw)
  To: gcc-bugs

With gdb 7.1 / gcc 4.5.0 I noticed that unrolled loops have very poor
debugging information. The body cannot be single stepped, but a "next"
in gdb jumps over the whole iteration space.

For example:

main()
{
        int i;
        for (i = 0; i < 10; i++)
                printf("%d\n",i );
}

compiled with -O3 -g (which results in auto unrolling) gives:

(gdb) b main
Breakpoint 1 at 0x400520: file tloop2.c, line 2.
(gdb) r
Starting program: /home2/andi/tsrc/tloop2 

Breakpoint 1, main () at tloop2.c:2
2       {
(gdb) n
5                       printf("%d\n",i );
(gdb) n
0
1
2
3
4
5
6
7
8
6       }
(gdb) 

Note the single next stepped over the complete loop execution.
I would have expected next to only execute one iteration.

Is this a problem of the loop unroller not describing the unrolled
loop to the debugger?


-- 
           Summary: bad
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andi-gcc at firstfloor dot org
  GCC host triplet: x86_64-linux
GCC target triplet: x86_64-linux


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


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

end of thread, other threads:[~2010-05-24 19:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-13 13:43 [Bug debug/44113] New: bad andi-gcc at firstfloor dot org
2010-05-13 13:45 ` [Bug debug/44113] bad andi-gcc at firstfloor dot org
2010-05-13 15:36 ` [Bug debug/44113] bad debugging information for unrolled loops rguenth at gcc dot gnu dot org
2010-05-13 16:16 ` andi-gcc at firstfloor dot org
2010-05-13 17:14 ` pinskia at gcc dot gnu dot org
2010-05-19 14:52 ` jakub at gcc dot gnu dot org
2010-05-19 15:40 ` andi-gcc at firstfloor dot org
2010-05-19 15:46 ` jakub at gcc dot gnu dot org
2010-05-19 18:09 ` drow at gcc dot gnu dot org
2010-05-21 13:00 ` jakub at gcc dot gnu dot org
2010-05-24 19:50 ` jan dot kratochvil at redhat dot com

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