This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 9/11] Add MN10300_MAX_REGISTER_SIZE (1)
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Alan Hayward <Alan dot Hayward at arm dot com>
- Cc: "gdb-patches\@sourceware.org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Fri, 05 May 2017 22:39:39 +0100
- Subject: Re: [PATCH 9/11] Add MN10300_MAX_REGISTER_SIZE (1)
- Authentication-results: sourceware.org; auth=none
- References: <466CF7AB-4D05-4A4B-9FB9-80513E7ABF1C@arm.com> <46AF143B-DD13-4156-A63A-4F3BCDD22497@arm.com>
Alan Hayward <Alan.Hayward@arm.com> writes:
> diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c
> index 8c23f02b2b58b29b10a65df5ae0b4bcdce2925cd..44707e8e241d0fddfb4f1e24821941bf6679b9a3 100644
> --- a/gdb/mn10300-linux-tdep.c
> +++ b/gdb/mn10300-linux-tdep.c
> @@ -86,7 +86,6 @@ am33_supply_gregset_method (const struct regset *regset,
> struct regcache *regcache,
> int regnum, const void *gregs, size_t len)
> {
> - char zerobuf[MAX_REGISTER_SIZE];
> const mn10300_elf_greg_t *regp = (const mn10300_elf_greg_t *) gregs;
> int i;
>
> @@ -188,17 +187,13 @@ am33_supply_gregset_method (const struct regset *regset,
>
> /* ssp, msp, and usp are inaccessible. */
As this comment explained, these registers are inaccessible, so we can
treat them unavailable, then, we just do
regcache_raw_supply (regcache, E_E8_REGNUM, NULL);
but this changes the functionality. I don't know about this
architecture.
> case E_E8_REGNUM:
> - memset (zerobuf, 0, MAX_REGISTER_SIZE);
> - regcache_raw_supply (regcache, E_E8_REGNUM, zerobuf);
> + regcache->raw_supply_zeroed (E_E8_REGNUM);
> break;
Your patch is still good to me, as it doesn't change the functionality.
--
Yao (齐尧)