From: Simon Marchi <simon.marchi@polymtl.ca>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 03/10] Remove regcache_save and regcache_cpy
Date: Sat, 17 Feb 2018 02:07:00 -0000 [thread overview]
Message-ID: <cdc26167f649c5e5510b151bf1a69052@polymtl.ca> (raw)
In-Reply-To: <1517999572-14987-4-git-send-email-yao.qi@linaro.org>
On 2018-02-07 05:32, Yao Qi wrote:
> --- a/gdb/regcache.h
> +++ b/gdb/regcache.h
> @@ -198,20 +198,10 @@ extern struct type *register_type (struct
> gdbarch *gdbarch, int regnum);
>
> extern int register_size (struct gdbarch *gdbarch, int regnum);
>
> -
> -/* Save/restore a register cache. The set of registers saved /
> - restored into the DST regcache determined by the save_reggroup /
> - restore_reggroup respectively. COOKED_READ returns zero iff the
> - register's value can't be returned. */
> -
> typedef enum register_status (regcache_cooked_read_ftype) (void *src,
> int regnum,
> gdb_byte *buf);
>
> -extern void regcache_save (struct regcache *dst,
> - regcache_cooked_read_ftype *cooked_read,
> - void *cooked_read_context);
> -
> enum regcache_dump_what
> {
> regcache_dump_none, regcache_dump_raw,
> @@ -317,7 +307,14 @@ public:
> return m_aspace;
> }
>
> +/* Save/restore a register cache. The set of registers saved /
> + restored into the regcache determined by the save_reggroup /
> + restore_reggroup respectively. COOKED_READ returns zero iff the
> + register's value can't be returned. */
> void save (regcache_cooked_read_ftype *cooked_read, void *src);
> + /* Writes to regcache will go through to the target. SRC is a
> + read-only register cache. */
> + void restore (struct regcache *src);
Nit: add an empty line after the declaration of save.
Also, would it be possible to improve the comment of save? I read them
multiple times, and I still haven't figured out what the function does
exactly. It saves the content of this regcache in another regcache? Or
it saves another regcache in this regcache? How are the parameters used
exactly?
Simon
next prev parent reply other threads:[~2018-02-17 2:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 10:33 [PATCH 00/10 v2] Remove regcache::m_readonly_p Yao Qi
2018-02-07 10:33 ` [PATCH 08/10] " Yao Qi
2018-02-07 10:33 ` [PATCH 10/10] Pass readable_regcache to gdbarch method read_pc Yao Qi
2018-02-07 10:33 ` [PATCH 03/10] Remove regcache_save and regcache_cpy Yao Qi
2018-02-17 2:07 ` Simon Marchi [this message]
2018-02-07 10:33 ` [PATCH 07/10] No longer create readonly regcache Yao Qi
2018-02-07 10:33 ` [PATCH 09/10] Move register_dump to regcache-dump.c Yao Qi
2018-02-17 3:50 ` Simon Marchi
2018-02-21 8:27 ` Yao Qi
2018-02-21 12:57 ` Simon Marchi
2018-02-21 13:59 ` Yao Qi
2018-02-21 14:49 ` Simon Marchi
2018-02-07 10:33 ` [PATCH 05/10] Class detached_regcache Yao Qi
2018-02-17 3:15 ` Simon Marchi
2018-02-07 10:33 ` [PATCH 02/10] class readable_regcache and pass readable_regcache to gdbarch pseudo_register_read and pseudo_register_read_value Yao Qi
2018-02-07 10:33 ` [PATCH 04/10] Class readonly_detached_regcache Yao Qi
2018-02-07 10:33 ` [PATCH 01/10] Class reg_buffer Yao Qi
2018-02-17 3:53 ` [PATCH 00/10 v2] Remove regcache::m_readonly_p Simon Marchi
2018-02-21 11:22 ` Yao Qi
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=cdc26167f649c5e5510b151bf1a69052@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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