This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add support for Tilera TILE-Gx processor (part 2/2: gdbserver)
On 04/23/2012 08:59 PM, Jeff Kenton wrote:
> +static void
> +tile_store_gregset (struct regcache *regcache, const void *buf)
> +{
> + int i;
> + char zerobuf[8];
> +
> + memset (zerobuf, 0, 8);
> + for (i = 0; i < tile_num_regs; i++)
> + if (tile_regmap[i] != -1)
> + supply_register (regcache, i, ((unsigned long *) buf) + tile_regmap[i]);
> + else
> + supply_register (regcache, i, zerobuf);
> +}
If the register isn't available, then you should call
"supply_register (regcache, i, NULL)" (or don't call anything), and
then GDB will show "<unavailable>".
--
Pedro Alves