2013-08-21 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / gdb / annotate.c
index 387467b1ad9a5c63ff906ce9f4d74af74cc79173..ccba5fe67a1e0bfdcc595eaa576df375256ddbc9 100644 (file)
@@ -63,9 +63,9 @@ print_value_flags (struct type *t)
   else
     printf_filtered (("-"));
 }
-\f
-void
-annotate_breakpoints_changed (void)
+
+static void
+annotate_breakpoints_invalid (void)
 {
   if (annotation_level == 2
       && (!breakpoints_invalid_emitted
@@ -575,15 +575,16 @@ annotate_display_prompt (void)
 static void
 breakpoint_changed (struct breakpoint *b)
 {
-  annotate_breakpoints_changed ();
+  if (b->number <= 0)
+    return;
+
+  annotate_breakpoints_invalid ();
 }
 
 void
 _initialize_annotate (void)
 {
-  if (annotation_level == 2)
-    {
-      observer_attach_breakpoint_deleted (breakpoint_changed);
-      observer_attach_breakpoint_modified (breakpoint_changed);
-    }
+  observer_attach_breakpoint_created (breakpoint_changed);
+  observer_attach_breakpoint_deleted (breakpoint_changed);
+  observer_attach_breakpoint_modified (breakpoint_changed);
 }
This page took 0.038479 seconds and 4 git commands to generate.