* breakpoint.c (mention), main.c (fputs_unfiltered): Add comments.
authorJean Marie Diaz <ambar@cygnus>
Tue, 2 Aug 1994 00:44:24 +0000 (00:44 +0000)
committerJean Marie Diaz <ambar@cygnus>
Tue, 2 Aug 1994 00:44:24 +0000 (00:44 +0000)
* breakpoint.c (delete_breakpoint, enable_breakpoint,
disable_breakpoint): Don't call breakpoints_changed; it is now
called via the *_breakpoint_hook functions.
* annotate.c (_initialize_annotate, breakpoint_changed): New functions.

gdb/ChangeLog
gdb/annotate.c
gdb/breakpoint.c

index 8c6aa1f6f4bc15735bb2c72bbbfecb33c0f100f4..29bd76dd78134785087c46dd26005a560e052e66 100644 (file)
@@ -1,3 +1,11 @@
+Mon Aug  1 16:43:24 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+       * breakpoint.c (mention), main.c (fputs_unfiltered): Add comments.
+       * breakpoint.c (delete_breakpoint, enable_breakpoint,
+       disable_breakpoint): Don't call breakpoints_changed; it is now
+       called via the *_breakpoint_hook functions.
+       * annotate.c (_initialize_annotate, breakpoint_changed): New functions.
+
 Mon Aug  1 13:38:04 1994  Kung Hsu  (kung@mexican.cygnus.com)
 
        * stabsread.c (read_type): Fix a bug in enum size calculation.
index 0a73fb5dcd45bd9d90612b801321350204a6d347..45009238edd9156471b2e2fbca531cc720b283ba 100644 (file)
@@ -22,6 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "value.h"
 #include "target.h"
 #include "gdbtypes.h"
+#include "breakpoint.h"
 \f
 static void print_value_flags PARAMS ((struct type *));
 
@@ -519,3 +520,20 @@ annotate_array_section_end ()
     printf_filtered ("\n\032\032array-section-end\n");
 }
 
+static void
+breakpoint_changed (b)
+     struct breakpoint *b;
+{
+  breakpoints_changed ();
+}
+
+void
+_initialize_annotate ()
+{
+  if (annotation_level > 1)
+    {
+      delete_breakpoint_hook = breakpoint_changed;
+      enable_breakpoint_hook = breakpoint_changed;
+      disable_breakpoint_hook = breakpoint_changed;
+    }
+}
index a23afd442f2c13d73644690fd949d30ae13020aa..9a1aba5b155abb98f0289eeeeab4a723eceb4568 100644 (file)
@@ -2149,6 +2149,11 @@ mention (b)
 {
   int say_where = 0;
 
+  /* FIXME: This is misplaced; mention() is called by things (like hitting a
+     watchpoint) other than breakpoint creation.  It should be possible to
+     clean this up and at the same time replace the random calls to
+     breakpoint_changed with this hook, as has already been done for
+     delete_breakpoint_hook and so on.  */
   if (create_breakpoint_hook)
     create_breakpoint_hook (b);
 
@@ -3238,8 +3243,6 @@ delete_breakpoint (bpt)
   if (bpt->source_file != NULL)
     free (bpt->source_file);
 
-  breakpoints_changed ();
-
   /* Be sure no bpstat's are pointing at it after it's been freed.  */
   /* FIXME, how can we find all bpstat's?
      We just check stop_bpstat for now.  */
@@ -3560,7 +3563,6 @@ enable_breakpoint (bpt)
         error ("Hardware breakpoints used exceeds limit.");
     }
   bpt->enable = enabled;
-  breakpoints_changed ();
   check_duplicates (bpt->address);
 
   if (bpt->type == bp_watchpoint || bpt->type == bp_hardware_watchpoint ||
@@ -3658,8 +3660,6 @@ disable_breakpoint (bpt)
 
   bpt->enable = disabled;
 
-  breakpoints_changed ();
-
   check_duplicates (bpt->address);
 }
 
This page took 0.030225 seconds and 4 git commands to generate.