Re: [RFA] ppc: include register numbers in gdbarch_tdep structure.

Michael Snyder
2001-12-10T19:33:35Z

Elena Zannoni wrote:

> +++ ppc-bdm.c 2001/12/09 19:55:12
> @@ -200,8 +200,8 @@ bdm_ppc_fetch_registers (int regno)
> /* printf("Asking for register %d\n", first_regno); */
>
> /* if asking for an invalid register */
> - if ((first_regno == PPC_MQ_REGNUM) ||
> - ((first_regno >= FP0_REGNUM) && (first_regno <= FPLAST_REGNUM)))
> + if ((first_regno == gdbarch_tdep (current_gdbarch)->ppc_mq_regnum)
> + || ((first_regno >= FP0_REGNUM) && (first_regno <= FPLAST_REGNUM)))

[and many similar changes]

Not to be nit-picky, and I realize it's already been approved and
committed,
but wouldn't this code look prettier if we simply provided something
like:

#define PPC_MQ_REGNUM gdbarch_tdep (current_gdbarch)->ppc_mq_regnum