summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2017-06-13 15:20:26 +0200
committerAndreas Arnez <arnez@linux.vnet.ibm.com>2017-06-13 15:20:26 +0200
commit805acca042afed8e8431c92ab031167b03475676 (patch)
tree0339b2c96446dc5ae36642e7852048a9500358ce /gdb/testsuite/gdb.dwarf2/implptrpiece.exp
parentddd7882a582637d86a321c1ab835f6cdbeb6d017 (diff)
downloadbinutils-gdb-805acca042afed8e8431c92ab031167b03475676.tar.gz
gdb/testsuite: Add "get_endianness" convenience proc
The test suite contains multiple instances of determining the target's endianness with GDB's "show endian" command. This patch replaces these by an invocation of a new convenience proc 'get_endianness'. gdb/testsuite/ChangeLog: * lib/gdb.exp (get_endianness): New proc. * gdb.arch/aarch64-fp.exp: Use it. * gdb.arch/altivec-regs.exp: Likewise. * gdb.arch/e500-regs.exp: Likewise. * gdb.arch/vsx-regs.exp: Likewise. * gdb.base/dump.exp: Likewise. * gdb.base/funcargs.exp: Likewise. * gdb.base/gnu_vector.exp: Likewise. * gdb.dwarf2/formdata16.exp: Likewise. * gdb.dwarf2/implptrpiece.exp: Likewise. * gdb.dwarf2/nonvar-access.exp: Likewise. * gdb.python/py-inferior.exp: Likewise. * gdb.trace/unavailable-dwarf-piece.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/implptrpiece.exp')
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrpiece.exp10
1 files changed, 2 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index ef483c0f980..ac3ee784659 100644
--- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
@@ -119,14 +119,8 @@ if ![runto_main] {
return -1
}
-# Determine endianness.
-set endian "little"
-gdb_test_multiple "show endian" "determine endianness" {
- -re ".* (big|little) endian.*$gdb_prompt $" {
- set endian $expect_out(1,string)
- pass "endianness: $endian"
- }
-}
+# Determine byte order.
+set endian [get_endianness]
# Access the second byte of s through an implicit pointer to the third
# byte of s, using a negative offset. Compare that to the second byte of