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]

Re: [PATCH] Multiarch DO_REGISTERS_INFO


Elena Zannoni wrote:
> 
> OK to commit?
> 
> 2000-07-28  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
> 
>         * gdbarch.sh: Multiarch DO_REGISTERS_INFO macro.
>         * gdbarch.h, gdbarch.c: Regenerate.

> +typedef void (gdbarch_do_registers_info_ftype) (int reg_nr, int fpregs);
> +extern void gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
> +extern void set_gdbarch_do_registers_info (struct gdbarch *gdbarch, gdbarch_do_registers_info_ftype *do_registers_info);
> +#if GDB_MULTI_ARCH
> +#if (GDB_MULTI_ARCH > 1) || !defined (DO_REGISTERS_INFO)
> +#define DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_do_registers_info (current_gdbarch, reg_nr, fpregs))
> +#endif
> +#endif

Almost.  It should be possible to merge in the lines:

infcmd.c:#if !defined (DO_REGISTERS_INFO)
infcmd.c:#define DO_REGISTERS_INFO(regnum, fp) do_registers_info(regnum,
fp)
infcmd.c:#endif /* no DO_REGISTERS_INFO.  */

do_registers_info() would be the default for both multi and non-multi
cases.

I think REGISTER_NAME() is the correct case to copy.

	Andrew

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