This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 11/13] TILEGX Linux: Fill 'collect_regset' in regset structure.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: arnez at linux dot vnet dot ibm dot com (Andreas Arnez)
- Cc: gdb-patches at sourceware dot org, jiwang at tilera dot com (Jiong Wang)
- Date: Tue, 15 Jul 2014 12:00:52 +0200 (CEST)
- Subject: Re: [PATCH v2 11/13] TILEGX Linux: Fill 'collect_regset' in regset structure.
- Authentication-results: sourceware.org; auth=none
Andreas Arnez wrote:
> gdb/
> * tilegx-linux-tdep.c (tilegx_linux_supply_regset): Delete
> function. Move logic to...
> (tilegx_linux_regmap): ... this new register map.
> (TILEGX_GREGS_SIZE): New enum value.
> (tilegx_linux_regset): Refer to register map, replace supply
> method by regcache_supply_regset, and add collect method.
> +static const struct regcache_map_entry tilegx_linux_regmap[] =
> + {
> + { TILEGX_NUM_EASY_REGS, 0 },
Maybe TILEGX_R0_REGNUM instead of 0?
> + { 1, TILEGX_PC_REGNUM },
This seems to get the register size wrong in 32-bit mode; note
that TILEGX_PC_REGNUM has type builtin_func_ptr, which may be
4 bytes in size ...
> + { 1, TILEGX_FAULTNUM_REGNUM },
> + { 0 }
> + };
>
> - if (regnum == gri || regnum == -1)
> - regcache_raw_supply (regcache, gri, ptr);
> - }
> -}
> +enum
> +{
> + TILEGX_GREGS_SIZE = (TILEGX_NUM_EASY_REGS + 2) * tilegx_reg_size
> +};
This doesn't appear to be used here.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com