https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10466
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Reading symbols from ./a.out... (gdb) b bar Breakpoint 1 at 0x400545: file b.c, line 4. (gdb) b bar2 Breakpoint 2 at 0x40055a: file b.c, line 12. (gdb) r Starting program: /tmp/a.out Missing separate debuginfos, use: zypper install glibc-debuginfo-2.31-150300.63.1.x86_64 foo Breakpoint 1, bar () at b.c:4 4 printf( "bar\n" ); (gdb) l 1 int 2 bar() 3 { 4 printf( "bar\n" ); 5 6 return 0; 7 } 8 9 int 10 bar2() Works for me (named the file b.c), with both gcc 7.5 and gcc 13.2. I'm using quite recent gdb though, gdb 12.1 Either fixed or a gdb bug (which was also fixed meanwhile).