* thread.c (print_thread_info): Eliminate now useless checks
authorVladimir Prus <vladimir@codesourcery.com>
Sun, 9 Nov 2008 07:54:27 +0000 (07:54 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Sun, 9 Nov 2008 07:54:27 +0000 (07:54 +0000)
for exited threads.

gdb/ChangeLog
gdb/thread.c

index f756f67432f00ae94ba7800b0806cb7a03b8d4d7..42a007f83b0772edeb21b5c679f049850f1b3f9a 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-09  Vladimir Prus  <vladimir@codesourcery.com>
+
+       * thread.c (print_thread_info): Eliminate now useless checks
+       for exited threads.
+
 2008-11-06  Pedro Alves  <pedro@codesourcery.com>
 
        * i386-dicos-tdep.c (i386_dicos_init_abi): Set decr_pc_after_break
index 02fb845abf545a9dfd78fd184698a923d01d7aa5..b1e318d09dac3fa64301be412083f7b0dfa43ad2 100644 (file)
@@ -678,17 +678,14 @@ print_thread_info (struct ui_out *uiout, int requested_thread)
       ui_out_text (uiout, " ");
       ui_out_field_string (uiout, "target-id", target_tid_to_str (tp->ptid));
 
-      if (tp->state_ != THREAD_EXITED)
+      extra_info = target_extra_thread_info (tp);
+      if (extra_info)
        {
-         extra_info = target_extra_thread_info (tp);
-         if (extra_info)
-           {
-             ui_out_text (uiout, " (");
-             ui_out_field_string (uiout, "details", extra_info);
-             ui_out_text (uiout, ")");
-           }
-         ui_out_text (uiout, "  ");
+         ui_out_text (uiout, " (");
+         ui_out_field_string (uiout, "details", extra_info);
+         ui_out_text (uiout, ")");
        }
+      ui_out_text (uiout, "  ");
 
       if (tp->state_ == THREAD_RUNNING)
        ui_out_text (uiout, "(running)\n");
@@ -706,9 +703,7 @@ print_thread_info (struct ui_out *uiout, int requested_thread)
       if (ui_out_is_mi_like_p (uiout))
        {
          char *state = "stopped";
-         if (tp->state_ == THREAD_EXITED)
-           state = "exited";
-         else if (tp->state_ == THREAD_RUNNING)
+         if (tp->state_ == THREAD_RUNNING)
            state = "running";
          ui_out_field_string (uiout, "state", state);
        }
This page took 0.030502 seconds and 4 git commands to generate.