https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84550
--- Comment #6 from Pedro Alves <palves at redhat dot com> --- I see the same thing with your reduced testcase: ~~~ infrun: TARGET_WAITKIND_STOPPED infrun: stop_pc = 0x400580 infrun: stepped into subroutine infrun: inserting step-resume breakpoint at 0x400410 infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread [process 13966] at 0x400580 ~~~ 0x400410 is never hit. With: (gdb) disassemble /s qux Dump of assembler code for function qux(C*): t.c: 33 if (!p->c) __builtin_abort (); 0x0000000000400410 <+0>: callq 0x400400 <abort@plt> 0x0000000000400415: nopw %cs:0x0(%rax,%rax,1) 0x000000000040041f: nop ... 0x0000000000400578 <+16>: nopl 0x0(%rax,%rax,1) 9 return false; 0x0000000000400580 <+0>: xor %eax,%eax 0x0000000000400582 <+2>: retq 0x0000000000400583: nopl (%rax) 0x0000000000400586: nopw %cs:0x0(%rax,%rax,1) ---Type <return> to continue, or q <return> to quit--- ... we see that "foo" is sharing the tail end of qux? And we see that "0x400410", where GDB things foo's prologue ends, is actually the end of qux's prologue: (gdb) disassemble /s foo Dump of assembler code for function qux(C*): t.c: 33 if (!p->c) __builtin_abort (); 0x0000000000400410 <+0>: callq 0x400400 <abort@plt> 0x0000000000400415: nopw %cs:0x0(%rax,%rax,1) 0x000000000040041f: nop When we do "b foo", gdb sets a breakpoint at 0x400580 instead (passed foo's prologue). I don't know why it gets it wrong when stepping into the function.