This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 03/10] Move target-dcache out of target.c
- 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 12:09:07 -0800
- Subject: Re: [PATCH 03/10] Move target-dcache out of target.c
- Authentication-results: sourceware.org; auth=none
- References: <1383458049-20893-1-git-send-email-yao at codesourcery dot com> <1383458049-20893-4-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 moves target_dcache related code out of target.c.
>
> gdb:
>
> 2013-11-02 Yao Qi <yao@codesourcery.com>
>
> * Makefile.in (SFILES):Add target-dcache.c.
> (HFILES_NO_SRCDIR): Add target-dcache.h.
> (COMMON_OBS): Add target-dcache.o.
> * dcache.c: Remove inclusion to "target.h". Include
> "target-dcache.h".
> * memattr.c: Include "target-dcache.h".
> * top.c: Likewise.
> * tracepoint.c: Likewise.
> * target.c: (stack_cache_enabled_p_1): Move to
> target-dcache.c.
> (stack_cache_enabled_p): Likewise.
> (set_stack_cache_enabled_p): Likewise.
> (show_stack_cache_enabled_p): Likewise.
> (target_dcache, target_dcache_init_p): Likewise.
> (target_dcache_invalidate): Likewise.
> (target_dcache_get, target_dcache_get_or_init): Likewise.
> (memory_xfer_partial_1): Call function stack_cache_enabled.
> (initialize_target): Move code to target-dcache.c.
> * target.h (target_dcache_invalidate): Move to
> target-dcache.h.
> (target_dcache_get): Likewise.
> * target-dcache.c: New.
> * target-dcahce.h: New.
Typo in changelog entry for target-dcache.h.
Plus target-dcache.h needs #ifndef TARGET_DCACHE_H/etc.
Ok with those changes.
[For a later cleanup I would rename stack_cache_enabled() to
stack_cache_enabled_p(), and rename the underlying variables of
course. I wouldn't do that in this patch of course since it's good to
keep the moving of code in a patch onto itself.]