After previous patch, 'target_dcache' is initialized lazily. It is
possible that 'target_dcache' is still NULL when GDB writes to memory.
In this case, update to 'target_dcache' can be skipped.
gdb:
2013-11-20 Yao Qi <yao@codesourcery.com>
* target.c (memory_xfer_partial_1): Update 'target_dcache' if
it is initialized.
+2013-11-20 Yao Qi <yao@codesourcery.com>
+
+ * target.c (memory_xfer_partial_1): Update 'target_dcache' if
+ it is initialized.
+
2013-11-20 Yao Qi <yao@codesourcery.com>
* dcache.c (last_cache): Remove.
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);
}