summaryrefslogtreecommitdiff
path: root/gdb/remote-utils.c
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@redback.com>2000-08-10 18:54:27 +0000
committerJ.T. Conklin <jtc@redback.com>2000-08-10 18:54:27 +0000
commit9ce2259b42e1458ab7c9433bdfe1bb5e801b5705 (patch)
treefd7db91b7c1607b821a2b7579dd4b46c451a410b /gdb/remote-utils.c
parent4b4309fd7953ce46c0a4ed5271f8cc17dbdd77d8 (diff)
downloadgdb-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/remote-utils.c')
-rw-r--r--gdb/remote-utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/remote-utils.c b/gdb/remote-utils.c
index 795ae39c038..a31da1c623e 100644
--- a/gdb/remote-utils.c
+++ b/gdb/remote-utils.c
@@ -154,13 +154,18 @@ gr_generic_checkin (void)
void
gr_open (char *args, int from_tty, struct gr_settings *gr)
{
+ DCACHE *dcache;
+
target_preopen (from_tty);
sr_scan_args (gr->ops->to_shortname, args);
unpush_target (gr->ops);
gr_settings = gr;
- gr_set_dcache (dcache_init (gr->readfunc, gr->writefunc));
+ if ((dcache = gr_get_dcache()) == NULL)
+ gr_set_dcache (dcache_init (gr->readfunc, gr->writefunc));
+ else
+ dcache_flush (dcache);
if (sr_get_desc () != NULL)
gr_close (0);