aboutsummaryrefslogtreecommitdiff
path: root/gdb/ocd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ocd.c')
-rw-r--r--gdb/ocd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/ocd.c b/gdb/ocd.c
index 1a50978..5c29919 100644
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -292,7 +292,10 @@ device the OCD device is attached to (e.g. /dev/ttya).");
unpush_target (current_ops);
- ocd_dcache = dcache_init (ocd_read_bytes, ocd_write_bytes);
+ if (!ocd_dcache)
+ ocd_dcache = dcache_init (ocd_read_bytes, ocd_write_bytes);
+ else
+ dcache_flush (ocd_dcache);
if (strncmp (name, "wiggler", 7) == 0)
{