Automatic date update in version.in
[platform/upstream/binutils.git] / gdb / annotate.c
index 387467b..6cce693 100644 (file)
@@ -1,5 +1,5 @@
 /* Annotation routines for GDB.
-   Copyright (C) 1986-2013 Free Software Foundation, Inc.
+   Copyright (C) 1986-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,7 @@
 #include "breakpoint.h"
 #include "observer.h"
 #include "inferior.h"
+#include "infrun.h"
 \f
 
 /* Prototypes for local functions.  */
@@ -63,9 +64,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 +576,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);
 }