This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Use is_stopped, instead of !is_running
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 29 Jul 2008 12:59:08 -0300
- Subject: Re: Use is_stopped, instead of !is_running
- References: <200807291459.12056.pedro@codesourcery.com>
On Tue, 2008-07-29 at 14:59 +0100, Pedro Alves wrote:
> I'm adding more comments to gdbthread.h to describe why. Basically,
> the thread state is not a boolean anymore.
If the thread state is not a boolean, then IMHO offering convenient
functions which treat it as such and then putting a warning in the
comment is really setting up a subtle trap for GDB hackers... :-)
What about just nuking is_running and is_stopping, and making everybody
use is_thread_state directly? That would make this reality explicit.
--
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center