Clarify texinfo/
[deliverable/binutils-gdb.git] / gdb / annotate.c
index 1c235a568e526cf75dd29f1177eca24606b1be60..ee26290a95ec0d58915325316c55a0f01009aeae 100644 (file)
 
 /* Prototypes for local functions. */
 
-extern void _initialize_annotate PARAMS ((void));
+extern void _initialize_annotate (void);
 
-static void print_value_flags PARAMS ((struct type *));
+static void print_value_flags (struct type *);
 
-static void breakpoint_changed PARAMS ((struct breakpoint *));
+static void breakpoint_changed (struct breakpoint *);
 
-void (*annotate_starting_hook) PARAMS ((void));
-void (*annotate_stopped_hook) PARAMS ((void));
-void (*annotate_signalled_hook) PARAMS ((void));
-void (*annotate_signal_hook) PARAMS ((void));
-void (*annotate_exited_hook) PARAMS ((void));
+void (*annotate_starting_hook) (void);
+void (*annotate_stopped_hook) (void);
+void (*annotate_signalled_hook) (void);
+void (*annotate_signal_hook) (void);
+void (*annotate_exited_hook) (void);
+
+static int ignore_count_changed = 0;
 
 static void
 print_value_flags (t)
@@ -57,9 +59,24 @@ breakpoints_changed ()
     {
       target_terminal_ours ();
       printf_unfiltered ("\n\032\032breakpoints-invalid\n");
+      if (ignore_count_changed)
+       ignore_count_changed = 0;       /* Avoid multiple break annotations. */
     }
 }
 
+/* The GUI needs to be informed of ignore_count changes, but we don't
+   want to provide successive multiple breakpoints-invalid messages
+   that are all caused by the fact that the ignore count is changing
+   (which could keep the GUI very busy).  One is enough, after the
+   target actually "stops". */
+
+void
+annotate_ignore_count_change (void)
+{
+  if (annotation_level > 1)
+    ignore_count_changed = 1;
+}
+
 void
 annotate_breakpoint (num)
      int num;
@@ -109,6 +126,11 @@ annotate_stopped ()
       if (annotation_level > 1)
        printf_filtered ("\n\032\032stopped\n");
     }
+  if (annotation_level > 1 && ignore_count_changed)
+    {
+      ignore_count_changed = 0;
+      breakpoints_changed ();
+    }
 }
 
 void
This page took 0.024769 seconds and 4 git commands to generate.