diff options
author | J.T. Conklin <jtc@acorntoolworks.com> | 2000-08-10 18:54:27 +0000 |
---|---|---|
committer | J.T. Conklin <jtc@acorntoolworks.com> | 2000-08-10 18:54:27 +0000 |
commit | f1d7622b957e12c8130c24fe4c46882f70b59b1c (patch) | |
tree | 00b4defbb759d34bc6ef4db5dc670b7fc5702473 /gdb/remote-utils.c | |
parent | e84d946b3ae38920c124cba665158104049c8665 (diff) | |
download | gdb-f1d7622b957e12c8130c24fe4c46882f70b59b1c.zip gdb-f1d7622b957e12c8130c24fe4c46882f70b59b1c.tar.gz gdb-f1d7622b957e12c8130c24fe4c46882f70b59b1c.tar.bz2 |
* 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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/remote-utils.c b/gdb/remote-utils.c index 795ae39..a31da1c 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); |