aboutsummaryrefslogtreecommitdiff
path: root/gdb/a29k-pinsn.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-10-06 16:47:32 +0000
committerIan Lance Taylor <ian@airs.com>1994-10-06 16:47:32 +0000
commitb8176214a5bb9810bf6d5244815e9a49c5055dce (patch)
treef85f7b264d7a3748cde6bdf99d131edcaa13da36 /gdb/a29k-pinsn.c
parent97d3151a59022d8d76fd29100052645bd8d99c6b (diff)
downloadgdb-b8176214a5bb9810bf6d5244815e9a49c5055dce.zip
gdb-b8176214a5bb9810bf6d5244815e9a49c5055dce.tar.gz
gdb-b8176214a5bb9810bf6d5244815e9a49c5055dce.tar.bz2
* defs.h: If TARGET_BYTE_ORDER_SELECTABLE is defined by tm.h,
define TARGET_BYTE_ORDER as target_byte_order, and declare target_byte_order as an extern int, and define BITS_BIG_ENDIAN as a test of TARGET_BYTE_ORDER. * top.c: Several additions if TARGET_BYTE_ORDER_SELECTABLE is defined: (endianlist, target_byte_order): New variables. (set_endian, set_endian_big, set_endian_little): New functions. (show_endian): New function. (init_cmd_lists): Initialize endianlist. (init_main): Add commands ``set endian big'', ``set endian little'', and ``show endian''. * a29k-pinsn.c: Rewrite uses of TARGET_BYTE_ORDER and BITS_BIG_ENDIAN to switch at run time rather than at compile time. * coffread.c, dwarfread.c, findvar.c, mips-tdep.c: Likewise. * remote-os9k.c, stabsread.c, valarith.c, valprint.c: Likewise. * values.c: Likewise. * mips-tdep.c: Rewrite uses of GDB_TARGET_IS_MIPS64 to switch at run time rather than at compile time.
Diffstat (limited to 'gdb/a29k-pinsn.c')
-rw-r--r--gdb/a29k-pinsn.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/a29k-pinsn.c b/gdb/a29k-pinsn.c
index a90cdc0..70e8e5b 100644
--- a/gdb/a29k-pinsn.c
+++ b/gdb/a29k-pinsn.c
@@ -33,9 +33,8 @@ print_insn (memaddr, stream)
GDB_INIT_DISASSEMBLE_INFO(info, stream);
-#if TARGET_BYTE_ORDER == BIG_ENDIAN
- return print_insn_big_a29k (memaddr, &info);
-#else
- return print_insn_little_a29k (memaddr, &info);
-#endif
+ if (TARGET_BYTE_ORDER == BIG_ENDIAN)
+ return print_insn_big_a29k (memaddr, &info);
+ else
+ return print_insn_little_a29k (memaddr, &info);
}