2001-12-15 Andrew Cagney * defs.h (BIG_ENDIAN): Delete macro definition. * a29k-tdep.c, arch-utils.c, arm-tdep.c, ax-gdb.c, ch-exp.c, coffread.c, cris-tdep.c, d10v-tdep.c, d30v-tdep.c, defs.h, findvar.c, infcmd.c, mem-break.c, mips-tdep.c, mn10300-tdep.c, printcmd.c, remote-os9k.c, remote-rdi.c, remote-rdp.c, remote-sim.c, remote.c, rs6000-tdep.c, sh-tdep.c, sparcl-tdep.c, stabsread.c, valops.c, valprint.c, config/a29k/tm-a29k.h, config/a29k/tm-vx29k.h, config/arm/tm-arm.h, config/d30v/tm-d30v.h, config/fr30/tm-fr30.h, config/h8300/tm-h8300.h, config/h8500/tm-h8500.h, config/m32r/tm-m32r.h, config/m68k/tm-m68k.h, config/m88k/tm-m88k.h, config/mips/tm-mips.h, config/pa/tm-hppa.h, config/sparc/tm-sparc.h, config/z8k/tm-z8k.h, mi/mi-cmd-disas.c, mi/mi-main.c, gdbarch.sh: Replace BIG_ENDIAN with BFD_ENDIAN_BIG. * gdbarch.c: Re-generate. 2001-12-15 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace BIG_ENDIAN with BFD_ENDIAN_BIG. Index: a29k-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/a29k-tdep.c,v retrieving revision 1.5 diff -u -r1.5 a29k-tdep.c --- a29k-tdep.c 2001/03/06 08:21:05 1.5 +++ a29k-tdep.c 2001/12/15 18:09:02 @@ -914,7 +914,7 @@ int gdb_print_insn_a29k (bfd_vma memaddr, disassemble_info *info) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return print_insn_big_a29k (memaddr, info); else return print_insn_little_a29k (memaddr, info); Index: arch-utils.c =================================================================== RCS file: /cvs/src/src/gdb/arch-utils.c,v retrieving revision 1.43 diff -u -r1.43 arch-utils.c --- arch-utils.c 2001/12/15 16:53:22 1.43 +++ arch-utils.c 2001/12/15 18:09:05 @@ -61,7 +61,7 @@ breakpoint. On some machines, breakpoints are handled by the target environment and we don't have to worry about them here. */ #ifdef BIG_BREAKPOINT - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { static unsigned char big_break_insn[] = BIG_BREAKPOINT; *lenptr = sizeof (big_break_insn); @@ -69,7 +69,7 @@ } #endif #ifdef LITTLE_BREAKPOINT - if (TARGET_BYTE_ORDER != BIG_ENDIAN) + if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG) { static unsigned char little_break_insn[] = LITTLE_BREAKPOINT; *lenptr = sizeof (little_break_insn); @@ -193,7 +193,7 @@ #endif switch (byte_order) { - case BIG_ENDIAN: + case BFD_ENDIAN_BIG: return &floatformat_ieee_single_big; case BFD_ENDIAN_LITTLE: return &floatformat_ieee_single_little; @@ -214,7 +214,7 @@ #endif switch (byte_order) { - case BIG_ENDIAN: + case BFD_ENDIAN_BIG: return &floatformat_ieee_double_big; case BFD_ENDIAN_LITTLE: return &floatformat_ieee_double_little; @@ -400,9 +400,9 @@ #ifdef TARGET_BYTE_ORDER_SELECTABLE /* compat - Catch old targets that expect a selectable byte-order to - default to BIG_ENDIAN */ + default to BFD_ENDIAN_BIG */ #ifndef TARGET_BYTE_ORDER_DEFAULT -#define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN +#define TARGET_BYTE_ORDER_DEFAULT BFD_ENDIAN_BIG #endif #endif #if !TARGET_BYTE_ORDER_SELECTABLE_P @@ -416,7 +416,7 @@ #endif #endif #ifndef TARGET_BYTE_ORDER_DEFAULT -#define TARGET_BYTE_ORDER_DEFAULT BIG_ENDIAN /* arbitrary */ +#define TARGET_BYTE_ORDER_DEFAULT BFD_ENDIAN_BIG /* arbitrary */ #endif /* ``target_byte_order'' is only used when non- multi-arch. Multi-arch targets obtain the current byte order using @@ -443,10 +443,10 @@ { if (TARGET_BYTE_ORDER_AUTO) printf_unfiltered ("The target endianness is set automatically (currently %s endian)\n", - (TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little")); + (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little")); else printf_unfiltered ("The target is assumed to be %s endian\n", - (TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little")); + (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little")); } static void @@ -485,7 +485,7 @@ { struct gdbarch_info info; memset (&info, 0, sizeof info); - info.byte_order = BIG_ENDIAN; + info.byte_order = BFD_ENDIAN_BIG; if (! gdbarch_update_p (info)) { printf_unfiltered ("Big endian target not supported by GDB\n"); @@ -493,7 +493,7 @@ } else { - target_byte_order = BIG_ENDIAN; + target_byte_order = BFD_ENDIAN_BIG; } } else @@ -515,24 +515,24 @@ int want; if (bfd_big_endian (abfd)) - want = BIG_ENDIAN; + want = BFD_ENDIAN_BIG; else want = BFD_ENDIAN_LITTLE; if (TARGET_BYTE_ORDER_AUTO) target_byte_order = want; else if (TARGET_BYTE_ORDER != want) warning ("%s endian file does not match %s endian target.", - want == BIG_ENDIAN ? "big" : "little", - TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little"); + want == BFD_ENDIAN_BIG ? "big" : "little", + TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little"); } else { if (bfd_big_endian (abfd) - ? TARGET_BYTE_ORDER != BIG_ENDIAN - : TARGET_BYTE_ORDER == BIG_ENDIAN) + ? TARGET_BYTE_ORDER != BFD_ENDIAN_BIG + : TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) warning ("%s endian file does not match %s endian target.", bfd_big_endian (abfd) ? "big" : "little", - TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little"); + TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? "big" : "little"); } } @@ -768,7 +768,7 @@ switch (default_bfd_vec->byteorder) { case BFD_ENDIAN_BIG: - info.byte_order = BIG_ENDIAN; + info.byte_order = BFD_ENDIAN_BIG; break; case BFD_ENDIAN_LITTLE: info.byte_order = BFD_ENDIAN_LITTLE; @@ -790,7 +790,7 @@ if (info.byte_order == 0) { /* Wire it to big-endian!!! */ - info.byte_order = BIG_ENDIAN; + info.byte_order = BFD_ENDIAN_BIG; } if (GDB_MULTI_ARCH) Index: arm-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/arm-tdep.c,v retrieving revision 1.19 diff -u -r1.19 arm-tdep.c --- arm-tdep.c 2001/12/05 08:36:01 1.19 +++ arm-tdep.c 2001/12/15 18:09:21 @@ -1452,7 +1452,7 @@ { if (regnum >= F0_REGNUM && regnum < F0_REGNUM + NUM_FREGS) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return builtin_type_arm_ext_big; else return builtin_type_arm_ext_littlebyte_bigword; @@ -1470,7 +1470,7 @@ convert_from_extended (void *ptr, void *dbl) { DOUBLEST d; - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) floatformat_to_doublest (&floatformat_arm_ext_big, ptr, &d); else floatformat_to_doublest (&floatformat_arm_ext_littlebyte_bigword, @@ -1483,7 +1483,7 @@ { DOUBLEST d; floatformat_to_doublest (TARGET_DOUBLE_FORMAT, ptr, &d); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) floatformat_from_doublest (&floatformat_arm_ext_big, &d, dbl); else floatformat_from_doublest (&floatformat_arm_ext_littlebyte_bigword, @@ -1902,7 +1902,7 @@ else info->symbols = NULL; - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return print_insn_big_arm (memaddr, info); else return print_insn_little_arm (memaddr, info); @@ -1921,7 +1921,7 @@ { if (arm_pc_is_thumb (*pcptr) || arm_pc_is_thumb_dummy (*pcptr)) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { static char thumb_breakpoint[] = THUMB_BE_BREAKPOINT; *pcptr = UNMAKE_THUMB_ADDR (*pcptr); @@ -1938,7 +1938,7 @@ } else { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { static char arm_breakpoint[] = ARM_BE_BREAKPOINT; *lenptr = sizeof (arm_breakpoint); Index: ax-gdb.c =================================================================== RCS file: /cvs/src/src/gdb/ax-gdb.c,v retrieving revision 1.10 diff -u -r1.10 ax-gdb.c --- ax-gdb.c 2001/08/11 00:59:29 1.10 +++ ax-gdb.c 2001/12/15 18:09:36 @@ -1303,7 +1303,7 @@ the sign/zero extension will wipe them out. - If we're in the interior of the word, then there is no garbage on either end, because the ref operators zero-extend. */ - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) gen_left_shift (ax, end - (offset + op_size)); else gen_left_shift (ax, offset - start); Index: ch-exp.c =================================================================== RCS file: /cvs/src/src/gdb/ch-exp.c,v retrieving revision 1.9 diff -u -r1.9 ch-exp.c --- ch-exp.c 2001/03/27 20:36:23 1.9 +++ ch-exp.c 2001/12/15 18:09:54 @@ -1883,15 +1883,15 @@ else { /* Extract bits from digit, packing them into the bitstring byte. */ - int k = TARGET_BYTE_ORDER == BIG_ENDIAN ? bits_per_char - 1 : 0; - for (; TARGET_BYTE_ORDER == BIG_ENDIAN ? k >= 0 : k < bits_per_char; - TARGET_BYTE_ORDER == BIG_ENDIAN ? k-- : k++) + int k = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? bits_per_char - 1 : 0; + for (; TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k >= 0 : k < bits_per_char; + TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k-- : k++) { bitcount++; if (digit & (1 << k)) { tempbuf[tempbufindex] |= - (TARGET_BYTE_ORDER == BIG_ENDIAN) + (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? (1 << (HOST_CHAR_BIT - 1 - bitoffset)) : (1 << bitoffset); } Index: coffread.c =================================================================== RCS file: /cvs/src/src/gdb/coffread.c,v retrieving revision 1.21 diff -u -r1.21 coffread.c --- coffread.c 2001/12/02 22:38:23 1.21 +++ coffread.c 2001/12/15 18:10:00 @@ -1592,7 +1592,7 @@ SYMBOL_CLASS (sym) = LOC_ARG; add_symbol_to_list (sym, &local_symbols); #if !defined (BELIEVE_PCC_PROMOTION) - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { /* If PCC says a parameter is a short or a char, aligned on an int boundary, realign it to the Index: cris-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/cris-tdep.c,v retrieving revision 1.7 diff -u -r1.7 cris-tdep.c --- cris-tdep.c 2001/12/15 16:53:22 1.7 +++ cris-tdep.c 2001/12/15 18:10:28 @@ -3803,7 +3803,7 @@ /* Ok. */ break; - case BIG_ENDIAN: + case BFD_ENDIAN_BIG: internal_error (__FILE__, __LINE__, "cris_gdbarch_init: big endian byte order in info"); break; Index: d10v-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/d10v-tdep.c,v retrieving revision 1.30 diff -u -r1.30 d10v-tdep.c --- d10v-tdep.c 2001/12/15 16:53:22 1.30 +++ d10v-tdep.c 2001/12/15 18:10:40 @@ -1268,7 +1268,7 @@ internal_error (__FILE__, __LINE__, "print_insn: no disassembler"); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) tm_print_insn_info.endian = BFD_ENDIAN_BIG; else tm_print_insn_info.endian = BFD_ENDIAN_LITTLE; @@ -1523,7 +1523,7 @@ set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT); switch (info.byte_order) { - case BIG_ENDIAN: + case BFD_ENDIAN_BIG: set_gdbarch_float_format (gdbarch, &floatformat_ieee_single_big); set_gdbarch_double_format (gdbarch, &floatformat_ieee_single_big); set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big); Index: d30v-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/d30v-tdep.c,v retrieving revision 1.11 diff -u -r1.11 d30v-tdep.c --- d30v-tdep.c 2001/09/05 23:44:43 1.11 +++ d30v-tdep.c 2001/12/15 18:10:46 @@ -1152,7 +1152,7 @@ internal_error (__FILE__, __LINE__, "print_insn: no disassembler"); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) tm_print_insn_info.endian = BFD_ENDIAN_BIG; else tm_print_insn_info.endian = BFD_ENDIAN_LITTLE; Index: defs.h =================================================================== RCS file: /cvs/src/src/gdb/defs.h,v retrieving revision 1.68 diff -u -r1.68 defs.h --- defs.h 2001/12/15 16:53:22 1.68 +++ defs.h 2001/12/15 18:10:56 @@ -1223,17 +1223,13 @@ #endif /* Not GNU C */ #endif /* alloca not defined */ -/* Get a definition of BIG_ENDIAN and BFD_ENDIAN_LITTLE. */ +/* Get a definition of BFD_ENDIAN_BIG and BFD_ENDIAN_LITTLE. */ /* FIXME: cagney/2001-10-31: GDB should just use BFD's definitions. */ #ifdef HAVE_ENDIAN_H #include #endif -#if !defined (BIG_ENDIAN) -#define BIG_ENDIAN 4321 -#endif - /* Dynamic target-system-dependent parameters for GDB. */ #include "gdbarch.h" #if (GDB_MULTI_ARCH == 0) @@ -1267,7 +1263,7 @@ from byte/word byte order. */ #if !defined (BITS_BIG_ENDIAN) -#define BITS_BIG_ENDIAN (TARGET_BYTE_ORDER == BIG_ENDIAN) +#define BITS_BIG_ENDIAN (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) #endif /* In findvar.c. */ Index: findvar.c =================================================================== RCS file: /cvs/src/src/gdb/findvar.c,v retrieving revision 1.26 diff -u -r1.26 findvar.c --- findvar.c 2001/12/03 08:41:10 1.26 +++ findvar.c 2001/12/15 18:10:59 @@ -66,7 +66,7 @@ /* Start at the most significant end of the integer, and work towards the least significant. */ - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { p = startaddr; /* Do the sign extension once at the start. */ @@ -101,7 +101,7 @@ /* Start at the most significant end of the integer, and work towards the least significant. */ retval = 0; - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { for (p = startaddr; p < endaddr; ++p) retval = (retval << 8) | *p; @@ -126,7 +126,7 @@ int len; len = orig_len; - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { for (p = (char *) addr; len > (int) sizeof (LONGEST) && p < (char *) addr + orig_len; @@ -210,7 +210,7 @@ /* Start at the least significant end of the integer, and work towards the most significant. */ - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { for (p = endaddr - 1; p >= startaddr; --p) { @@ -237,7 +237,7 @@ /* Start at the least significant end of the integer, and work towards the most significant. */ - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { for (p = endaddr - 1; p >= startaddr; --p) { @@ -824,7 +824,7 @@ { /* Raw and virtual formats are the same for this register. */ - if (TARGET_BYTE_ORDER == BIG_ENDIAN && len < REGISTER_RAW_SIZE (regnum)) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && len < REGISTER_RAW_SIZE (regnum)) { /* Big-endian, and we want less than full size. */ VALUE_OFFSET (v) = REGISTER_RAW_SIZE (regnum) - len; Index: gdbarch.c =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.c,v retrieving revision 1.93 diff -u -r1.93 gdbarch.c --- gdbarch.c 2001/12/15 16:53:23 1.93 +++ gdbarch.c 2001/12/15 18:11:18 @@ -269,7 +269,7 @@ { /* basic architecture information */ &bfd_default_arch_struct, - BIG_ENDIAN, + BFD_ENDIAN_BIG, /* target specific vector and its dump routine */ NULL, NULL, /*per-architecture data-pointers and swap regions */ @@ -341,7 +341,6 @@ 0, 0, 0, - 0, generic_get_saved_register, 0, 0, @@ -4725,7 +4724,7 @@ /* From the INFO struct. */ if (info.byte_order == 0 && info.abfd != NULL) - info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN + info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE : 0); /* From the current target. */ @@ -4745,7 +4744,7 @@ fprintf_unfiltered (gdb_stdlog, "gdbarch_update: info.byte_order %d (%s)\n", info.byte_order, - (info.byte_order == BIG_ENDIAN ? "big" + (info.byte_order == BFD_ENDIAN_BIG ? "big" : info.byte_order == BFD_ENDIAN_LITTLE ? "little" : "default")); fprintf_unfiltered (gdb_stdlog, Index: gdbarch.sh =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.sh,v retrieving revision 1.98 diff -u -r1.98 gdbarch.sh --- gdbarch.sh 2001/12/15 16:53:23 1.98 +++ gdbarch.sh 2001/12/15 18:11:20 @@ -349,7 +349,7 @@ cat <printable_name:TARGET_ARCHITECTURE != NULL # -i:2:TARGET_BYTE_ORDER:int:byte_order::::BIG_ENDIAN +i:2:TARGET_BYTE_ORDER:int:byte_order::::BFD_ENDIAN_BIG # Number of bits in a char or unsigned char for the target machine. # Just like CHAR_BIT in but describes the target machine. # v::TARGET_CHAR_BIT:int:char_bit::::8 * sizeof (char):8::0: @@ -2043,7 +2043,7 @@ /* From the INFO struct. */ if (info.byte_order == 0 && info.abfd != NULL) - info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN + info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE : 0); /* From the current target. */ @@ -2063,7 +2063,7 @@ fprintf_unfiltered (gdb_stdlog, "gdbarch_update: info.byte_order %d (%s)\n", info.byte_order, - (info.byte_order == BIG_ENDIAN ? "big" + (info.byte_order == BFD_ENDIAN_BIG ? "big" : info.byte_order == BFD_ENDIAN_LITTLE ? "little" : "default")); fprintf_unfiltered (gdb_stdlog, Index: infcmd.c =================================================================== RCS file: /cvs/src/src/gdb/infcmd.c,v retrieving revision 1.35 diff -u -r1.35 infcmd.c --- infcmd.c 2001/11/27 03:09:44 1.35 +++ infcmd.c 2001/12/15 18:11:29 @@ -1651,7 +1651,7 @@ printf_filtered ("\t(raw 0x"); for (j = 0; j < REGISTER_RAW_SIZE (i); j++) { - register int idx = TARGET_BYTE_ORDER == BIG_ENDIAN ? j + register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j : REGISTER_RAW_SIZE (i) - 1 - j; printf_filtered ("%02x", (unsigned char) raw_buffer[idx]); } Index: mem-break.c =================================================================== RCS file: /cvs/src/src/gdb/mem-break.c,v retrieving revision 1.4 diff -u -r1.4 mem-break.c --- mem-break.c 2001/03/06 08:21:10 1.4 +++ mem-break.c 2001/12/15 18:11:30 @@ -47,7 +47,7 @@ breakpoint. On some machines, breakpoints are handled by the target environment and we don't have to worry about them here. */ #ifdef BIG_BREAKPOINT - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { static unsigned char big_break_insn[] = BIG_BREAKPOINT; *lenptr = sizeof (big_break_insn); @@ -55,7 +55,7 @@ } #endif #ifdef LITTLE_BREAKPOINT - if (TARGET_BYTE_ORDER != BIG_ENDIAN) + if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG) { static unsigned char little_break_insn[] = LITTLE_BREAKPOINT; *lenptr = sizeof (little_break_insn); Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.62 diff -u -r1.62 mips-tdep.c --- mips-tdep.c 2001/12/10 04:58:30 1.62 +++ mips-tdep.c 2001/12/15 18:11:49 @@ -446,7 +446,7 @@ mips_register_convert_to_virtual (int n, struct type *virtual_type, char *raw_buf, char *virt_buf) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) memcpy (virt_buf, raw_buf + (REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)), TYPE_LENGTH (virtual_type)); @@ -461,7 +461,7 @@ char *virt_buf, char *raw_buf) { memset (raw_buf, 0, REGISTER_RAW_SIZE (n)); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) memcpy (raw_buf + (REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)), virt_buf, TYPE_LENGTH (virtual_type)); @@ -2284,7 +2284,7 @@ { if (!FP_REGISTER_DOUBLE && len == 8) { - int low_offset = TARGET_BYTE_ORDER == BIG_ENDIAN ? 4 : 0; + int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0; unsigned long regval; /* Write the low word of the double to the even register(s). */ @@ -2385,7 +2385,7 @@ int longword_offset = 0; CORE_ADDR addr; stack_used_p = 1; - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { if (MIPS_STACK_ARGSIZE == 8 && (typecode == TYPE_CODE_INT || @@ -2457,7 +2457,7 @@ if (!MIPS_EABI && MIPS_SAVED_REGSIZE < 8 - && TARGET_BYTE_ORDER == BIG_ENDIAN + && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && partial_len < MIPS_SAVED_REGSIZE && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)) @@ -2522,7 +2522,7 @@ if (MIPS_SAVED_REGSIZE < REGISTER_RAW_SIZE (regno)) { regsize = MIPS_SAVED_REGSIZE; - offset = (TARGET_BYTE_ORDER == BIG_ENDIAN + offset = (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? REGISTER_RAW_SIZE (regno) - MIPS_SAVED_REGSIZE : 0); } @@ -2719,7 +2719,7 @@ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT) if (FP_REGISTER_DOUBLE) { /* show 8-byte floats as float AND double: */ - int offset = 4 * (TARGET_BYTE_ORDER == BIG_ENDIAN); + int offset = 4 * (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG); printf_filtered (" (float) "); val_print (builtin_type_float, raw_buffer + offset, 0, 0, @@ -2736,7 +2736,7 @@ { int offset; - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) offset = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum); else offset = 0; @@ -2756,8 +2756,8 @@ char *raw_buffer[2]; char *dbl_buffer; /* use HI and LO to control the order of combining two flt regs */ - int HI = (TARGET_BYTE_ORDER == BIG_ENDIAN); - int LO = (TARGET_BYTE_ORDER != BIG_ENDIAN); + int HI = (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG); + int LO = (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG); double doub, flt1, flt2; /* doubles extracted from raw hex data */ int inv1, inv2, inv3; @@ -2806,7 +2806,7 @@ } else { /* eight byte registers: print each one as float AND as double. */ - int offset = 4 * (TARGET_BYTE_ORDER == BIG_ENDIAN); + int offset = 4 * (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG); memcpy (dbl_buffer, raw_buffer[HI], 2 * REGISTER_RAW_SIZE (FP0_REGNUM)); flt1 = unpack_double (builtin_type_float, @@ -2875,7 +2875,7 @@ for (byte = 0; byte < (MIPS_REGSIZE - REGISTER_VIRTUAL_SIZE (regnum)); byte++) printf_filtered (" "); /* Now print the register value in hex, endian order. */ - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) for (byte = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum); byte < REGISTER_RAW_SIZE (regnum); byte++) @@ -3218,9 +3218,9 @@ { /* We need to break a 64bit float in two 32 bit halves and spread them across a floating-point register pair. */ - lo->buf_offset = TARGET_BYTE_ORDER == BIG_ENDIAN ? 4 : 0; - hi->buf_offset = TARGET_BYTE_ORDER == BIG_ENDIAN ? 0 : 4; - lo->reg_offset = ((TARGET_BYTE_ORDER == BIG_ENDIAN + lo->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0; + hi->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 0 : 4; + lo->reg_offset = ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && REGISTER_RAW_SIZE (FP0_REGNUM) == 8) ? 4 : 0); hi->reg_offset = lo->reg_offset; @@ -3233,7 +3233,7 @@ { /* The floating point value fits in a single floating-point register. */ - lo->reg_offset = ((TARGET_BYTE_ORDER == BIG_ENDIAN + lo->reg_offset = ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && REGISTER_RAW_SIZE (FP0_REGNUM) == 8 && len == 4) ? 4 : 0); @@ -3252,7 +3252,7 @@ int regnum = 2; lo->reg = regnum + 0; hi->reg = regnum + 1; - if (TARGET_BYTE_ORDER == BIG_ENDIAN + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && len < MIPS_SAVED_REGSIZE) { /* "un-left-justify" the value in the low register */ @@ -3261,7 +3261,7 @@ hi->reg_offset = 0; hi->len = 0; } - else if (TARGET_BYTE_ORDER == BIG_ENDIAN + else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && len > MIPS_SAVED_REGSIZE /* odd-size structs */ && len < MIPS_SAVED_REGSIZE * 2 && (TYPE_CODE (valtype) == TYPE_CODE_STRUCT || @@ -3289,7 +3289,7 @@ hi->len = 0; } } - if (TARGET_BYTE_ORDER == BIG_ENDIAN + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && REGISTER_RAW_SIZE (regnum) == 8 && MIPS_SAVED_REGSIZE == 4) { @@ -3563,7 +3563,7 @@ memaddr &= (info->mach == bfd_mach_mips16 ? ~1 : ~3); /* Call the appropriate disassembler based on the target endian-ness. */ - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return print_insn_big_mips (memaddr, info); else return print_insn_little_mips (memaddr, info); @@ -3592,7 +3592,7 @@ unsigned char * mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { if (pc_is_mips16 (*pcptr)) { Index: mn10300-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v retrieving revision 1.23 diff -u -r1.23 mn10300-tdep.c --- mn10300-tdep.c 2001/11/25 23:43:43 1.23 +++ mn10300-tdep.c 2001/12/15 18:11:50 @@ -1018,7 +1018,7 @@ else { int byte; - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { for (byte = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum); byte < REGISTER_RAW_SIZE (regnum); Index: printcmd.c =================================================================== RCS file: /cvs/src/src/gdb/printcmd.c,v retrieving revision 1.32 diff -u -r1.32 printcmd.c --- printcmd.c 2001/12/07 21:07:59 1.32 +++ printcmd.c 2001/12/15 18:12:32 @@ -2430,7 +2430,7 @@ static int print_insn (CORE_ADDR memaddr, struct ui_file *stream) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_BIG; else TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_LITTLE; Index: remote-os9k.c =================================================================== RCS file: /cvs/src/src/gdb/remote-os9k.c,v retrieving revision 1.16 diff -u -r1.16 remote-os9k.c --- remote-os9k.c 2001/07/15 20:34:13 1.16 +++ remote-os9k.c 2001/12/15 18:12:34 @@ -258,7 +258,7 @@ for (j = 0; j < 4; j++) { get_hex_byte (&b); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) val = (val << 8) + b; else val = val + (b << (j * 8)); @@ -558,7 +558,7 @@ for (j = 0; j < 2; j++) { get_hex_byte (&b); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) val = (val << 8) + b; else val = val + (b << (j * 8)); @@ -622,7 +622,7 @@ for (j = 0; j < 2; j++) { get_hex_byte (&b); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) val = (val << 8) + b; else val = val + (b << (j * 8)); Index: remote-rdi.c =================================================================== RCS file: /cvs/src/src/gdb/remote-rdi.c,v retrieving revision 1.17 diff -u -r1.17 remote-rdi.c --- remote-rdi.c 2001/06/24 13:46:09 1.17 +++ remote-rdi.c 2001/12/15 18:12:34 @@ -243,7 +243,7 @@ if (rslt != adp_ok) error ("Could not open device \"%s\"", name); - gdb_config.bytesex = 2 | (TARGET_BYTE_ORDER == BIG_ENDIAN ? 1 : 0); + gdb_config.bytesex = 2 | (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 1 : 0); gdb_config.fpe = 1; gdb_config.rditype = 2; gdb_config.heartbeat_on = 1; Index: remote-rdp.c =================================================================== RCS file: /cvs/src/src/gdb/remote-rdp.c,v retrieving revision 1.21 diff -u -r1.21 remote-rdp.c --- remote-rdp.c 2001/12/15 16:53:23 1.21 +++ remote-rdp.c 2001/12/15 18:12:39 @@ -353,7 +353,7 @@ sync = 1; break; case RDP_RES_VALUE_BIG_ENDIAN: - target_byte_order = BIG_ENDIAN; + target_byte_order = BFD_ENDIAN_BIG; sync = 1; break; default: Index: remote-sim.c =================================================================== RCS file: /cvs/src/src/gdb/remote-sim.c,v retrieving revision 1.18 diff -u -r1.18 remote-sim.c --- remote-sim.c 2001/12/15 16:53:23 1.18 +++ remote-sim.c 2001/12/15 18:12:39 @@ -477,7 +477,7 @@ { switch (TARGET_BYTE_ORDER) { - case BIG_ENDIAN: + case BFD_ENDIAN_BIG: strcat (arg_buf, " -E big"); break; case BFD_ENDIAN_LITTLE: Index: remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.70 diff -u -r1.70 remote.c --- remote.c 2001/11/19 20:18:32 1.70 +++ remote.c 2001/12/15 18:12:43 @@ -4660,7 +4660,7 @@ if (val == 0) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) val = target_write_memory (addr, (char *) big_break_insn, sizeof big_break_insn); else Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.31 diff -u -r1.31 rs6000-tdep.c --- rs6000-tdep.c 2001/12/11 22:16:48 1.31 +++ rs6000-tdep.c 2001/12/15 18:12:45 @@ -282,7 +282,7 @@ static unsigned char big_breakpoint[] = BIG_BREAKPOINT; static unsigned char little_breakpoint[] = LITTLE_BREAKPOINT; *bp_size = 4; - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return big_breakpoint; else return little_breakpoint; @@ -299,7 +299,7 @@ static char le_breakp[] = LITTLE_BREAKPOINT; static char be_breakp[] = BIG_BREAKPOINT; - char *breakp = TARGET_BYTE_ORDER == BIG_ENDIAN ? be_breakp : le_breakp; + char *breakp = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? be_breakp : le_breakp; int ii, insn; CORE_ADDR loc; CORE_ADDR breaks[2]; @@ -963,7 +963,7 @@ } else { /* Argument can fit in one register. No problem. */ - int adj = TARGET_BYTE_ORDER == BIG_ENDIAN ? reg_size - len : 0; + int adj = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? reg_size - len : 0; memset (®isters[REGISTER_BYTE (ii + 3)], 0, reg_size); memcpy ((char *)®isters[REGISTER_BYTE (ii + 3)] + adj, VALUE_CONTENTS (arg), len); @@ -1110,7 +1110,7 @@ else { /* return value is copied starting from r3. */ - if (TARGET_BYTE_ORDER == BIG_ENDIAN + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && TYPE_LENGTH (valtype) < REGISTER_RAW_SIZE (3)) offset = REGISTER_RAW_SIZE (3) - TYPE_LENGTH (valtype); @@ -2239,7 +2239,7 @@ /* Select instruction printer. */ tm_print_insn = arch == power ? print_insn_rs6000 : - info.byte_order == BIG_ENDIAN ? print_insn_big_powerpc : + info.byte_order == BFD_ENDIAN_BIG ? print_insn_big_powerpc : print_insn_little_powerpc; /* Choose variant. */ Index: sh-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.c,v retrieving revision 1.41 diff -u -r1.41 sh-tdep.c --- sh-tdep.c 2001/12/15 16:53:23 1.41 +++ sh-tdep.c 2001/12/15 18:12:46 @@ -428,7 +428,7 @@ static int gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return print_insn_sh (memaddr, info); else return print_insn_shl (memaddr, info); @@ -1001,7 +1001,7 @@ if (len <= 4) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) offset = REGISTER_BYTE (return_register) + 4 - len; else offset = REGISTER_BYTE (return_register); @@ -1009,7 +1009,7 @@ } else if (len <= 8) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) offset = REGISTER_BYTE (return_register) + 8 - len; else offset = REGISTER_BYTE (return_register); @@ -1046,7 +1046,7 @@ } else if (len <= 4) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) offset = REGISTER_BYTE (return_register) + 4 - len; else offset = REGISTER_BYTE (return_register); @@ -1054,7 +1054,7 @@ } else if (len <= 8) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) offset = REGISTER_BYTE (return_register) + 8 - len; else offset = REGISTER_BYTE (return_register); @@ -1705,7 +1705,7 @@ printf_filtered ("\t(raw 0x"); for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++) { - register int idx = TARGET_BYTE_ORDER == BIG_ENDIAN ? j + register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j : REGISTER_RAW_SIZE (regnum) - 1 - j; printf_filtered ("%02x", (unsigned char) raw_buffer[idx]); } Index: sparcl-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparcl-tdep.c,v retrieving revision 1.14 diff -u -r1.14 sparcl-tdep.c --- sparcl-tdep.c 2001/07/15 20:34:14 1.14 +++ sparcl-tdep.c 2001/12/15 18:12:46 @@ -622,7 +622,7 @@ sizeof (marker)); if (strncmp (marker.signature, "DaTa", 4) == 0) { - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) section_address = bfd_getb32 (marker.sdata); else section_address = bfd_getl32 (marker.sdata); Index: stabsread.c =================================================================== RCS file: /cvs/src/src/gdb/stabsread.c,v retrieving revision 1.19 diff -u -r1.19 stabsread.c --- stabsread.c 2001/12/12 02:11:51 1.19 +++ stabsread.c 2001/12/15 18:12:50 @@ -1701,7 +1701,7 @@ SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; add_symbol_to_list (sym, &local_symbols); - if (TARGET_BYTE_ORDER != BIG_ENDIAN) + if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG) { /* On little-endian machines, this crud is never necessary, and, if the extra bytes contain garbage, is harmful. */ Index: valops.c =================================================================== RCS file: /cvs/src/src/gdb/valops.c,v retrieving revision 1.44 diff -u -r1.44 valops.c --- valops.c 2001/12/12 02:11:52 1.44 +++ valops.c 2001/12/15 18:12:52 @@ -1055,7 +1055,7 @@ & ~(PARM_BOUNDARY / TARGET_CHAR_BIT - 1)); /* Are we going to put it at the high or low end of the container? */ - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) offset = container_len - len; else offset = 0; Index: valprint.c =================================================================== RCS file: /cvs/src/src/gdb/valprint.c,v retrieving revision 1.19 diff -u -r1.19 valprint.c --- valprint.c 2001/12/12 02:11:52 1.19 +++ valprint.c 2001/12/15 18:12:53 @@ -618,7 +618,7 @@ /* FIXME: We should be not printing leading zeroes in most cases. */ fprintf_filtered (stream, local_binary_format_prefix ()); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { for (p = valaddr; p < valaddr + len; @@ -705,7 +705,7 @@ carry = 0; fprintf_filtered (stream, local_octal_format_prefix ()); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { for (p = valaddr; p < valaddr + len; @@ -819,11 +819,11 @@ #define CARRY_LEFT( x ) ((x) % TEN) #define SHIFT( x ) ((x) << 4) #define START_P \ - ((TARGET_BYTE_ORDER == BIG_ENDIAN) ? valaddr : valaddr + len - 1) + ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? valaddr : valaddr + len - 1) #define NOT_END_P \ - ((TARGET_BYTE_ORDER == BIG_ENDIAN) ? (p < valaddr + len) : (p >= valaddr)) + ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? (p < valaddr + len) : (p >= valaddr)) #define NEXT_P \ - ((TARGET_BYTE_ORDER == BIG_ENDIAN) ? p++ : p-- ) + ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? p++ : p-- ) #define LOW_NIBBLE( x ) ( (x) & 0x00F) #define HIGH_NIBBLE( x ) (((x) & 0x0F0) >> 4) @@ -956,7 +956,7 @@ /* FIXME: We should be not printing leading zeroes in most cases. */ fprintf_filtered (stream, local_hex_format_prefix ()); - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { for (p = valaddr; p < valaddr + len; Index: config/a29k/tm-a29k.h =================================================================== RCS file: /cvs/src/src/gdb/config/a29k/tm-a29k.h,v retrieving revision 1.6 diff -u -r1.6 tm-a29k.h --- tm-a29k.h 2001/12/02 02:57:13 1.6 +++ tm-a29k.h 2001/12/15 18:12:54 @@ -31,7 +31,7 @@ la tm-m68k.h). */ /* Byte order is configurable, but this machine runs big-endian. */ -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG /* Floating point uses IEEE representations. */ #define IEEE_FLOAT (1) @@ -74,7 +74,7 @@ We let the command line (or previously included files) override this setting. */ #ifndef BREAKPOINT -#if TARGET_BYTE_ORDER == BIG_ENDIAN +#if TARGET_BYTE_ORDER == BFD_ENDIAN_BIG #define BREAKPOINT {0x72, 0x50, 0x01, 0x01} #else /* Target is little-endian. */ #define BREAKPOINT {0x01, 0x01, 0x50, 0x72} @@ -647,7 +647,7 @@ word in target byte order; bits 0-7 and 16-23 of *WORDP are replaced with bits 0-7 and 8-15 of DATA (which is in host byte order). */ -#if TARGET_BYTE_ORDER == BIG_ENDIAN +#if TARGET_BYTE_ORDER == BFD_ENDIAN_BIG #define STUFF_I16(WORDP, DATA) \ { \ *((char *)(WORDP) + 3) = ((DATA) & 0xff);\ Index: config/a29k/tm-vx29k.h =================================================================== RCS file: /cvs/src/src/gdb/config/a29k/tm-vx29k.h,v retrieving revision 1.6 diff -u -r1.6 tm-vx29k.h --- tm-vx29k.h 2001/12/02 02:57:13 1.6 +++ tm-vx29k.h 2001/12/15 18:12:54 @@ -95,7 +95,7 @@ from the msp in the memory stack. If msp is set higher than the dummy code, an ESF may clobber this code. */ -#if TARGET_BYTE_ORDER == BIG_ENDIAN +#if TARGET_BYTE_ORDER == BFD_ENDIAN_BIG #define NOP_INSTR 0x70400101 #else /* Target is little endian */ #define NOP_INSTR 0x01014070 Index: config/arm/tm-arm.h =================================================================== RCS file: /cvs/src/src/gdb/config/arm/tm-arm.h,v retrieving revision 1.9 diff -u -r1.9 tm-arm.h --- tm-arm.h 2001/12/15 16:53:23 1.9 +++ tm-arm.h 2001/12/15 18:12:55 @@ -36,7 +36,7 @@ /* IEEE format floating point. */ #define IEEE_FLOAT (1) -#define TARGET_DOUBLE_FORMAT (target_byte_order == BIG_ENDIAN \ +#define TARGET_DOUBLE_FORMAT (target_byte_order == BFD_ENDIAN_BIG \ ? &floatformat_ieee_double_big \ : &floatformat_ieee_double_littlebyte_bigword) Index: config/d30v/tm-d30v.h =================================================================== RCS file: /cvs/src/src/gdb/config/d30v/tm-d30v.h,v retrieving revision 1.4 diff -u -r1.4 tm-d30v.h --- tm-d30v.h 2001/03/14 23:23:09 1.4 +++ tm-d30v.h 2001/12/15 18:12:55 @@ -25,7 +25,7 @@ /* Define the bit, byte, and word ordering of the machine. */ -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG /* Offset from address of function to start of its code. Zero on most machines. */ Index: config/fr30/tm-fr30.h =================================================================== RCS file: /cvs/src/src/gdb/config/fr30/tm-fr30.h,v retrieving revision 1.6 diff -u -r1.6 tm-fr30.h --- tm-fr30.h 2001/03/14 23:23:10 1.6 +++ tm-fr30.h 2001/12/15 18:12:55 @@ -52,7 +52,7 @@ #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG #define R0_REGNUM 0 #define R1_REGNUM 1 Index: config/h8300/tm-h8300.h =================================================================== RCS file: /cvs/src/src/gdb/config/h8300/tm-h8300.h,v retrieving revision 1.7 diff -u -r1.7 tm-h8300.h --- tm-h8300.h 2001/03/16 22:34:46 1.7 +++ tm-h8300.h 2001/12/15 18:12:55 @@ -60,7 +60,7 @@ #define IEEE_FLOAT (1) /* Define the bit, byte, and word ordering of the machine. */ -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG #undef TARGET_INT_BIT #define TARGET_INT_BIT 16 #undef TARGET_LONG_BIT Index: config/h8500/tm-h8500.h =================================================================== RCS file: /cvs/src/src/gdb/config/h8500/tm-h8500.h,v retrieving revision 1.7 diff -u -r1.7 tm-h8500.h --- tm-h8500.h 2001/05/04 04:15:30 1.7 +++ tm-h8500.h 2001/12/15 18:12:55 @@ -29,7 +29,7 @@ /* Define the bit, byte, and word ordering of the machine. */ -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG /* Define the sizes of integers and pointers. */ Index: config/m32r/tm-m32r.h =================================================================== RCS file: /cvs/src/src/gdb/config/m32r/tm-m32r.h,v retrieving revision 1.4 diff -u -r1.4 tm-m32r.h --- tm-m32r.h 2001/03/14 23:23:12 1.4 +++ tm-m32r.h 2001/12/15 18:12:57 @@ -23,8 +23,8 @@ /* Used by mswin. */ #define TARGET_M32R 1 -/* mvs_check TARGET_BYTE_ORDER BIG_ENDIAN */ -#define TARGET_BYTE_ORDER BIG_ENDIAN +/* mvs_check TARGET_BYTE_ORDER BFD_ENDIAN_BIG */ +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG /* mvs_check REGISTER_NAMES */ #define REGISTER_NAMES \ Index: config/m68k/tm-m68k.h =================================================================== RCS file: /cvs/src/src/gdb/config/m68k/tm-m68k.h,v retrieving revision 1.7 diff -u -r1.7 tm-m68k.h --- tm-m68k.h 2001/07/28 20:05:15 1.7 +++ tm-m68k.h 2001/12/15 18:12:58 @@ -26,7 +26,7 @@ #define IEEE_FLOAT (1) /* Define the bit, byte, and word ordering of the machine. */ -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG #define TARGET_LONG_DOUBLE_FORMAT &floatformat_m68881_ext Index: config/m88k/tm-m88k.h =================================================================== RCS file: /cvs/src/src/gdb/config/m88k/tm-m88k.h,v retrieving revision 1.9 diff -u -r1.9 tm-m88k.h --- tm-m88k.h 2001/11/13 02:39:29 1.9 +++ tm-m88k.h 2001/12/15 18:12:58 @@ -26,7 +26,7 @@ /* g++ support is not yet included. */ /* Define the bit, byte, and word ordering of the machine. */ -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG /* We cache information about saved registers in the frame structure, to save us from having to re-scan function prologues every time Index: config/mips/tm-mips.h =================================================================== RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v retrieving revision 1.23 diff -u -r1.23 tm-mips.h --- tm-mips.h 2001/12/10 04:58:31 1.23 +++ tm-mips.h 2001/12/15 18:12:59 @@ -225,7 +225,7 @@ between memory and register formats. */ #define REGISTER_CONVERT_TO_TYPE(n, type, buffer) \ - do {if (TARGET_BYTE_ORDER == BIG_ENDIAN \ + do {if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG \ && REGISTER_RAW_SIZE (n) == 4 \ && (n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32 \ && TYPE_CODE(type) == TYPE_CODE_FLT \ @@ -236,7 +236,7 @@ memcpy (((char *)(buffer)), __temp, 4); }} while (0) #define REGISTER_CONVERT_FROM_TYPE(n, type, buffer) \ - do {if (TARGET_BYTE_ORDER == BIG_ENDIAN \ + do {if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG \ && REGISTER_RAW_SIZE (n) == 4 \ && (n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32 \ && TYPE_CODE(type) == TYPE_CODE_FLT \ Index: config/pa/tm-hppa.h =================================================================== RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v retrieving revision 1.9 diff -u -r1.9 tm-hppa.h --- tm-hppa.h 2001/05/12 03:18:34 1.9 +++ tm-hppa.h 2001/12/15 18:12:59 @@ -34,7 +34,7 @@ /* Target system byte order. */ -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG /* By default assume we don't have to worry about software floating point. */ #ifndef SOFT_FLOAT Index: config/sparc/tm-sparc.h =================================================================== RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v retrieving revision 1.9 diff -u -r1.9 tm-sparc.h --- tm-sparc.h 2001/03/21 18:31:48 1.9 +++ tm-sparc.h 2001/12/15 18:13:00 @@ -159,7 +159,7 @@ "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr" \ } -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG /* Offset from address of function to start of its code. Zero on most machines. */ Index: config/z8k/tm-z8k.h =================================================================== RCS file: /cvs/src/src/gdb/config/z8k/tm-z8k.h,v retrieving revision 1.5 diff -u -r1.5 tm-z8k.h --- tm-z8k.h 2001/03/06 08:21:40 1.5 +++ tm-z8k.h 2001/12/15 18:13:00 @@ -32,7 +32,7 @@ #define TARGET_PTR_BIT (BIG ? 32: 16) /* Define the bit, byte, and word ordering of the machine. */ -#define TARGET_BYTE_ORDER BIG_ENDIAN +#define TARGET_BYTE_ORDER BFD_ENDIAN_BIG /* Offset from address of function to start of its code. Zero on most machines. */ Index: doc/gdbint.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v retrieving revision 1.48 diff -u -r1.48 gdbint.texinfo --- gdbint.texinfo 2001/12/15 16:53:24 1.48 +++ gdbint.texinfo 2001/12/15 18:13:12 @@ -3488,7 +3488,7 @@ @item TARGET_BYTE_ORDER_DEFAULT @findex TARGET_BYTE_ORDER_DEFAULT The ordering of bytes in the target. This must be either -@code{BIG_ENDIAN} or @code{BFD_ENDIAN_LITTLE}. This macro replaces +@code{BFD_ENDIAN_BIG} or @code{BFD_ENDIAN_LITTLE}. This macro replaces @code{TARGET_BYTE_ORDER} which is deprecated. @item TARGET_BYTE_ORDER_SELECTABLE_P Index: mi/mi-cmd-disas.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-cmd-disas.c,v retrieving revision 1.11 diff -u -r1.11 mi-cmd-disas.c --- mi-cmd-disas.c 2001/06/23 20:43:56 1.11 +++ mi-cmd-disas.c 2001/12/15 18:13:12 @@ -242,7 +242,7 @@ } di.mach = TARGET_PRINT_INSN_INFO->mach; - if (TARGET_BYTE_ORDER == BIG_ENDIAN) + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) di.endian = BFD_ENDIAN_BIG; else di.endian = BFD_ENDIAN_LITTLE; Index: mi/mi-main.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-main.c,v retrieving revision 1.24 diff -u -r1.24 mi-main.c --- mi-main.c 2001/09/18 05:00:51 1.24 +++ mi-main.c 2001/12/15 18:13:13 @@ -525,7 +525,7 @@ ptr = buf + 2; for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++) { - register int idx = TARGET_BYTE_ORDER == BIG_ENDIAN ? j + register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j : REGISTER_RAW_SIZE (regnum) - 1 - j; sprintf (ptr, "%02x", (unsigned char) raw_buffer[idx]); ptr += 2;