go32-nat, always a thread

Daniel Jacobowitz drow@false.org
Fri Aug 8 12:43:00 GMT 2008


On Fri, Aug 08, 2008 at 11:00:47AM +0300, Eli Zaretskii wrote:
> What do we need this for?  DJGPP doesn't support threading; the ptid_t
> variables in go32-nat.c are simply dummies devised to make the
> compiler happy because go32-nat.c uses interfaces that pass thread
> IDs.  But there's no infrastructure behind this farce.

The GDB core has a list of threads.  Until recently, a single-threaded
program would usually have no threads in the list (though in some
cases, there would be a single thread).  This makes it difficult to
keep track of per-thread state in a uniform way; state that a
single-threaded program should have one copy of but a multi-threaded
program should have one copy per thread.

> The code you added will now cause all kinds of notifications, like
> "thread started", be displayed, which is just confusing when the
> programmer knows there're no threads.  Is this really justified?

No notifications should be displayed; that's because Pedro used
add_thread_silent and delete_thread_silent.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list