mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
* dcache.c (dcache_write_line): Fixed bugs where cache line was
not written to target correctly.
This commit is contained in:
parent
af471f3cf4
commit
c839c4db61
@ -1,5 +1,8 @@
|
||||
2001-04-06 J.T. Conklin <jtc@redback.com>
|
||||
|
||||
* dcache.c (dcache_write_line): Fixed bugs where cache line was
|
||||
not written to target correctly.
|
||||
|
||||
* gdbserver/low-hppabsd.c (read_inferior_memory): Add explicit
|
||||
void return value;
|
||||
* gdbserver/low-nbsd.c: Likewise.
|
||||
|
13
gdb/dcache.c
13
gdb/dcache.c
@ -278,20 +278,24 @@ dcache_write_line (DCACHE *dcache, register struct dcache_block *db)
|
||||
while (reg_len > 0)
|
||||
{
|
||||
s = XFORM(memaddr);
|
||||
do {
|
||||
while (reg_len > 0) {
|
||||
if (db->state[s] == ENTRY_DIRTY)
|
||||
break;
|
||||
s++;
|
||||
reg_len--;
|
||||
} while (reg_len > 0);
|
||||
|
||||
memaddr++;
|
||||
myaddr++;
|
||||
len--;
|
||||
}
|
||||
|
||||
e = s;
|
||||
do {
|
||||
while (reg_len > 0) {
|
||||
if (db->state[e] != ENTRY_DIRTY)
|
||||
break;
|
||||
e++;
|
||||
reg_len--;
|
||||
} while (reg_len > 0);
|
||||
}
|
||||
|
||||
dirty_len = e - s;
|
||||
while (dirty_len > 0)
|
||||
@ -304,6 +308,7 @@ dcache_write_line (DCACHE *dcache, register struct dcache_block *db)
|
||||
memset (&db->state[XFORM(memaddr)], ENTRY_OK, res);
|
||||
memaddr += res;
|
||||
myaddr += res;
|
||||
len -= res;
|
||||
dirty_len -= res;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user