aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-12-29 19:25:58 +0000
committerAndrew Cagney <cagney@redhat.com>2001-12-29 19:25:58 +0000
commit428721aaa3be621b3c63dc823dfbd993eb2bf942 (patch)
tree09705df9da87cb7f40c39bb714103f048238f95f /gdb/arch-utils.c
parent815ecd347616d4b1178452cb38548f964efefdd7 (diff)
downloadgdb-428721aaa3be621b3c63dc823dfbd993eb2bf942.zip
gdb-428721aaa3be621b3c63dc823dfbd993eb2bf942.tar.gz
gdb-428721aaa3be621b3c63dc823dfbd993eb2bf942.tar.bz2
* arch-utils.c (initialize_current_architecture): Test byte_order
against BFD_ENDIAN_UNKNOWN. (gdbarch_info_init): Initialize byte_order to BFD_ENDIAN_UNKNOWN. * gdbarch.sh: Update comments on default value of byte_order. (verify_gdbarch, gdbarch_update_p): Test byte_order against BFD_ENDIAN_UNKNOWN. * gdbarch.h, gdbarch.c: Re-generate.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r--gdb/arch-utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 73fab81..175f85e 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -762,7 +762,7 @@ initialize_current_architecture (void)
/* take several guesses at a byte order. */
/* NB: can't use TARGET_BYTE_ORDER_DEFAULT as its definition is
forced above. */
- if (info.byte_order == 0
+ if (info.byte_order == BFD_ENDIAN_UNKNOWN
&& default_bfd_vec != NULL)
{
/* Extract BFD's default vector's byte order. */
@@ -778,7 +778,7 @@ initialize_current_architecture (void)
break;
}
}
- if (info.byte_order == 0)
+ if (info.byte_order == BFD_ENDIAN_UNKNOWN)
{
/* look for ``*el-*'' in the target name. */
const char *chp;
@@ -788,7 +788,7 @@ initialize_current_architecture (void)
&& strncmp (chp - 2, "el", 2) == 0)
info.byte_order = BFD_ENDIAN_LITTLE;
}
- if (info.byte_order == 0)
+ if (info.byte_order == BFD_ENDIAN_UNKNOWN)
{
/* Wire it to big-endian!!! */
info.byte_order = BIG_ENDIAN;
@@ -842,6 +842,7 @@ void
gdbarch_info_init (struct gdbarch_info *info)
{
memset (info, 0, sizeof (struct gdbarch_info));
+ info->byte_order = BFD_ENDIAN_UNKNOWN;
}
/* */