aboutsummaryrefslogtreecommitdiff
path: root/gdb/dcache.c
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 /gdb/dcache.c
parentca2329727efad7d7e8a541f2aa88c28fcb5d2526 (diff)
downloadgdb-69c626a9aaac3f4e435a1c514b8e05615a43fd40.zip
gdb-69c626a9aaac3f4e435a1c514b8e05615a43fd40.tar.gz
gdb-69c626a9aaac3f4e435a1c514b8e05615a43fd40.tar.bz2
* dcache.c (dcache_write_line): Write dirty lines right.
Diffstat (limited to 'gdb/dcache.c')
-rw-r--r--gdb/dcache.c32
1 files changed, 16 insertions, 16 deletions
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;