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: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Sun, 17 Aug 2008 00:54:07 +0100
- Subject: Re: Use is_stopped, instead of !is_running
- References: <200807291459.12056.pedro@codesourcery.com> <20080809143045.GC4936@adacore.com>
On Saturday 09 August 2008 15:30:45, Joel Brobecker wrote:
> > 2008-07-29 Pedro Alves <pedro@codesourcery.com>
> >
> > * gdbthread.h: Add comments.
> > * stack.c (get_selected_block): Return 0 on an exited thread.
> > * top.c (execute_command): Check for is_stopped, not !is_running.
> > * event-top.c (command_handler): Likewise.
>
> Looks OK to me. It took me a while to decide that it was OK to leave
> one instance inside inf-loop.c, but I think the !is_running there is OK.
Yeah, it actually also took me a while to decide what to do with that
check, and it's just for a log printf.
Thanks, Joel, I checked it in. I'm posting an internal docs blurb
about these states next.
--
Pedro Alves