aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-sds.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote-sds.c')
-rw-r--r--gdb/remote-sds.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index 5d49152..ce6f5f6 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -203,7 +203,10 @@ device is attached to the remote system (e.g. /dev/ttya).");
unpush_target (&sds_ops);
- sds_dcache = dcache_init (sds_read_bytes, sds_write_bytes);
+ if (!sds_dcache)
+ sds_dcache = dcache_init (sds_read_bytes, sds_write_bytes);
+ else
+ dcache_flush (sds_dcache);
sds_desc = SERIAL_OPEN (name);
if (!sds_desc)