Bug 8533 - next in threaded programs
Summary: next in threaded programs
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gdb
Version: 6.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-01-17 13:32 UTC by André Johansen
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-01-18 18:39:00 UTC

Attachments (Terms of Use)

Description André Johansen 2000-01-17 13:32:04 UTC
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]

Comment 1 Jim Kingdon 2000-01-18 18:39:59 UTC
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.

Comment 2 André Johansen 2000-02-10 14:47:59 UTC
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.)

Comment 3 Jim Kingdon 2000-02-10 15:29:59 UTC
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.

Comment 4 André Johansen 2000-02-10 16:06:59 UTC
The program being debugged is mostly in shared libraries, and is multithreaded.
That might make a difference.

Note You need to log in before you can comment on or make changes to this bug.