mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 17:40:49 +00:00
Report thread state in -thread-info output.
* thread.c (print_thread_info): Add new field "state".
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user