diff options
author | J.T. Conklin <jtc@redback.com> | 2000-08-10 18:54:27 +0000 |
---|---|---|
committer | J.T. Conklin <jtc@redback.com> | 2000-08-10 18:54:27 +0000 |
commit | 9ce2259b42e1458ab7c9433bdfe1bb5e801b5705 (patch) | |
tree | fd7db91b7c1607b821a2b7579dd4b46c451a410b /gdb/monitor.c | |
parent | 4b4309fd7953ce46c0a4ed5271f8cc17dbdd77d8 (diff) | |
download | gdb-9ce2259b42e1458ab7c9433bdfe1bb5e801b5705.tar.gz |
* monitor.c (monitor_open): If a dcache has already been created,
invalidate it rather than creating another.
* ocd.c (ocd_open): Likewise.
* remote-nindy.c (nindy_open): Likewise.
* remote-sds.c (sds_open): Likewise.
* remote-utils.c (gr_open): Likewise.
* remote.c (remote_open_1, remote_cisco_open): Likewise.
* dcache.c (dcache_alloc): Changed to take address of line as an
argument, and to invalidate cache line before returning.
(dcache_peek_byte): Updated.
(dcache_poke_byte): Updated.
-------------------------------------------------------------------
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r-- | gdb/monitor.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c index e3fa1c81fad..b57365e5334 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -838,10 +838,17 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty) monitor_printf (current_monitor->line_term); - if (current_monitor->flags & MO_HAS_BLOCKWRITES) - remote_dcache = dcache_init (monitor_read_memory, monitor_write_memory_block); + if (!remote_dcache) + { + if (current_monitor->flags & MO_HAS_BLOCKWRITES) + remote_dcache = dcache_init (monitor_read_memory, + monitor_write_memory_block); + else + remote_dcache = dcache_init (monitor_read_memory, monitor_write_memory); + } else - remote_dcache = dcache_init (monitor_read_memory, monitor_write_memory); + dcache_flush (remote_dcache); + start_remote (); } |