* annotate.c (annotate_thread_changed): New function.
authorNick Roberts <nickrob@snap.net.nz>
Fri, 6 Jun 2008 00:33:52 +0000 (00:33 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Fri, 6 Jun 2008 00:33:52 +0000 (00:33 +0000)
* thread.c (thread_command) : Use it.
* infrun.c (normal_stop): Use it.

gdb/annotate.c
gdb/infrun.c
gdb/thread.c

index ee9adfac0fb7f3c71a561a63929f7e806dd1a00c..98a37aea423ded1635381ef85a5f60161ae5b777 100644 (file)
@@ -242,6 +242,15 @@ annotate_new_thread (void)
     }
 }
 
+void
+annotate_thread_changed (void)
+{
+  if (annotation_level > 1)
+    {
+      printf_unfiltered (("\n\032\032thread-changed\n"));
+    }
+}
+
 void
 annotate_field_begin (struct type *type)
 {
index a1bb28713d30ce27c3926801a9ecba08edb71855..2960acb2a8f216732229ddf748730114578bf01e 100644 (file)
@@ -3605,6 +3605,7 @@ normal_stop (void)
       target_terminal_ours_for_output ();
       printf_filtered (_("[Switching to %s]\n"),
                       target_pid_to_str (inferior_ptid));
+      annotate_thread_changed ();
       previous_inferior_ptid = inferior_ptid;
     }
 
index 773ba5c19994468a860b74557bef6d4b0b2bd024..446a55ece0309c8cebc3651921e9314a59953fb3 100644 (file)
@@ -738,6 +738,7 @@ thread_command (char *tidstr, int from_tty)
       return;
     }
 
+  annotate_thread_changed ();
   gdb_thread_select (uiout, tidstr, NULL);
 }