This is the mail archive of the gdb-patches@sourceware.org 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]

[patch] Use disassemble_info to get at the endianness


Hi,

this patch gets rid of another current_gdbarch by getting the endianess information from
disassemble_info in score-tdep.

Ok ?

ChangeLog:

	* score-tdep.c (score_print_insn): Get the current endianness from
	disassemble_info instead of gdbarch_byte_order.

Regards,
Markus

--
 Markus Deuling
 GNU Toolchain for Linux on Cell BE
 deuling@de.ibm.com

diff -urpN src/gdb/score-tdep.c dev/gdb/score-tdep.c
--- src/gdb/score-tdep.c	2008-04-24 05:51:39.000000000 +0200
+++ dev/gdb/score-tdep.c	2008-05-16 08:20:49.000000000 +0200
@@ -314,7 +314,7 @@ score_register_sim_regno (struct gdbarch
 static int
 score_print_insn (bfd_vma memaddr, struct disassemble_info *info)
 {
-  if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+  if (info->endian == BFD_ENDIAN_BIG)
     return print_insn_big_score (memaddr, info);
   else
     return print_insn_little_score (memaddr, info);

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