set_address_space_data if dcache is NULL.
authorYao Qi <yao@codesourcery.com>
Wed, 20 Nov 2013 12:59:47 +0000 (20:59 +0800)
committerYao Qi <yao@codesourcery.com>
Wed, 20 Nov 2013 13:15:57 +0000 (21:15 +0800)
gdb:

2013-11-20  Yao Qi  <yao@codesourcery.com>

* target-dcache.c (target_dcache_get_or_init): Call
set_address_space_data if 'dcache' is NULL.

gdb/ChangeLog
gdb/target-dcache.c

index 55eac28962bc61889da8831f757f339d622705c7..7a06a87b9c62905b3c904e8fcafb1376f4cb21e3 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-20  Yao Qi  <yao@codesourcery.com>
+
+       * target-dcache.c (target_dcache_get_or_init): Call
+       set_address_space_data if 'dcache' is NULL.
+
 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
 
        * common/i386-gcc-cpuid.h (bit_MPX): Synchronize with gcc file.
index eb7d4781b9d919c0a7cca1a03ee9c653680e5944..76160efa96eef963c98584742ef32aa235d95a80 100644 (file)
@@ -79,7 +79,11 @@ target_dcache_get_or_init (void)
                                       target_dcache_aspace_key);
 
   if (dcache == NULL)
-    dcache = dcache_init ();
+    {
+      dcache = dcache_init ();
+      set_address_space_data (current_program_space->aspace,
+                             target_dcache_aspace_key, dcache);
+    }
 
   return dcache;
 }