Blame SOURCES/gdb-rhbz1420304-s390x-13of35.patch

e1d87d
commit 805acca042afed8e8431c92ab031167b03475676
e1d87d
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
e1d87d
Date:   Tue Jun 13 15:20:26 2017 +0200
e1d87d
e1d87d
    gdb/testsuite: Add "get_endianness" convenience proc
e1d87d
    
e1d87d
    The test suite contains multiple instances of determining the target's
e1d87d
    endianness with GDB's "show endian" command.  This patch replaces these by
e1d87d
    an invocation of a new convenience proc 'get_endianness'.
e1d87d
    
e1d87d
    gdb/testsuite/ChangeLog:
e1d87d
    
e1d87d
            * lib/gdb.exp (get_endianness): New proc.
e1d87d
            * gdb.arch/aarch64-fp.exp: Use it.
e1d87d
            * gdb.arch/altivec-regs.exp: Likewise.
e1d87d
            * gdb.arch/e500-regs.exp: Likewise.
e1d87d
            * gdb.arch/vsx-regs.exp: Likewise.
e1d87d
            * gdb.base/dump.exp: Likewise.
e1d87d
            * gdb.base/funcargs.exp: Likewise.
e1d87d
            * gdb.base/gnu_vector.exp: Likewise.
e1d87d
            * gdb.dwarf2/formdata16.exp: Likewise.
e1d87d
            * gdb.dwarf2/implptrpiece.exp: Likewise.
e1d87d
            * gdb.dwarf2/nonvar-access.exp: Likewise.
e1d87d
            * gdb.python/py-inferior.exp: Likewise.
e1d87d
            * gdb.trace/unavailable-dwarf-piece.exp: Likewise.
e1d87d
e1d87d
### a/gdb/testsuite/ChangeLog
e1d87d
### b/gdb/testsuite/ChangeLog
e1d87d
## -1,5 +1,21 @@
e1d87d
 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
e1d87d
 
e1d87d
+	* lib/gdb.exp (get_endianness): New proc.
e1d87d
+	* gdb.arch/aarch64-fp.exp: Use it.
e1d87d
+	* gdb.arch/altivec-regs.exp: Likewise.
e1d87d
+	* gdb.arch/e500-regs.exp: Likewise.
e1d87d
+	* gdb.arch/vsx-regs.exp: Likewise.
e1d87d
+	* gdb.base/dump.exp: Likewise.
e1d87d
+	* gdb.base/funcargs.exp: Likewise.
e1d87d
+	* gdb.base/gnu_vector.exp: Likewise.
e1d87d
+	* gdb.dwarf2/formdata16.exp: Likewise.
e1d87d
+	* gdb.dwarf2/implptrpiece.exp: Likewise.
e1d87d
+	* gdb.dwarf2/nonvar-access.exp: Likewise.
e1d87d
+	* gdb.python/py-inferior.exp: Likewise.
e1d87d
+	* gdb.trace/unavailable-dwarf-piece.exp: Likewise.
e1d87d
+
e1d87d
+2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
e1d87d
+
e1d87d
 	PR gdb/21226
e1d87d
 	* gdb.dwarf2/nonvar-access.exp: Add checks for verifying that
e1d87d
 	stack value pieces are taken from the LSB end.
e1d87d
--- a/gdb/testsuite/lib/gdb.exp
e1d87d
+++ b/gdb/testsuite/lib/gdb.exp
e1d87d
@@ -5671,6 +5671,19 @@ proc set_remotetimeout { timeout } {
e1d87d
     }
e1d87d
 }
e1d87d
 
e1d87d
+# Get the target's current endianness and return it.
e1d87d
+proc get_endianness { } {
e1d87d
+    global gdb_prompt
e1d87d
+
e1d87d
+    gdb_test_multiple "show endian" "determine endianness" {
e1d87d
+	-re ".* (little|big) endian.*\r\n$gdb_prompt $" {
e1d87d
+	    # Pass silently.
e1d87d
+	    return $expect_out(1,string)
e1d87d
+	}
e1d87d
+    }
e1d87d
+    return "little"
e1d87d
+}
e1d87d
+
e1d87d
 # ROOT and FULL are file names.  Returns the relative path from ROOT
e1d87d
 # to FULL.  Note that FULL must be in a subdirectory of ROOT.
e1d87d
 # For example, given ROOT = /usr/bin and FULL = /usr/bin/ls, this