aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1995-08-19 00:54:12 +0000
committerSteve Chamberlain <sac@cygnus>1995-08-19 00:54:12 +0000
commit69c626a9aaac3f4e435a1c514b8e05615a43fd40 (patch)
tree0bd0c48a9247dda5f66a15a32e9f2264b3189bc7
parentca2329727efad7d7e8a541f2aa88c28fcb5d2526 (diff)
downloadgdb-69c626a9aaac3f4e435a1c514b8e05615a43fd40.zip
gdb-69c626a9aaac3f4e435a1c514b8e05615a43fd40.tar.gz
gdb-69c626a9aaac3f4e435a1c514b8e05615a43fd40.tar.bz2
* dcache.c (dcache_write_line): Write dirty lines right.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/dcache.c32
2 files changed, 20 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 51e4a04..86529b9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/dcache.c b/gdb/dcache.c
index 71ba692..82da4a3 100644
--- a/gdb/dcache.c
+++ b/gdb/dcache.c
@@ -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;