diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2001-09-05 23:44:44 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2001-09-05 23:44:44 +0000 |
commit | 2bf0cb65923ab3e2fafe3304af2aa95a24822cf9 (patch) | |
tree | 581e882359913fb6e130fe161676385b4e13a574 /gdb/gdbarch.h | |
parent | a4f30b31c8bdfd8723b0a19c6220785ecd63473a (diff) | |
download | binutils-gdb-2bf0cb65923ab3e2fafe3304af2aa95a24822cf9.tar.gz |
2001-09-05 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.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index f2a10332e1d..29ed0208567 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -35,6 +35,8 @@ #ifndef GDBARCH_H #define GDBARCH_H +#include "dis-asm.h" /* Get defs for disassemble_info, which unfortunately is a typedef. */ + struct frame_info; struct value; @@ -1948,6 +1950,23 @@ extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_s #endif /* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN) +#define TARGET_PRINT_INSN(vma, info) (legacy_print_insn (vma, info)) +#endif + +typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, disassemble_info *info); +extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info); +extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN) +#error "Non multi-arch definition of TARGET_PRINT_INSN" +#endif +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PRINT_INSN) +#define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info)) +#endif +#endif + +/* Default (function) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE) #define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc)) #endif @@ -2205,8 +2224,6 @@ extern const struct bfd_arch_info *target_architecture; /* The target-system-dependent disassembler is semi-dynamic */ -#include "dis-asm.h" /* Get defs for disassemble_info */ - extern int dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr, unsigned int len, disassemble_info *info); @@ -2218,9 +2235,6 @@ extern void dis_asm_print_address (bfd_vma addr, extern int (*tm_print_insn) (bfd_vma, disassemble_info*); extern disassemble_info tm_print_insn_info; -#ifndef TARGET_PRINT_INSN -#define TARGET_PRINT_INSN(vma, info) (*tm_print_insn) (vma, info) -#endif #ifndef TARGET_PRINT_INSN_INFO #define TARGET_PRINT_INSN_INFO (&tm_print_insn_info) #endif |