Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [MI non-stop 01/11] Report thread state in -thread-info output.
Date: Sun, 29 Jun 2008 05:33:00 -0000	[thread overview]
Message-ID: <18534.55895.723858.908890@kahikatea.snap.net.nz> (raw)
In-Reply-To: <200806282034.58776.vladimir@codesourcery.com>

 > 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].  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.

 > +	    state = "exited";
 > +	  else if (tp->state_ == THREAD_RUNNING)
 > +	    state = "running";
 > +	  ui_out_field_string (uiout, "state", state);
 > +	}
 > +
 >        do_cleanups (chain2);
 >      }
 >  
 > -- 
 > 1.5.3.5
 > 
 > 

-- 
Nick                                           http://www.inet.net.nz/~nickrob


  reply	other threads:[~2008-06-29  0:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-28 16:40 Vladimir Prus
2008-06-29  5:33 ` Nick Roberts [this message]
2008-06-29  6:03   ` Vladimir Prus
2008-06-29 17:41     ` Nick Roberts
2008-07-11 13:42 ` Daniel Jacobowitz
2008-07-13  5:40   ` Vladimir Prus
2008-07-14 15:01     ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18534.55895.723858.908890@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox