This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [MI non-stop 01/11] Report thread state in -thread-info output.
On Sunday 29 June 2008 04:41:59 Nick Roberts wrote:
> > This patch adds the 'state' field to the output of -thread-info. Since
> > it only changes MI behaviour, I guess I don't need it approved, and
> > it seems fairly trivial so I doubt we'll have much discussion of this one :-)
>
> But this isn't a self contained patch, it seems to need changes in the last
> of the series [MI non-stop 10/11].
MI non-stop 10/11 is "Skip varobj in running threads.". I don't think there's
any dependency on that. Of course, as I wrote in the overview, this patch needs
Pedro's patches.
> ISTR that Pedro cascaded his patches so
> that it was possible to look at one change after the other.
>
> > - Volodya
> >
> > * thread.c (print_thread_info): Add new field "state".
> > ---
> > gdb/thread.c | 10 ++++++++++
> > 1 files changed, 10 insertions(+), 0 deletions(-)
> >
> > diff --git a/gdb/thread.c b/gdb/thread.c
> > index d0e17c5..4e172d8 100644
> > --- a/gdb/thread.c
> > +++ b/gdb/thread.c
> > @@ -806,6 +806,16 @@ print_thread_info (struct ui_out *uiout, int requested_thread)
> > LOCATION);
> > }
> >
> > + if (ui_out_is_mi_like_p (uiout))
> > + {
> > + char *state = "stopped";
> > + if (tp->state_ == THREAD_EXITED)
> ^^^^^^^^^^ ^^^^^^^^^^^^^
> Not defined here.
This field is introduced by Pedro's patches.
- Volodya