This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Multiarch DO_REGISTERS_INFO
- To: Elena Zannoni <ezannoni at cygnus dot com>
- Subject: Re: [PATCH] Multiarch DO_REGISTERS_INFO
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sat, 29 Jul 2000 12:49:49 +1000
- CC: gdb-patches at sourceware dot cygnus dot com
- References: <14721.56903.448617.375558@kwikemart.cygnus.com>
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