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

e1d87d
commit 5524b5250e319f41933605420e9526fb74cfb9ae
e1d87d
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
e1d87d
Date:   Wed Jun 14 14:24:03 2017 +0200
e1d87d
e1d87d
    Fix register selection in var-access.exp
e1d87d
    
e1d87d
    The new test var-access.exp causes FAILs on i686.  This is because the
e1d87d
    test chooses the wrong name for DWARF register number 1: It uses
e1d87d
    "edx" (which corresponds to DWARF register number 2), but should have used
e1d87d
    "ecx" instead.
e1d87d
    
e1d87d
    Also, the current logic in var-access.exp does not correctly distinguish
e1d87d
    between a 64-bit and a 32-bit program on an x86-64 target.  It uses the
e1d87d
    64-bit register names for both.
e1d87d
    
e1d87d
    These problems are fixed.  In order to address the latter, the convenience
e1d87d
    macros is_*_target are exploited where appropriate.
e1d87d
    
e1d87d
    gdb/testsuite/ChangeLog:
e1d87d
    
e1d87d
            * gdb.dwarf2/var-access.exp: Use register name ecx instead of edx
e1d87d
            on 32-bit x86 targets.  Exploit is_*_target macros where
e1d87d
            appropriate.
e1d87d
e1d87d
### a/gdb/testsuite/ChangeLog
e1d87d
### b/gdb/testsuite/ChangeLog
e1d87d
## -1,3 +1,9 @@
e1d87d
+2017-06-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
e1d87d
+
e1d87d
+	* gdb.dwarf2/var-access.exp: Use register name ecx instead of edx
e1d87d
+	on 32-bit x86 targets.  Exploit is_*_target macros where
e1d87d
+	appropriate.
e1d87d
+
e1d87d
 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
e1d87d
 
e1d87d
 	* gdb.dwarf2/var-access.exp: Add test for non-byte-aligned
e1d87d
--- a/gdb/testsuite/gdb.dwarf2/var-access.exp
e1d87d
+++ b/gdb/testsuite/gdb.dwarf2/var-access.exp
e1d87d
@@ -28,16 +28,16 @@ if {![dwarf2_support]} {
e1d87d
 
e1d87d
 set dwarf_regnum {0 1}
e1d87d
 
e1d87d
-if { [istarget "aarch64*-*-*"] } {
e1d87d
+if { [is_aarch64_target] } {
e1d87d
     set regname {x0 x1}
e1d87d
-} elseif { [istarget "arm*-*-*"]
e1d87d
+} elseif { [is_aarch32_target]
e1d87d
 	   || [istarget "s390*-*-*" ]
e1d87d
 	   || [istarget "powerpc*-*-*"]
e1d87d
 	   || [istarget "rs6000*-*-aix*"] } {
e1d87d
     set regname {r0 r1}
e1d87d
-} elseif { [istarget "i?86-*-*"] } {
e1d87d
-    set regname {eax edx}
e1d87d
-} elseif { [istarget "x86_64-*-*"] } {
e1d87d
+} elseif { [is_x86_like_target] } {
e1d87d
+    set regname {eax ecx}
e1d87d
+} elseif { [is_amd64_regs_target] } {
e1d87d
     set regname {rax rdx}
e1d87d
 } else {
e1d87d
     verbose "Skipping tests for accessing DWARF-described variables."