From: Doug Evans <xdje42@gmail.com>
To: Yao Qi <yao@codesourcery.com>
Cc: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Delegate to target_ops->beneath to read cache lines
Date: Fri, 29 Nov 2013 20:06:00 -0000 [thread overview]
Message-ID: <CAP9bCMTpcUJ_Okp8XwBhCQefsKrfkUo4iKcrv8B_Xip4Hc+h8w@mail.gmail.com> (raw)
In-Reply-To: <52980180.1050000@codesourcery.com>
On Thu, Nov 28, 2013 at 6:52 PM, Yao Qi <yao@codesourcery.com> wrote:
> [...]
> 2013-11-29 Yao Qi <yao@codesourcery.com>
> Pedro Alves <palves@redhat.com>
>
> * dcache.c (dcache_read_line): Use current_target.beneath
> instead of ¤t_target.
> * target.c (memory_xfer_partial_1): Factor code out to ...
> (raw_memory_xfer_partial): ... it. New function.
> (target_xfer_partial): Call raw_memory_xfer_partial if OBJECT
> is TARGET_OBJECT_RAW_MEMORY.
> ---
> gdb/dcache.c | 4 +-
> gdb/target.c | 67 ++++++++++++++++++++++++++++++++--------------------------
> 2 files changed, 39 insertions(+), 32 deletions(-)
>
> diff --git a/gdb/dcache.c b/gdb/dcache.c
> index ea2b732..12d1a4b 100644
> --- a/gdb/dcache.c
> +++ b/gdb/dcache.c
> @@ -336,8 +336,8 @@ dcache_read_line (DCACHE *dcache, struct dcache_block *db)
> len -= reg_len;
> continue;
> }
> -
> - res = target_read (¤t_target, TARGET_OBJECT_RAW_MEMORY,
> +
> + res = target_read (current_target.beneath, TARGET_OBJECT_RAW_MEMORY,
> NULL, myaddr, memaddr, reg_len);
> if (res < reg_len)
> return 0;
> [...]
I think a comment is required here explaining why things are the way they are.
i.e., why we use current_target.beneath instead of ¤t_target.
next prev parent reply other threads:[~2013-11-29 19:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 12:41 Yao Qi
2013-11-27 15:27 ` Pedro Alves
2013-11-29 11:12 ` Yao Qi
2013-11-29 13:47 ` Pedro Alves
2013-11-29 14:00 ` Yao Qi
2013-11-29 14:27 ` Pedro Alves
2013-11-29 20:06 ` Doug Evans [this message]
2013-11-29 20:16 ` Pedro Alves
2013-12-02 6:07 ` Yao Qi
2013-12-02 10:36 ` Pedro Alves
2013-12-02 11:04 ` Yao Qi
2013-12-02 11:12 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP9bCMTpcUJ_Okp8XwBhCQefsKrfkUo4iKcrv8B_Xip4Hc+h8w@mail.gmail.com \
--to=xdje42@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox