* breakpoint.c (breakpoint_re_set_one): Don't reset breakpoint
authorStu Grossman <grossman@cygnus>
Fri, 28 Feb 1992 04:10:02 +0000 (04:10 +0000)
committerStu Grossman <grossman@cygnus>
Fri, 28 Feb 1992 04:10:02 +0000 (04:10 +0000)
unless symbol table indicates that something has changed.

gdb/ChangeLog
gdb/breakpoint.c

index e7e3f420f2486d00f32c6c6f9f53fca1ca91b5ed..26bce5f6dbcec308d17e5c661fd744b9884d345d 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 27 20:07:43 1992  Stu Grossman  (grossman at cygnus.com)
+
+       * breakpoint.c (breakpoint_re_set_one):  Don't reset breakpoint
+       unless symbol table indicates that something has changed.
+
 Thu Feb 27 11:48:47 1992  John Gilmore  (gnu at cygnus.com)
 
        * remote.c:  Make it work for embedded MIPS.  Increase buffer
index 1f2d4e559f1dc1f23cd4cd5fd0adadcdf4bff225..b9aef04c6573e1ba75f4b4697344ff282c1f0759 100644 (file)
@@ -2212,20 +2212,25 @@ breakpoint_re_set_one (bint)
       for (i = 0; i < sals.nelts; i++)
        {
          resolve_sal_pc (&sals.sals[i]);
-         b->symtab = sals.sals[i].symtab;
-         b->line_number = sals.sals[i].line;
-         b->address = sals.sals[i].pc;
-
-         if (b->cond_string != NULL)
+         if (b->symtab != sals.sals[i].symtab
+             || b->line_number != sals.sals[i].line
+             || b->address != sals.sals[i].pc)
            {
-             s = b->cond_string;
-             b->cond = parse_exp_1 (&s, block_for_pc (sals.sals[i].pc), 0);
-           }
+             b->symtab = sals.sals[i].symtab;
+             b->line_number = sals.sals[i].line;
+             b->address = sals.sals[i].pc;
+
+             if (b->cond_string != NULL)
+               {
+                 s = b->cond_string;
+                 b->cond = parse_exp_1 (&s, block_for_pc (sals.sals[i].pc), 0);
+               }
          
-         check_duplicates (b->address);
+             check_duplicates (b->address);
 
+             mention (b);
+           }
          b->enable = save_enable;      /* Restore it, this worked. */
-         mention (b);
        }
       free (sals.sals);
       break;
@@ -2256,7 +2261,6 @@ breakpoint_re_set ()
   
   ALL_BREAKPOINTS_SAFE (b, temp)
     {
-      b->symtab = 0;           /* Be sure we don't point to old dead symtab */
       sprintf (message, message1, b->number);  /* Format possible error msg */
       (void) catch_errors (breakpoint_re_set_one, (char *) b, message);
     }