Blame SOURCES/gdb-rhbz1125820-ppc64le-enablement-25of37.patch

01917d
commit 6ed14ff33979bc48367c35b1b235fef8c5e2229b
01917d
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
01917d
Date:   Tue Feb 4 18:28:24 2014 +0100
01917d
01917d
    PowerPC64 little-endian fixes: AltiVec tests
01917d
    
01917d
    A couple of AltiVec tests fail spuriously on powerpc64le-linux, because
01917d
    they compare against an incorrect pattern.  Note that those tests already
01917d
    contain little-endian variants of the patterns, but those seem to have
01917d
    bit-rotted a bit: when outputting a vector, GDB no longer omits trailing
01917d
    zero elements (as it used to do in the past).
01917d
    
01917d
    This patch updates the pattern to the new GDB output behavior.
01917d
    
01917d
    In addition, the patch updates the endian test to use the new
01917d
    gdb_test_multiple logic instead of gdb_expect.
01917d
    
01917d
    gdb/testsuite/ChangeLog:
01917d
    
01917d
    	* gdb.arch/altivec-regs.exp: Use gdb_test_multiple for endian test.
01917d
    	(decimal_vector): Fix for little-endian.
01917d
01917d
Index: gdb-7.6.1/gdb/testsuite/gdb.arch/altivec-regs.exp
01917d
===================================================================
01917d
--- gdb-7.6.1.orig/gdb/testsuite/gdb.arch/altivec-regs.exp
01917d
+++ gdb-7.6.1/gdb/testsuite/gdb.arch/altivec-regs.exp
01917d
@@ -79,17 +79,16 @@ gdb_test "set \$vrsave = 1" "" ""
01917d
 
01917d
 gdb_test "next" "" ""
01917d
 
01917d
-send_gdb "show endian\n"
01917d
 set endianness ""
01917d
-gdb_expect {
01917d
+set msg "detect endianness"
01917d
+gdb_test_multiple "show endian" "$msg" {
01917d
     -re "(The target endianness is set automatically .currently )(big|little)( endian.*)$gdb_prompt $" {
01917d
-        pass "endianness"
01917d
-	set endianness $expect_out(2,string)
01917d
+        pass "$msg"
01917d
+        set endianness $expect_out(2,string)
01917d
     }
01917d
     -re ".*$gdb_prompt $" {
01917d
-	fail "couldn't get endianness"
01917d
+        fail "$msg"
01917d
     }
01917d
-    timeout		{ fail "(timeout) endianness" }
01917d
 }
01917d
 
01917d
 # And then read the AltiVec registers back, to see that
01917d
@@ -118,7 +117,7 @@ gdb_test "info reg vscr" "vscr.*0x1\t1"
01917d
 if {$endianness == "big"} {
01917d
      set decimal_vector ".uint128 = 0x00000001000000010000000100000001, v4_float = .1.*e-45, 1.*e-45, 1.*e-45, 1.*e-45., v4_int32 = .1, 1, 1, 1., v8_int16 = .0, 1, 0, 1, 0, 1, 0, 1., v16_int8 = .0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1.."
01917d
 } else {
01917d
-     set decimal_vector ".uint128 = 0x00000001000000010000000100000001, v4_float = .1.*e-45, 1.*e-45, 1.*e-45, 1.*e-45., v4_int32 = .1, 1, 1, 1., v8_int16 = .1, 0, 1, 0, 1, 0, 1, 0., v16_int8 = .1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.."
01917d
+     set decimal_vector ".uint128 = 0x00000001000000010000000100000001, v4_float = .1.*e-45, 1.*e-45, 1.*e-45, 1.*e-45., v4_int32 = .1, 1, 1, 1., v8_int16 = .1, 0, 1, 0, 1, 0, 1, 0., v16_int8 = .1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.."
01917d
 }
01917d
 
01917d
 for {set i 0} {$i < 32} {incr i 1} {