From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Elena Zannoni Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Multiarch tm_print_insn Date: Tue, 21 Aug 2001 17:33:00 -0000 Message-id: <3B82FDD5.7000306@cygnus.com> References: <15234.61471.459368.455580@krustylu.cygnus.com> X-SW-Source: 2001-08/msg00256.html > 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 > > * 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. > >