This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 07/10] Associate target_dcache to address_space.


On 11/20/2013 12:44 PM, Yao Qi wrote:
>   target_dcache_get_or_init (void)
>   {
> -  if (!target_dcache_init_p ())
> -    target_dcache = dcache_init ();
> +  DCACHE *dcache = address_space_data (current_program_space->aspace,
> +				       target_dcache_aspace_key);
>   
> -  return target_dcache;
> +  if (dcache == NULL)
> +    dcache = dcache_init ();
> +
> +  return dcache;
>   }

Sigh,
set_address_space_data is missed after conflict resolution.  This patch
fixed it.  Committed.

-- 
Yao (éå)

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/target-dcache.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gdb/target-dcache.c b/gdb/target-dcache.c
index e1b0a56..58be6cd 100644
--- a/gdb/target-dcache.c
+++ b/gdb/target-dcache.c
@@ -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;
 }
-- 
1.7.7.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]