Report thread state in -thread-info output.
* thread.c (print_thread_info): Add new field "state".
This commit is contained in:
parent
1bac266e85
commit
90139f7d5a
@ -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
|
||||
|
10
gdb/thread.c
10
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user