From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: [MI non-stop 01/11] Report thread state in -thread-info output.
Date: Sat, 28 Jun 2008 16:40:00 -0000 [thread overview]
Message-ID: <200806282034.58776.vladimir@codesourcery.com> (raw)
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
next reply other threads:[~2008-06-28 16:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-28 16:40 Vladimir Prus [this message]
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
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=200806282034.58776.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sources.redhat.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