LITTLE_ENDIAN -> BFD_ENDIAN_LITTLE
authorAndrew Cagney <cagney@redhat.com>
Sat, 15 Dec 2001 16:53:24 +0000 (16:53 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 15 Dec 2001 16:53:24 +0000 (16:53 +0000)
26 files changed:
gdb/ChangeLog
gdb/arch-utils.c
gdb/config/alpha/tm-alpha.h
gdb/config/arm/tm-arm.h
gdb/config/i386/tm-i386.h
gdb/config/i960/tm-i960.h
gdb/config/ia64/tm-ia64.h
gdb/config/mcore/tm-mcore.h
gdb/config/mips/tm-wince.h
gdb/config/mn10200/tm-mn10200.h
gdb/config/ns32k/tm-umax.h
gdb/config/powerpc/tm-ppcle-eabi.h
gdb/config/sh/tm-wince.h
gdb/config/v850/tm-v850.h
gdb/config/vax/tm-vax.h
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/defs.h
gdb/doc/ChangeLog
gdb/doc/gdbint.texinfo
gdb/gdbarch.c
gdb/gdbarch.sh
gdb/remote-rdp.c
gdb/remote-sim.c
gdb/sh-tdep.c
gdb/sparc-tdep.c

index a4d5b17..1bf5860 100644 (file)
@@ -1,5 +1,18 @@
 2001-12-15  Andrew Cagney  <ac131313@redhat.com>
 
+       * defs.h (LITTLE_ENDIAN): Delete definition.
+       * arch-utils.c, cris-tdep.c, d10v-tdep.c, defs.h, gdbarch.c,
+       gdbarch.sh, remote-rdp.c, remote-sim.c, sh-tdep.c, sparc-tdep.c,
+       config/alpha/tm-alpha.h, config/arm/tm-arm.h,
+       config/i386/tm-i386.h, config/i960/tm-i960.h,
+       config/ia64/tm-ia64.h, config/mcore/tm-mcore.h,
+       config/mips/tm-wince.h, config/mn10200/tm-mn10200.h,
+       config/ns32k/tm-umax.h, config/powerpc/tm-ppcle-eabi.h,
+       config/sh/tm-wince.h, config/v850/tm-v850.h, config/vax/tm-vax.h,
+       doc/gdbint.texinfo: Replace LITTLE_ENDIAN with BFD_ENDIAN_LITTLE.
+
+2001-12-15  Andrew Cagney  <ac131313@redhat.com>
+
        * ui-out.c (struct ui_out_table): Add field entry_level.
        (verify_field): New function.
        (verify_field_proper_position): Delete function.
index d01ab69..d7e82d7 100644 (file)
@@ -195,7 +195,7 @@ default_float_format (struct gdbarch *gdbarch)
     {
     case BIG_ENDIAN:
       return &floatformat_ieee_single_big;
-    case LITTLE_ENDIAN:
+    case BFD_ENDIAN_LITTLE:
       return &floatformat_ieee_single_little;
     default:
       internal_error (__FILE__, __LINE__,
@@ -216,7 +216,7 @@ default_double_format (struct gdbarch *gdbarch)
     {
     case BIG_ENDIAN:
       return &floatformat_ieee_double_big;
-    case LITTLE_ENDIAN:
+    case BFD_ENDIAN_LITTLE:
       return &floatformat_ieee_double_little;
     default:
       internal_error (__FILE__, __LINE__,
@@ -467,7 +467,7 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
        {
          struct gdbarch_info info;
          memset (&info, 0, sizeof info);
-         info.byte_order = LITTLE_ENDIAN;
+         info.byte_order = BFD_ENDIAN_LITTLE;
          if (! gdbarch_update_p (info))
            {
              printf_unfiltered ("Little endian target not supported by GDB\n");
@@ -475,7 +475,7 @@ set_endian (char *ignore_args, int from_tty, struct cmd_list_element *c)
        }
       else
        {
-         target_byte_order = LITTLE_ENDIAN;
+         target_byte_order = BFD_ENDIAN_LITTLE;
        }
     }
   else if (set_endian_string == endian_big)
@@ -517,7 +517,7 @@ set_endian_from_file (bfd *abfd)
       if (bfd_big_endian (abfd))
        want = BIG_ENDIAN;
       else
-       want = LITTLE_ENDIAN;
+       want = BFD_ENDIAN_LITTLE;
       if (TARGET_BYTE_ORDER_AUTO)
        target_byte_order = want;
       else if (TARGET_BYTE_ORDER != want)
@@ -771,7 +771,7 @@ initialize_current_architecture (void)
          info.byte_order = BIG_ENDIAN;
          break;
        case BFD_ENDIAN_LITTLE:
-         info.byte_order = LITTLE_ENDIAN;
+         info.byte_order = BFD_ENDIAN_LITTLE;
          break;
        default:
          break;
@@ -785,7 +785,7 @@ initialize_current_architecture (void)
       if (chp != NULL
          && chp - 2 >= target_name
          && strncmp (chp - 2, "el", 2) == 0)
-       info.byte_order = LITTLE_ENDIAN;
+       info.byte_order = BFD_ENDIAN_LITTLE;
     }
   if (info.byte_order == 0)
     {
index 60c0b80..f5f3497 100644 (file)
@@ -34,7 +34,7 @@ struct value;
 struct symbol;
 
 #if !defined (TARGET_BYTE_ORDER)
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 #endif
 
 /* Redefine some target bit sizes from the default.  */
index e4271da..3c15350 100644 (file)
@@ -32,7 +32,7 @@ struct value;
 /* Target byte order on ARM defaults to selectable, and defaults to
    little endian.  */
 #define TARGET_BYTE_ORDER_SELECTABLE_P 1
-#define TARGET_BYTE_ORDER_DEFAULT      LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER_DEFAULT BFD_ENDIAN_LITTLE
 
 /* IEEE format floating point.  */
 #define IEEE_FLOAT (1)
index 8407057..d40a5f8 100644 (file)
@@ -32,7 +32,7 @@ struct frame_saved_regs;
 struct value;
 struct type;
 
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 
 /* The format used for `long double' on almost all i386 targets is the
    i387 extended floating-point format.  In fact, of all targets in the
index f47b880..b6ed313 100644 (file)
@@ -39,7 +39,7 @@
 #define        DBX_PARM_SYMBOL_CLASS(type) ((type == N_LSYM)? LOC_LOCAL_ARG: LOC_ARG)
 
 /* Byte order is configurable, but this machine runs little-endian.  */
-#define        TARGET_BYTE_ORDER       LITTLE_ENDIAN
+#define        TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 
 /* We have IEEE floating point, if we have any float at all.  */
 
index 326729f..37e4d72 100644 (file)
@@ -29,7 +29,7 @@
 
 /* ia64 is little endian by default */
 
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 
 /* Say how long (ordinary) registers are.  This is a piece of bogosity
    used in push_word and a few other places; REGISTER_RAW_SIZE is the
index 0fae6ac..22631c0 100644 (file)
@@ -21,7 +21,7 @@
 #include "regcache.h"
 
 /* The mcore is little endian (by default) */
-#define TARGET_BYTE_ORDER_DEFAULT LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER_DEFAULT BFD_ENDIAN_LITTLE
 
 /* All registers are 32 bits */
 #define REGISTER_SIZE 4
index 10e2eeb..737ccc6 100644 (file)
@@ -30,6 +30,6 @@
 
 void wince_software_single_step (unsigned int, int);
 #undef TARGET_BYTE_ORDER_SELECTABLE
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 
 #endif /* TM_WINCE_H */
index 7018d56..4d416c5 100644 (file)
@@ -26,7 +26,7 @@
 #include "regcache.h"
 
 /* The mn10200 is little endian.  */
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 
 /* ints are only 16bits on the mn10200.  */
 #undef TARGET_INT_BIT
index 5f9d2b9..9f1fb31 100644 (file)
@@ -23,7 +23,7 @@
 
 /* This is also included by tm-ns32km3.h, as well as being used by umax.  */
 
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 
 /* Need to get function ends by adding this to epilogue address from .bf
    record, not using x_fsize field.  */
index a6b1671..1eb6470 100644 (file)
@@ -26,6 +26,6 @@
 #include "powerpc/tm-ppc-eabi.h"
 
 #undef  TARGET_BYTE_ORDER_DEFAULT
-#define TARGET_BYTE_ORDER_DEFAULT      LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER_DEFAULT BFD_ENDIAN_LITTLE
 
 #endif /* TM_PPCLE_EABI_H */
index 4c4869a..ddebbd2 100644 (file)
@@ -29,6 +29,6 @@
 #define SOFTWARE_SINGLE_STEP(sig, bp_p) wince_software_single_step (sig, bp_p)
 void wince_software_single_step (unsigned int, int);
 #undef TARGET_BYTE_ORDER_SELECTABLE
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 
 #endif /* TM_WINCE_H */
index 83e755e..69f8491 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "regcache.h"
 
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 
 #define NUM_REGS 66
 
index 867844b..65f8d70 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "regcache.h"
 
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
 
 /* Offset from address of function to start of its code.
    Zero on most machines.  */
index cb5305a..d3376b5 100644 (file)
@@ -3799,7 +3799,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* INIT shall ensure that the INFO.BYTE_ORDER is non-zero.  */
   switch (info.byte_order)
     {
-    case LITTLE_ENDIAN:
+    case BFD_ENDIAN_LITTLE:
       /* Ok.  */
       break;
 
index fa55d46..4bb9c9d 100644 (file)
@@ -1528,7 +1528,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       set_gdbarch_double_format (gdbarch, &floatformat_ieee_single_big);
       set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_big);
       break;
-    case LITTLE_ENDIAN:
+    case BFD_ENDIAN_LITTLE:
       set_gdbarch_float_format (gdbarch, &floatformat_ieee_single_little);
       set_gdbarch_double_format (gdbarch, &floatformat_ieee_single_little);
       set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_little);
index b1512a2..48adef5 100644 (file)
@@ -1223,7 +1223,7 @@ extern void *alloca ();
 #endif /* Not GNU C */
 #endif /* alloca not defined */
 
-/* Get a definition of BIG_ENDIAN and LITTLE_ENDIAN.  */
+/* Get a definition of BIG_ENDIAN and BFD_ENDIAN_LITTLE.  */
 /* FIXME: cagney/2001-10-31: GDB should just use BFD's definitions.  */
 
 #ifdef HAVE_ENDIAN_H
@@ -1234,10 +1234,6 @@ extern void *alloca ();
 #define BIG_ENDIAN 4321
 #endif
 
-#if !defined (LITTLE_ENDIAN)
-#define LITTLE_ENDIAN 1234
-#endif
-
 /* Dynamic target-system-dependent parameters for GDB. */
 #include "gdbarch.h"
 #if (GDB_MULTI_ARCH == 0)
index 3a8fc74..9be0048 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-15  Andrew Cagney  <ac131313@redhat.com>
+
+       * gdbint.texinfo (Target Architecture Definition): Replace
+       LITTLE_ENDIAN with BFD_ENDIAN_LITTLE.
+
 2001-12-01  Andrew Cagney  <ac131313@redhat.com>
 
        * gdbint.texinfo (Host Definition): Delete documentation on
index 491eaae..cf0d930 100644 (file)
@@ -3488,13 +3488,13 @@ current sources.)
 @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{LITTLE_ENDIAN}.  This macro replaces
+@code{BIG_ENDIAN} or @code{BFD_ENDIAN_LITTLE}.  This macro replaces
 @code{TARGET_BYTE_ORDER} which is deprecated.
 
 @item TARGET_BYTE_ORDER_SELECTABLE_P
 @findex TARGET_BYTE_ORDER_SELECTABLE_P
 Non-zero if the target has both @code{BIG_ENDIAN} and
-@code{LITTLE_ENDIAN} variants.  This macro replaces
+@code{BFD_ENDIAN_LITTLE} variants.  This macro replaces
 @code{TARGET_BYTE_ORDER_SELECTABLE} which is deprecated.
 
 @item TARGET_CHAR_BIT
index 64cecba..72737e7 100644 (file)
@@ -341,6 +341,7 @@ struct gdbarch startup_gdbarch =
   0,
   0,
   0,
+  0,
   generic_get_saved_register,
   0,
   0,
@@ -4725,7 +4726,7 @@ gdbarch_update_p (struct gdbarch_info info)
   if (info.byte_order == 0
       && info.abfd != NULL)
     info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
-                      : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
+                      : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
                       : 0);
   /* From the current target. */
   if (info.byte_order == 0)
@@ -4745,7 +4746,7 @@ gdbarch_update_p (struct gdbarch_info info)
                          "gdbarch_update: info.byte_order %d (%s)\n",
                          info.byte_order,
                          (info.byte_order == BIG_ENDIAN ? "big"
-                          : info.byte_order == LITTLE_ENDIAN ? "little"
+                          : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
                           : "default"));
       fprintf_unfiltered (gdb_stdlog,
                          "gdbarch_update: info.abfd 0x%lx\n",
index 28395a8..c474232 100755 (executable)
@@ -2044,7 +2044,7 @@ gdbarch_update_p (struct gdbarch_info info)
   if (info.byte_order == 0
       && info.abfd != NULL)
     info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
-                      : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
+                      : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
                       : 0);
   /* From the current target. */
   if (info.byte_order == 0)
@@ -2064,7 +2064,7 @@ gdbarch_update_p (struct gdbarch_info info)
                          "gdbarch_update: info.byte_order %d (%s)\n",
                          info.byte_order,
                          (info.byte_order == BIG_ENDIAN ? "big"
-                          : info.byte_order == LITTLE_ENDIAN ? "little"
+                          : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
                           : "default"));
       fprintf_unfiltered (gdb_stdlog,
                          "gdbarch_update: info.abfd 0x%lx\n",
index 22f5b3e..b531047 100644 (file)
@@ -349,7 +349,7 @@ rdp_init (int cold, int tty)
                  case SERIAL_TIMEOUT:
                    break;
                  case RDP_RES_VALUE_LITTLE_ENDIAN:
-                   target_byte_order = LITTLE_ENDIAN;
+                   target_byte_order = BFD_ENDIAN_LITTLE;
                    sync = 1;
                    break;
                  case RDP_RES_VALUE_BIG_ENDIAN:
index 3e515c1..caba037 100644 (file)
@@ -480,7 +480,7 @@ gdbsim_open (char *args, int from_tty)
        case BIG_ENDIAN:
          strcat (arg_buf, " -E big");
          break;
-       case LITTLE_ENDIAN:
+       case BFD_ENDIAN_LITTLE:
          strcat (arg_buf, " -E little");
          break;
        default:
index 65bc62b..5a555b1 100644 (file)
@@ -1034,7 +1034,7 @@ sh3e_sh4_extract_return_value (struct type *type, char *regbuf, char *valbuf)
   if (len == 8 && TYPE_CODE (type) == TYPE_CODE_FLT)
     {
       DOUBLEST val;
-      if (TARGET_BYTE_ORDER == LITTLE_ENDIAN)
+      if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
        floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword,
                                 (char *) regbuf + REGISTER_BYTE (return_register),
                                 &val);
@@ -1536,7 +1536,7 @@ sh_default_register_virtual_type (int reg_nr)
 int
 sh_sh4_register_convertible (int nr)
 {
-  if (TARGET_BYTE_ORDER == LITTLE_ENDIAN)
+  if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
     return (gdbarch_tdep (current_gdbarch)->DR0_REGNUM <= nr
            && nr <= gdbarch_tdep (current_gdbarch)->DR_LAST_REGNUM);
   else 
index 0a1d576..1910b1b 100644 (file)
@@ -2063,7 +2063,7 @@ sparc32_extract_return_value (struct type *type, char *regbuf, char *valbuf)
     memcpy (valbuf,
            &regbuf[O0_REGNUM * regsize +
                    (typelen >= regsize
-                    || TARGET_BYTE_ORDER == LITTLE_ENDIAN ? 0
+                    || TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE ? 0
                     : regsize - typelen)],
            typelen);
 }
@@ -2202,7 +2202,7 @@ sparc_target_architecture_hook (const bfd_arch_info_type *ap)
     {
       if (TARGET_BYTE_ORDER_SELECTABLE_P)
        {
-         target_byte_order = LITTLE_ENDIAN;
+         target_byte_order = BFD_ENDIAN_LITTLE;
          bi_endian = 1;
        }
       else