From: Steve Chamberlain Date: Sat, 19 Aug 1995 00:54:12 +0000 (+0000) Subject: * dcache.c (dcache_write_line): Write dirty lines right. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69c626a9aaac3f4e435a1c514b8e05615a43fd40;p=binutils-gdb.git * dcache.c (dcache_write_line): Write dirty lines right. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 51e4a04eae5..86529b9b551 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Fri Aug 18 17:48:55 1995 steve chamberlain + + * 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 71ba6922371..82da4a300cd 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;