This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: go32-nat, always a thread
- From: Daniel Jacobowitz <drow at false dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Pedro Alves <pedro at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Fri, 8 Aug 2008 08:42:29 -0400
- Subject: Re: go32-nat, always a thread
- References: <200808080439.17254.pedro@codesourcery.com> <u3algj5qo.fsf@gnu.org>
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