From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elena Zannoni To: gdb-patches@sources.redhat.com Subject: Re: [RFA] Multiarch tm_print_insn Date: Wed, 05 Sep 2001 17:07:00 -0000 Message-id: <15254.49173.249320.554376@krustylu.cygnus.com> References: <15234.61471.459368.455580@krustylu.cygnus.com> <3B82FDD5.7000306@cygnus.com> X-SW-Source: 2001-09/msg00051.html 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 > > > > * 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. > > > > >