+/* Called when GDB is about to display the prompt. Used to reset
+ annotation suppression whenever we're ready to accept new
+ frontend/user commands. */
+
+void
+annotate_display_prompt (void)
+{
+ frames_invalid_emitted = 0;
+ breakpoints_invalid_emitted = 0;
+}
+
+static void
+breakpoint_changed (struct breakpoint *b)
+{
+ if (b->number <= 0)
+ return;
+
+ annotate_breakpoints_invalid ();
+}
+
+void _initialize_annotate ();
+void
+_initialize_annotate ()
+{
+ gdb::observers::breakpoint_created.attach (breakpoint_changed);
+ gdb::observers::breakpoint_deleted.attach (breakpoint_changed);
+ gdb::observers::breakpoint_modified.attach (breakpoint_changed);
+ gdb::observers::thread_exit.attach (annotate_thread_exited);
+}