summaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-07-12 12:34:19 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-07-12 12:34:19 +0000
commitfe0598cec0d9284cb969aca7aba7333c8b4600ec (patch)
tree99ceddc5d4d313d4de8121de48bdd74dbbc88b69 /gdb/thread.c
parentb1834bfd33b4988d729557fc9ca97b7ab896acd3 (diff)
downloadgdb-fe0598cec0d9284cb969aca7aba7333c8b4600ec.tar.gz
Report thread state in -thread-info output.
* thread.c (print_thread_info): Add new field "state".
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index 8a17147626f..bb821cccfca 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -823,6 +823,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);
}