When debugging multi-threaded programs, gdb sometimes doesn't handle the `next' command correctly. It seems if one of the other threads (i.e. not the one being stepped) is run, the debugger doesn't stop the thread being debugged again, the next acts as a `continue', which is quite bothersome... I've tried both gdb-4.18-4 and versions from ftp://ftp.valinux.com/pub/support/hjl/gdb/ Output from gdb: [...] (gdb) next [Switching to Thread 22370] [Switching to Thread 22309] Breakpoint 4, BuildingGenerator_t::FindPossibleRooms (this=0x810f0c8, cSelection=@0xbf5ff848, eConnectionType=e_RoomConnection_Office, nConX=0, nConY=4, eSide=e_RoomSide_Right, cMap=@0x813ed78, cPossible=@0xbf5ff780) at acg/buildinggenerator.cpp:868 (gdb) next [Switching to Thread 22307] [Switching to Thread 22370]
I'd try gdb-4.18-6 which should be in rawhide, and/or gdb from CVS at http://sourceware.cygnus.com/gdb/ And especially if that doesn't help, I'd try the mailing lists at that site. Not that I know of any fixes but those are the people who would know.
Just a follow-up comment: The GDB CVS at 20000117 has fixed this problem. Unfortunately, that version has several bugs (step into doesn't work correctly etc.)
I just tried GDB from CVS and I sure didn't see any problems with stepping into functions. No idea whether there were any bugfixes since 20000117 but I'd suggest reporting the bug which you are seeing.
The program being debugged is mostly in shared libraries, and is multithreaded. That might make a difference.