This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 01/10] Remove last_cache
- From: Doug Evans <dje at google dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Sun, 17 Nov 2013 11:33:51 -0800
- Subject: Re: [PATCH 01/10] Remove last_cache
- Authentication-results: sourceware.org; auth=none
- References: <1383458049-20893-1-git-send-email-yao at codesourcery dot com> <1383458049-20893-2-git-send-email-yao at codesourcery dot com>
On Sat, Nov 2, 2013 at 10:54 PM, Yao Qi <yao@codesourcery.com> wrote:
> This patch removes global variable 'last_cache', and initialize
> 'target_dcache' lazily, so that 'target_dcache' can replace
> 'last_cache'. No functionalities should be changed after this patch.
>
> gdb:
>
> 2013-11-02 Yao Qi <yao@codesourcery.com>
>
> * dcache.c (last_cache): Remove.
> (dcache_free, dcache_init): Update.
> (dcache_update):
> (dcache_print_line): Add parameter 'dcache'. Replace
> 'target_dcache' with 'dcache'.
> (dcache_info): Move code to dcache_info_1. Call
> 'dcache_info_1'.
> (dcache_info_1): New function.
> (set_dcache_size): Call target_dcache_invalidate.
> (set_dcache_line_size): Call target_dcache_invalidate.
> * target.c (target_dcache_init_p): New function.
> (target_dcache_invalidate): Check target_dcache_init_p first.
> (target_dcache_get, target_dcache_get_or_init): New function.
> (memory_xfer_partial_1): Adjust.
> (initialize_target): Don't initialize 'target_dcache'.
> * target.h (struct dcache_struct): Declare.
> (target_dcache_get): Declare.
I haven't reviewed the rest of the patches in the series yet,
but as a cleanup to remove last_cache,
this patch is fine with me.