* dcache.c (dcache_write_line): Write dirty lines right.
authorSteve Chamberlain <sac@cygnus>
Sat, 19 Aug 1995 00:54:12 +0000 (00:54 +0000)
committerSteve Chamberlain <sac@cygnus>
Sat, 19 Aug 1995 00:54:12 +0000 (00:54 +0000)
gdb/ChangeLog
gdb/dcache.c

index 51e4a04eae5c20f0df7efc86df57916052b0f7e8..86529b9b55154fca7c0c415f93e9f20df1c695ab 100644 (file)
@@ -1,3 +1,7 @@
+Fri Aug 18 17:48:55 1995  steve chamberlain  <sac@slash.cygnus.com>
+
+       * dcache.c (dcache_write_line): Write dirty lines right.
+
 Fri Aug 18 06:26:56 1995  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
 
        * sparc-tdep.c (isbranch):  Fix typo which caused wrong
index 71ba6922371c0198ca66b62b6df8ffb85afd1fc2..82da4a300cd6ee704eb0bf07f62983c6a33fe07a 100644 (file)
@@ -230,22 +230,22 @@ dcache_write_line (dcache, db)
              int len = 0;
              for (e = s ; e < LINE_SIZE; e++, len++)
                if (db->state[e] != ENTRY_DIRTY)
-                 {
-                   /* all bytes from s..s+len-1 need to
-                      be written out */
-                   int done = 0;
-                   while (done < len) {
-                     int t = dcache->write_memory (db->addr + s + done,
-                                                   db->data + s + done,
-                                                   len - done);
-                     if (t == 0)
-                       return 0;
-                     done += t;
-                   }
-                   memset (db->state + s, ENTRY_OK, len);
-                   s = e;
-                   break;
-                 }
+                 break;
+             {
+               /* all bytes from s..s+len-1 need to
+                  be written out */
+               int done = 0;
+               while (done < len) {
+                 int t = dcache->write_memory (db->addr + s + done,
+                                               db->data + s + done,
+                                               len - done);
+                 if (t == 0)
+                   return 0;
+                 done += t;
+               }
+               memset (db->state + s, ENTRY_OK, len);
+               s = e;
+             }
            }
        }
       db->anydirty = 0;