diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-07-12 12:34:19 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-07-12 12:34:19 +0000 |
commit | 90139f7d5afb8d89822c8704dd3031b5d64ccbf5 (patch) | |
tree | 2f0fbf911e99191c2f74f521d15e70dc994889e7 /gdb | |
parent | 1bac266e85020515f8a1a1152345278f249117e4 (diff) | |
download | gdb-90139f7d5afb8d89822c8704dd3031b5d64ccbf5.zip gdb-90139f7d5afb8d89822c8704dd3031b5d64ccbf5.tar.gz gdb-90139f7d5afb8d89822c8704dd3031b5d64ccbf5.tar.bz2 |
Report thread state in -thread-info output.
* thread.c (print_thread_info): Add new field "state".
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/thread.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d7a95ab..3e89893 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-07-12 Vladimir Prus <vladimir@codesourcery.com> + + Report thread state in -thread-info output. + * thread.c (print_thread_info): Add new field "state". + 2008-07-11 Pedro Alves <pedro@codesourcery.com> * infrun.c (handle_inferior_event): Also ignore a diff --git a/gdb/thread.c b/gdb/thread.c index 8a17147..bb821cc 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); } |