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

           Summary: too far prologue end marker
           Product: gcc
           Version: 4.4.6
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: jan.kratoch...@redhat.com
                CC: do...@gcc.gnu.org
            Target: x86_64-unknown-linux-gnu


reposted from GDB BZ: http://sourceware.org/bugzilla/show_bug.cgi?id=12644

FAIL: gcc (GCC) 4.7.0 20110429 (experimental)
FAIL: gcc (GCC) 4.6.1 20110429 (prerelease)
FAIL: gcc (GCC) 4.5.4 20110429 (prerelease)
FAIL: gcc (GCC) 4.4.7 20110429 (prerelease)
PASS: gcc (GCC) 3.3.5 --- but the code has no jmp there at all

static void
f (int c)
{
  do
    {
      if (c)
    continue;
      return;
    }
  while (1);
}
int
main(void)
{
  f (0);
  return 0;
}

GNU gdb (GDB) 7.3.50.20110428-cvs
(gdb) start
Temporary breakpoint 1, main () at f.c:15
15      f (0);
(gdb) step
child:target_xfer_partial (..., 0x40045d, 1) = 1, bytes = cc
                                ^^^^^^^^
[Inferior 1 (process 16375) exited normally]

readelf -wL
File name                            Line number    Starting address
f.c                                            3            0x400454
f.c                                           10            0x40045d

0000000000400454 <f>:
f():
f.c:3
  400454:       55                      push   %rbp
  400455:       48 89 e5                mov    %rsp,%rbp
  400458:       89 7d fc                mov    %edi,-0x4(%rbp)
  40045b:       eb 01                   jmp    40045e <f+0xa>
f.c:10
  40045d:       90                      nop
  ^^^^^^ = breakpoint placed here
f.c:6
  40045e:       83 7d fc 00             cmpl   $0x0,-0x4(%rbp)

GDB thinks the prologue ends at 0x40045d.

Reply via email to