Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [MI non-stop 01/11] Report thread state in -thread-info output.
@ 2008-06-28 16:40 Vladimir Prus
  2008-06-29  5:33 ` Nick Roberts
  2008-07-11 13:42 ` Daniel Jacobowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Vladimir Prus @ 2008-06-28 16:40 UTC (permalink / raw)
  To: gdb-patches


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 :-)

- 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)
+	    state = "exited";
+	  else if (tp->state_ == THREAD_RUNNING)
+	    state = "running";
+	  ui_out_field_string (uiout, "state", state);
+	}
+
       do_cleanups (chain2);
     }
 
-- 
1.5.3.5



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-07-14 15:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-28 16:40 [MI non-stop 01/11] Report thread state in -thread-info output Vladimir Prus
2008-06-29  5:33 ` Nick Roberts
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox