This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]