aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-12-15 16:53:24 +0000
committerAndrew Cagney <cagney@redhat.com>2001-12-15 16:53:24 +0000
commit778eb05eacb13ba46d6b60d9157fcc32db8433a2 (patch)
tree2b66c1e99b806a1f85109d0c20fee47368448f96
parent5b6a02bcf409bfba5fafa2e71d2296e2429de038 (diff)
downloadgdb-778eb05eacb13ba46d6b60d9157fcc32db8433a2.zip
gdb-778eb05eacb13ba46d6b60d9157fcc32db8433a2.tar.gz
gdb-778eb05eacb13ba46d6b60d9157fcc32db8433a2.tar.bz2
LITTLE_ENDIAN -> BFD_ENDIAN_LITTLE
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/arch-utils.c14
-rw-r--r--gdb/config/alpha/tm-alpha.h2
-rw-r--r--gdb/config/arm/tm-arm.h2
-rw-r--r--gdb/config/i386/tm-i386.h2
-rw-r--r--gdb/config/i960/tm-i960.h2
-rw-r--r--gdb/config/ia64/tm-ia64.h2
-rw-r--r--gdb/config/mcore/tm-mcore.h2
-rw-r--r--gdb/config/mips/tm-wince.h2
-rw-r--r--gdb/config/mn10200/tm-mn10200.h2
-rw-r--r--gdb/config/ns32k/tm-umax.h2
-rw-r--r--gdb/config/powerpc/tm-ppcle-eabi.h2
-rw-r--r--gdb/config/sh/tm-wince.h2
-rw-r--r--gdb/config/v850/tm-v850.h2
-rw-r--r--gdb/config/vax/tm-vax.h2
-rw-r--r--gdb/cris-tdep.c2
-rw-r--r--gdb/d10v-tdep.c2
-rw-r--r--gdb/defs.h6
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdbint.texinfo4
-rw-r--r--gdb/gdbarch.c5
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/remote-rdp.c2
-rw-r--r--gdb/remote-sim.c2
-rw-r--r--gdb/sh-tdep.c4
-rw-r--r--gdb/sparc-tdep.c4
26 files changed, 54 insertions, 39 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a4d5b17..1bf5860 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index d01ab69..d7e82d7 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -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)
{
diff --git a/gdb/config/alpha/tm-alpha.h b/gdb/config/alpha/tm-alpha.h
index 60c0b80..f5f3497 100644
--- a/gdb/config/alpha/tm-alpha.h
+++ b/gdb/config/alpha/tm-alpha.h
@@ -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. */
diff --git a/gdb/config/arm/tm-arm.h b/gdb/config/arm/tm-arm.h
index e4271da..3c15350 100644
--- a/gdb/config/arm/tm-arm.h
+++ b/gdb/config/arm/tm-arm.h
@@ -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)
diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h
index 8407057..d40a5f8 100644
--- a/gdb/config/i386/tm-i386.h
+++ b/gdb/config/i386/tm-i386.h
@@ -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
diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h
index f47b880..b6ed313 100644
--- a/gdb/config/i960/tm-i960.h
+++ b/gdb/config/i960/tm-i960.h
@@ -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. */
diff --git a/gdb/config/ia64/tm-ia64.h b/gdb/config/ia64/tm-ia64.h
index 326729f..37e4d72 100644
--- a/gdb/config/ia64/tm-ia64.h
+++ b/gdb/config/ia64/tm-ia64.h
@@ -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
diff --git a/gdb/config/mcore/tm-mcore.h b/gdb/config/mcore/tm-mcore.h
index 0fae6ac..22631c0 100644
--- a/gdb/config/mcore/tm-mcore.h
+++ b/gdb/config/mcore/tm-mcore.h
@@ -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
diff --git a/gdb/config/mips/tm-wince.h b/gdb/config/mips/tm-wince.h
index 10e2eeb..737ccc6 100644
--- a/gdb/config/mips/tm-wince.h
+++ b/gdb/config/mips/tm-wince.h
@@ -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 */
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h
index 7018d56..4d416c5 100644
--- a/gdb/config/mn10200/tm-mn10200.h
+++ b/gdb/config/mn10200/tm-mn10200.h
@@ -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
diff --git a/gdb/config/ns32k/tm-umax.h b/gdb/config/ns32k/tm-umax.h
index 5f9d2b9..9f1fb31 100644
--- a/gdb/config/ns32k/tm-umax.h
+++ b/gdb/config/ns32k/tm-umax.h
@@ -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. */
diff --git a/gdb/config/powerpc/tm-ppcle-eabi.h b/gdb/config/powerpc/tm-ppcle-eabi.h
index a6b1671..1eb6470 100644
--- a/gdb/config/powerpc/tm-ppcle-eabi.h
+++ b/gdb/config/powerpc/tm-ppcle-eabi.h
@@ -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 */
diff --git a/gdb/config/sh/tm-wince.h b/gdb/config/sh/tm-wince.h
index 4c4869a..ddebbd2 100644
--- a/gdb/config/sh/tm-wince.h
+++ b/gdb/config/sh/tm-wince.h
@@ -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 */
diff --git a/gdb/config/v850/tm-v850.h b/gdb/config/v850/tm-v850.h
index 83e755e..69f8491 100644
--- a/gdb/config/v850/tm-v850.h
+++ b/gdb/config/v850/tm-v850.h
@@ -21,7 +21,7 @@
#include "regcache.h"
-#define TARGET_BYTE_ORDER LITTLE_ENDIAN
+#define TARGET_BYTE_ORDER BFD_ENDIAN_LITTLE
#define NUM_REGS 66
diff --git a/gdb/config/vax/tm-vax.h b/gdb/config/vax/tm-vax.h
index 867844b..65f8d70 100644
--- a/gdb/config/vax/tm-vax.h
+++ b/gdb/config/vax/tm-vax.h
@@ -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. */
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index cb5305a..d3376b5 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -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;
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index fa55d46..4bb9c9d 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -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);
diff --git a/gdb/defs.h b/gdb/defs.h
index b1512a2..48adef51 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -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)
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 3a8fc74..9be0048 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -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
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 491eaae..cf0d930 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -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
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 64cecba..72737e7 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -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",
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 28395a8..c474232 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -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",
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index 22f5b3e..b531047 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -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:
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 3e515c1..caba037 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -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:
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 65bc62b..5a555b1 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -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
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 0a1d576..1910b1b 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -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