This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Big-endian hosts: Fix "set architecture cris"
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 26 Jan 2017 14:27:24 -0500
- Subject: [binutils-gdb] Big-endian hosts: Fix "set architecture cris"
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 7cf1de6cf421f52b145b88055cc89fc666343fba ***
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Branch: master
Commit: 7cf1de6cf421f52b145b88055cc89fc666343fba
Big-endian hosts: Fix "set architecture cris"
The all-architectures-1.exp test case currently yields 66 FAILs on s390x,
because the "set architecture" command fails each time when attempting to
switch to "cris", "crisv32", or "cris:common_v10_v32". Actually, the
command would succeed if the endianness had been set to "little" before.
Instead, the test case sets the endianness to "auto", which results in
"big" on s390x.
So on x86_64:
(gdb) set endian auto
The target endianness is set automatically (currently little endian)
(gdb) set architecture cris
warning: A handler for the OS ABI "AIX" is not built into this configuration
of GDB. Attempting to continue with the default cris settings.
The target architecture is assumed to be cris
But on s390x:
(gdb) set endian auto
The target endianness is set automatically (currently big endian)
(gdb) set architecture cris
Architecture `cris' not recognized.
See also the test results for s390x and ppc64be:
https://sourceware.org/ml/gdb-testers/2016-q4/msg05150.html
https://sourceware.org/ml/gdb-testers/2016-q4/msg05713.html
Indeed, cris_gdbarch_init in cris-tdep.c returns a failure unless the
user-specified endianness is "little". Other architectures usually ignore
the user-specified endianness and return a valid gdbarch anyhow, even if
they can not really cope with the given endianness.
This patch removes the check in cris-tdep.c and forces little-endian byte
order instead.
gdb/ChangeLog:
* cris-tdep.c (cris_gdbarch_init): Remove check for
info.byte_order and force it to BFD_ENDIAN_LITTLE.
- Follow-Ups:
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-i686, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Debian-s390x-m64, branch master