This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 07/10] Associate target_dcache to address_space.
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 20 Nov 2013 21:09:52 +0800
- Subject: Re: [PATCH 07/10] Associate target_dcache to address_space.
- Authentication-results: sourceware.org; auth=none
- References: <1383458049-20893-1-git-send-email-yao at codesourcery dot com> <1383458049-20893-8-git-send-email-yao at codesourcery dot com> <CADPb22Sgp_3WsUcXS5gEujtAarPa6GW+RsPode-+PTchZibDdw at mail dot gmail dot com> <528C3E40 dot 2070203 at codesourcery dot com>
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