This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] fix setting of disassembler->mach


Hello,

Stumbled across this when testing the e500. The disassemble_info.mach was being set using the wrong global varable. This fixes the .mach initialization and, while I'm at it, simplifies the .endian initialization.

committed,
Andrew

(things to do just gained deprecate TARGET_PRINT_INSN_INFO).
2003-03-17  Andrew Cagney  <cagney at redhat dot com>

	* disasm.c (gdb_disassembly): Set di.mach using the architecture's
	BFD.  Simplify setting of di.endian.

Index: disasm.c
===================================================================
RCS file: /cvs/src/src/gdb/disasm.c,v
retrieving revision 1.4
diff -u -r1.4 disasm.c
--- disasm.c	3 Feb 2003 01:18:37 -0000	1.4
+++ disasm.c	17 Mar 2003 19:53:17 -0000
@@ -338,11 +338,8 @@
       di_initialized = 1;
     }
 
-  di.mach = TARGET_PRINT_INSN_INFO->mach;
-  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-    di.endian = BFD_ENDIAN_BIG;
-  else
-    di.endian = BFD_ENDIAN_LITTLE;
+  di.mach = gdbarch_bfd_arch_info (current_gdbarch)->mach;
+  di.endian = gdbarch_byte_order (current_gdbarch);
 
   /* If gdb_disassemble_from_exec == -1, then we use the following heuristic to
      determine whether or not to do disassembly from target memory or from the

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]