This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Multiarch tm_print_insn
- To: gdb-patches at sources dot redhat dot com
- Subject: Re: [RFA] Multiarch tm_print_insn
- From: Elena Zannoni <ezannoni at cygnus dot com>
- Date: Wed, 5 Sep 2001 20:15:17 -0400
- References: <15234.61471.459368.455580@krustylu.cygnus.com><3B82FDD5.7000306@cygnus.com>
Andrew Cagney writes:
> > This patch multiarches tm_print_insn.
> > I changed all the direct callers to (*tm_print_insn), to use
> > the multiarch macro TARGET_PRINT_INSN.
> >
> > If a target doesn't set the multiarch function, gdb falls back to
> > using the global, via an access function called legacy_print_insn.
>
> Er, wow, yes it works! Long ago when I first started multi-arching
> stuff I put that one in the too hard basket.
>
> Any way, ok by me.
>
I committed the code changes, will commit the doc changes when Eli
approves them.
> --
>
> Several things I noticed if you're looking for a second pass.
>
> Both chris-tdep.c and d10v-tdep.c might as well initialize the
> multi-arch field?
>
Could, yes.
> Should I add ``/tm_print_insn = /'' to the ARI?
>
Yes.
> The d10v-tdep.c, at least, has the same bug that Keith just fixed in
> printcmd.c!!
>
Ah, I'll look for that.
Elena
> Andrew
>
> > Elena
> >
> > 2001-08-01 Elena Zannoni <ezannoni@redhat.com>
> >
> > * gdbarch.sh: Move include of dis-asm.h so it is generated earlier
> > in gdbarch.h.
> > (TARGET_PRINT_INSN): Multiarch.
> > * gdbarch.h: Regenerate.
> > * gdbarch.c: Regenerate.
> >
> > * arch-utils.c (legacy_print_insn): New function.
> > * arch-utils.h (legacy_print_insn): Export.
> >
> > * cris-tdep.c (cris_delayed_get_disassembler): Use
> > TARGET_PRINT_INSN, instead of tm_print_insn.
> > * d10v-tdep.c (print_insn): Ditto.
> > * d30v-tdep.c (print_insn): Ditto.
> > * m32r-tdep.c (dump_insn): Ditto.
> > * v850-tdep.c (v850_scan_prologue): Ditto.
> > * mcore-tdep.c (mcore_dump_insn): Ditto.
> > * sh-tdep.c (sh_gdbarch_init): Set print_insn gdbarch field.
> >
> >
>