aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.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/gdbarch.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/gdbarch.c')
-rw-r--r--gdb/gdbarch.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index b1276c7..1f7ba6e 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -548,7 +548,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
log = mem_fileopen ();
cleanups = make_cleanup_ui_file_delete (log);
/* fundamental */
- if (gdbarch->byte_order == 0)
+ if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
fprintf_unfiltered (log, "\n\tbyte-order");
if (gdbarch->bfd_arch_info == NULL)
fprintf_unfiltered (log, "\n\tbfd_arch_info");
@@ -4749,17 +4749,17 @@ gdbarch_update_p (struct gdbarch_info info)
info.bfd_arch_info = TARGET_ARCHITECTURE;
/* ``(gdb) set byte-order ...'' */
- if (info.byte_order == 0
+ if (info.byte_order == BFD_ENDIAN_UNKNOWN
&& !TARGET_BYTE_ORDER_AUTO)
info.byte_order = TARGET_BYTE_ORDER;
/* From the INFO struct. */
- if (info.byte_order == 0
+ if (info.byte_order == BFD_ENDIAN_UNKNOWN
&& info.abfd != NULL)
info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
: bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
- : 0);
+ : BFD_ENDIAN_UNKNOWN);
/* From the current target. */
- if (info.byte_order == 0)
+ if (info.byte_order == BFD_ENDIAN_UNKNOWN)
info.byte_order = TARGET_BYTE_ORDER;
/* Must have found some sort of architecture. */