Report thread state in -thread-info output.
authorVladimir Prus <vladimir@codesourcery.com>
Sat, 12 Jul 2008 12:34:19 +0000 (12:34 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Sat, 12 Jul 2008 12:34:19 +0000 (12:34 +0000)
        * thread.c (print_thread_info): Add new field "state".

gdb/ChangeLog
gdb/thread.c

index d7a95ab74505ed52452dda8dcc23b94afee54e9b..3e8989313e0df8d3d05956faebf4fd0e96fcdfcd 100644 (file)
@@ -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
index 8a17147626ff7b16a88df0618d4a42ada4de0921..bb821cccfcab9ab1492cc4873ef556687f7b815e 100644 (file)
@@ -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);
     }
 
This page took 0.040071 seconds and 4 git commands to generate.