aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/target.c b/gdb/target.c
index cb75853..2c0096e 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1667,11 +1667,12 @@ memory_xfer_partial_1 (struct target_ops *ops, enum target_object object,
if (res > 0
&& inf != NULL
&& writebuf != NULL
+ && target_dcache_init_p ()
&& !region->attrib.cache
&& stack_cache_enabled_p
&& object != TARGET_OBJECT_STACK_MEMORY)
{
- DCACHE *dcache = target_dcache_get_or_init ();
+ DCACHE *dcache = target_dcache_get ();
dcache_update (dcache, memaddr, (void *) writebuf, res);
}