[RFA] Multiarch tm_print_insn
Andrew Cagney
ac131313@cygnus.com
Tue Aug 21 17:33:00 GMT 2001
> 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.
--
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?
Should I add ``/tm_print_insn = /'' to the ARI?
The d10v-tdep.c, at least, has the same bug that Keith just fixed in
printcmd.c!!
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.
>
>
More information about the Gdb-patches
mailing list