aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtk.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1996-07-15 23:54:39 +0000
committerStu Grossman <grossman@cygnus>1996-07-15 23:54:39 +0000
commit91550191be931f2f981a3ece49260af7a8e40b4c (patch)
tree298de2cf8df2392d663cf5dfa3903920c871454a /gdb/gdbtk.c
parent3cc21bf6026d36d26f8a250e0005727042c663af (diff)
downloadgdb-91550191be931f2f981a3ece49260af7a8e40b4c.zip
gdb-91550191be931f2f981a3ece49260af7a8e40b4c.tar.gz
gdb-91550191be931f2f981a3ece49260af7a8e40b4c.tar.bz2
* defs.h printcmd.c: Create global disassemble_info structure
tm_print_insn_info. * gdbtk.c (gdb_disassemble): Setup di.mach from tm_print_insn_info.mach, and set endian from TARGET_BYTE_ORDER. * i386-tdep.c (set_assembly_language_command): set tm_print_insn_info.mach to the appropriate value for 386 or 8086 disassembly. * printcmd.c (print_insn): Move init of disassembler_info to _initialize_printcmd. Set endian for disassembler here. * sparc-tdep.c: Set tm_print_insn_info.mach as appropriate to select sparc/sparclite. * config/sparc/{tm-sparc.h tm-sparclite.h}: Get rid of TM_PRINT_INSN. Set TM_PRINT_INSN_MACH to bfd_mach_sparc/bfd_mach_sparc_sparclite.
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r--gdb/gdbtk.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c
index 22ef00c..dc57672 100644
--- a/gdb/gdbtk.c
+++ b/gdb/gdbtk.c
@@ -891,13 +891,19 @@ gdb_disassemble (clientData, interp, argc, argv)
if (! di_initialized)
{
- INIT_DISASSEMBLE_INFO (di, gdb_stdout,
- (fprintf_ftype) fprintf_unfiltered);
+ INIT_DISASSEMBLE_INFO_NO_ARCH (di, gdb_stdout,
+ (fprintf_ftype) fprintf_unfiltered);
di.memory_error_func = dis_asm_memory_error;
di.print_address_func = dis_asm_print_address;
di_initialized = 1;
}
+ di.mach = tm_print_insn_info.mach;
+ if (TARGET_BYTE_ORDER == BIG_ENDIAN)
+ tm_print_insn_info.endian = BFD_ENDIAN_BIG;
+ else
+ tm_print_insn_info.endian = BFD_ENDIAN_LITTLE;
+
if (argc != 3 && argc != 4)
error ("wrong # args");