aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-01-26 10:09:44 +0100
committerTom de Vries <tdevries@suse.de>2023-01-26 10:09:44 +0100
commit4fe960e8f105c1c3c672a56f768bb65b2b8cc04e (patch)
tree6b13f760b063ff0f179183a66cf48ef31ae99248
parentf212f7feec305bb61407fff312f681add8c1b164 (diff)
downloadgdb-4fe960e8f105c1c3c672a56f768bb65b2b8cc04e.zip
gdb-4fe960e8f105c1c3c672a56f768bb65b2b8cc04e.tar.gz
gdb-4fe960e8f105c1c3c672a56f768bb65b2b8cc04e.tar.bz2
[gdb/testsuite] Add and use is_x86_64_m64_target
Add new proc is_x86_64_m64_target and use it where appropriate. Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/gdb.arch/amd64-break-on-asm-line.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-byte.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-disp-step.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-dword.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-entry-value-param.exp5
-rw-r--r--gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-entry-value.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-eval.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-prologue-skip.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-stap-expressions.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp5
-rw-r--r--gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp5
-rw-r--r--gdb/testsuite/gdb.arch/amd64-tailcall-self.exp2
-rw-r--r--gdb/testsuite/gdb.arch/amd64-word.exp2
-rw-r--r--gdb/testsuite/gdb.base/coredump-filter-build-id.exp5
-rw-r--r--gdb/testsuite/gdb.compile/compile-cplus.exp2
-rw-r--r--gdb/testsuite/gdb.compile/compile.exp2
-rw-r--r--gdb/testsuite/gdb.cp/namelessclass.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/clztest.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-common-block.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-error.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-restore.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-restrict.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-base.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-loclists.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/trace-crash.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/typeddwarf.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-reg-undefined.exp4
-rw-r--r--gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-linetable.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-unwind.exp2
-rw-r--r--gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp5
-rw-r--r--gdb/testsuite/gdb.reverse/singlejmp-reverse.exp12
-rw-r--r--gdb/testsuite/lib/gdb.exp5
54 files changed, 68 insertions, 114 deletions
diff --git a/gdb/testsuite/gdb.arch/amd64-break-on-asm-line.exp b/gdb/testsuite/gdb.arch/amd64-break-on-asm-line.exp
index faa6ce1..626240b 100644
--- a/gdb/testsuite/gdb.arch/amd64-break-on-asm-line.exp
+++ b/gdb/testsuite/gdb.arch/amd64-break-on-asm-line.exp
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile .S
diff --git a/gdb/testsuite/gdb.arch/amd64-byte.exp b/gdb/testsuite/gdb.arch/amd64-byte.exp
index 78763e4..b6dfc8a 100644
--- a/gdb/testsuite/gdb.arch/amd64-byte.exp
+++ b/gdb/testsuite/gdb.arch/amd64-byte.exp
@@ -18,7 +18,7 @@
# This file is part of the gdb testsuite.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile amd64-pseudo.c
diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
index fea7145..ef44a24 100644
--- a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
+++ b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
@@ -18,7 +18,7 @@
# Test displaced stepping over VEX-encoded RIP-relative AVX
# instructions.
-require {istarget x86_64-*-*} is_lp64_target have_avx
+require is_x86_64_m64_target have_avx
standard_testfile .S
diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step.exp b/gdb/testsuite/gdb.arch/amd64-disp-step.exp
index 6ca95f4..2aee1e0 100644
--- a/gdb/testsuite/gdb.arch/amd64-disp-step.exp
+++ b/gdb/testsuite/gdb.arch/amd64-disp-step.exp
@@ -18,7 +18,7 @@
# Test amd64 displaced stepping.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
set newline "\[\r\n\]*"
diff --git a/gdb/testsuite/gdb.arch/amd64-dword.exp b/gdb/testsuite/gdb.arch/amd64-dword.exp
index 9f22760..201abb0 100644
--- a/gdb/testsuite/gdb.arch/amd64-dword.exp
+++ b/gdb/testsuite/gdb.arch/amd64-dword.exp
@@ -18,7 +18,7 @@
# This file is part of the gdb testsuite.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile amd64-pseudo.c
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
index 30b4395..774b90b 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
standard_testfile
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp
index 25615cea..f6d11b2 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
set srcfile ${srcfile2}
lappend opts optimize=-O2 additional_flags=-gdwarf-5
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp
index 242a7a3..da1445f 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-param.exp
@@ -20,9 +20,8 @@ if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1"
set srcfile ${srcfile2}
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping amd64-entry-value-param."
- return
+} else {
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp b/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp
index be22937..ff3e024 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp
@@ -15,7 +15,7 @@
standard_testfile .S .cc
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing_full "failed to prepare" \
[list $testfile "c++" $srcfile {}]] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value.exp b/gdb/testsuite/gdb.arch/amd64-entry-value.exp
index f5aa42a..a700e9a 100644
--- a/gdb/testsuite/gdb.arch/amd64-entry-value.exp
+++ b/gdb/testsuite/gdb.arch/amd64-entry-value.exp
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
set srcfile ${testfile}.cc
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-eval.exp b/gdb/testsuite/gdb.arch/amd64-eval.exp
index c9ae30f..73e2864 100644
--- a/gdb/testsuite/gdb.arch/amd64-eval.exp
+++ b/gdb/testsuite/gdb.arch/amd64-eval.exp
@@ -17,7 +17,7 @@
# This testcase exercises evaluation with amd64 calling conventions.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile .cc
diff --git a/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp b/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
index a5aaeed..156300b 100644
--- a/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
+++ b/gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
@@ -29,7 +29,7 @@
standard_testfile .S
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {nopie}] } {
return -1
diff --git a/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp b/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
index 19b2972..b6a25f8 100644
--- a/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
+++ b/gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
@@ -30,7 +30,7 @@
set opts {}
standard_testfile .c
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
return -1
diff --git a/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp b/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp
index 7f45b95..56fe301 100644
--- a/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp
+++ b/gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
set srcfile ${srcfile2}
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp b/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp
index 44464bd..be28fa0 100644
--- a/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-skip.exp
@@ -16,7 +16,7 @@
standard_testfile .S
set binfile ${binfile}.o
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
untested "failed to compile"
diff --git a/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
index d02c141..f771b09 100644
--- a/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
+++ b/gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
@@ -25,7 +25,7 @@ if [info exists COMPILE] {
set srcfile ${csrcfile}
lappend opts debug optimize=-O0
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if {[prepare_for_testing "failed to prepare" ${binfile} $srcfile $opts]} {
diff --git a/gdb/testsuite/gdb.arch/amd64-stap-expressions.exp b/gdb/testsuite/gdb.arch/amd64-stap-expressions.exp
index 4362704..48124a8 100644
--- a/gdb/testsuite/gdb.arch/amd64-stap-expressions.exp
+++ b/gdb/testsuite/gdb.arch/amd64-stap-expressions.exp
@@ -15,7 +15,7 @@
standard_testfile ".S"
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
diff --git a/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp b/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp
index 98083ba..7758b9c 100644
--- a/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp
+++ b/gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp
@@ -17,10 +17,7 @@
standard_testfile ".S"
-if { ![istarget "x86_64-*-*"] || ![is_lp64_target] } {
- verbose "Skipping $testfile.exp"
- return
-}
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
diff --git a/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp b/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp
index 9a453e5..147d0ff 100644
--- a/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp
+++ b/gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
proc test_probe { probe_name } {
with_test_prefix "probe: ${probe_name}" {
diff --git a/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp b/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp
index f2172a0..fdfcb5a 100644
--- a/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp
+++ b/gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile amd64-stap-wrong-subexp.S
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
index 756f210..41b03b8 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
standard_testfile amd64-tailcall-cxx1.cc amd64-tailcall-cxx2.cc
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} "${srcfile} ${srcfile2}" $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
index 30be37f..3267a5a 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
standard_testfile
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
lappend opts nopie
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp
index 9d3e4d4..1602aff 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp
@@ -20,9 +20,8 @@ if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.arch/amd64-tailcall-ret.exp COMPILE=1"
standard_testfile
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping ${testfile}."
- return
+} else {
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
index e2fa932..03e7ae9 100644
--- a/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
+++ b/gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
@@ -15,7 +15,7 @@
standard_testfile .S
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {}] } {
return -1
diff --git a/gdb/testsuite/gdb.arch/amd64-word.exp b/gdb/testsuite/gdb.arch/amd64-word.exp
index 5c3164a..76722f2 100644
--- a/gdb/testsuite/gdb.arch/amd64-word.exp
+++ b/gdb/testsuite/gdb.arch/amd64-word.exp
@@ -18,7 +18,7 @@
# This file is part of the gdb testsuite.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile amd64-pseudo.c
diff --git a/gdb/testsuite/gdb.base/coredump-filter-build-id.exp b/gdb/testsuite/gdb.base/coredump-filter-build-id.exp
index 3c0021a..1ca1052 100644
--- a/gdb/testsuite/gdb.base/coredump-filter-build-id.exp
+++ b/gdb/testsuite/gdb.base/coredump-filter-build-id.exp
@@ -28,10 +28,7 @@ if { ![istarget *-*-linux*] } {
untested "$testfile.exp"
return -1
}
-if { ![istarget "x86_64-*-*"] || ![is_lp64_target] } {
- untested "$testfile.exp"
- return -1
-}
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
return -1
diff --git a/gdb/testsuite/gdb.compile/compile-cplus.exp b/gdb/testsuite/gdb.compile/compile-cplus.exp
index 0b7cb59..489236a 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus.exp
@@ -24,7 +24,7 @@ if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
lappend options c++
}
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
+if { ![is_x86_64_m64_target] } {
verbose "Skipping x86_64 LOC_CONST test."
set srcfile3 ""
}
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp
index 9fdd367..f3d87cd 100644
--- a/gdb/testsuite/gdb.compile/compile.exp
+++ b/gdb/testsuite/gdb.compile/compile.exp
@@ -22,7 +22,7 @@ if [test_compiler_info gcc*] {
lappend options additional_flags=-g3
}
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
+if { ![is_x86_64_m64_target] } {
verbose "Skipping x86_64 LOC_CONST test."
set srcfile3 ""
}
diff --git a/gdb/testsuite/gdb.cp/namelessclass.exp b/gdb/testsuite/gdb.cp/namelessclass.exp
index 24cd625..f6a95f6 100644
--- a/gdb/testsuite/gdb.cp/namelessclass.exp
+++ b/gdb/testsuite/gdb.cp/namelessclass.exp
@@ -22,9 +22,7 @@ load_lib dwarf.exp
# This test can only be run on x86-like targets which support DWARF.
require dwarf2_support allow_cplus_tests
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
set csrcfile "${testfile}.cc"
diff --git a/gdb/testsuite/gdb.dwarf2/clztest.exp b/gdb/testsuite/gdb.dwarf2/clztest.exp
index 75dfb15..a42b99a 100644
--- a/gdb/testsuite/gdb.dwarf2/clztest.exp
+++ b/gdb/testsuite/gdb.dwarf2/clztest.exp
@@ -22,9 +22,7 @@ set test "clztest"
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S \
{nodebug nopie additional_flags=-nostdlib}] } {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
index 7ac4ecb..b4f5a71 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
@@ -19,9 +19,7 @@ load_lib dwarf.exp
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
# It requires fortran.
require allow_fortran_tests
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
index 262b972..527ce6e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
require dwarf2_support
# This test can only be run on x86_64 targets.
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
index 0980f43..564c8c4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
@@ -20,10 +20,7 @@ require dwarf2_support
standard_testfile .S
-if { ![istarget "x86_64-*-*"] || ![is_lp64_target] } {
- verbose "Skipping $gdb_test_file_name."
- return
-}
+require is_x86_64_m64_target
# We can't use prepare_for_testing here because we need to check the
# 'file' command's output.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
index bdd7070..d5401fa 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
@@ -22,9 +22,7 @@ load_lib dwarf.exp
require dwarf2_support
# This test can only be run on x86_64 targets.
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
set basename "inline-break"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
index 535e74d..abb1dce 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
@@ -21,9 +21,7 @@ set test "dw2-op-out-param"
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S {nodebug}] } {
return -1
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
index 06dd4dc..c010550 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
require dwarf2_support
# This test can only be run on x86_64 targets.
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
index fd8b2a8..3be758a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
@@ -16,9 +16,7 @@
# Test handling of DW_CFA_restore_state.
# This test can only be run on x86_64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
set opts [list {additional_flags=-nostdlib}]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
index d51cb8e..6f5a177 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
@@ -19,9 +19,7 @@ load_lib dwarf.exp
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
index dfb5313..8ff6dad 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
@@ -22,9 +22,7 @@ load_lib dwarf.exp
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
set csrcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
index e532c4c..d4b7917 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
@@ -20,9 +20,7 @@ standard_testfile .S
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile {nodebug nopie}]} {
return -1
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
index 63e75fb..a4bd938 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
# This test can only be run on x86-64 targets. It checks for a bug
# that existed in amd64-tdep.c, and depends on an error being produced
# from within that file.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
# This test can only be run on targets which support DWARF-2 and use gas.
require dwarf2_support
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp
index b654de4..e753ef1 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
@@ -22,9 +22,7 @@ require {!is_remote host}
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
index a6fb3e8..ae8e20f 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
@@ -27,9 +27,7 @@ require {!is_remote host}
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
index d906eeb..6bcb298 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
@@ -22,9 +22,7 @@ require {!is_remote host}
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/trace-crash.exp b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
index 06c0c67..fc1966a 100644
--- a/gdb/testsuite/gdb.dwarf2/trace-crash.exp
+++ b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
@@ -20,9 +20,7 @@ load_lib trace-support.exp
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
index 0b89741..3fafe9c 100644
--- a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
+++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
@@ -23,7 +23,7 @@ require dwarf2_support
# This test can only be run on x86 and amd64 targets (and not x32).
if { [is_x86_like_target] } {
set sfile ${test}.S
-} elseif {[istarget "x86_64-*-*"] && [is_lp64_target]} {
+} elseif { [is_x86_64_m64_target] } {
set sfile ${test}-amd64.S
} else {
return 0
diff --git a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
index 94db942..caca969 100644
--- a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
+++ b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
@@ -20,9 +20,7 @@ set MIFLAGS "-i=mi"
require dwarf2_support
# This test can only be run on x86_64 targets.
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
gdb_exit
if [mi_gdb_start] {
diff --git a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp
index 4657509..76acabc 100644
--- a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp
+++ b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp
@@ -28,9 +28,8 @@ if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.mi/mi2-amd64-entry-value.exp COMPILE=1"
set srcfile ${testfile}.c
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping mi2-amd64-entry-value."
- return
+} else {
+ require is_x86_64_m64_target
}
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
index d2c29af..2fab2bb 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
@@ -19,10 +19,7 @@ require allow_python_tests
standard_testfile amd64-py-framefilter-invalidarg.S
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping py-framefilter-invalidarg."
- return
-}
+require is_x86_64_m64_target
# We cannot use prepare_for_testing as we have to set the safe-patch
# to check objfile and progspace printers.
diff --git a/gdb/testsuite/gdb.python/py-linetable.exp b/gdb/testsuite/gdb.python/py-linetable.exp
index d19516d..c43fb7f 100644
--- a/gdb/testsuite/gdb.python/py-linetable.exp
+++ b/gdb/testsuite/gdb.python/py-linetable.exp
@@ -22,9 +22,8 @@ if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.python/py-linetable.exp COMPILE=1"
standard_testfile
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping ${testfile}."
- return
+} else {
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp
index 0d81737..5bf9ae1 100644
--- a/gdb/testsuite/gdb.python/py-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-unwind.exp
@@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug $fla
}
# This test runs on a specific platform.
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { continue }
+require is_x86_64_m64_target
# The following tests require execution.
diff --git a/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp b/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp
index dd6e4d2..9654dff 100644
--- a/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp
@@ -22,9 +22,8 @@ if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.reverse/amd64-tailcall-reverse.exp COMPILE=1"
standard_testfile
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping ${testfile}."
- return
+} else {
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
diff --git a/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp b/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp
index bc7e687..23310e7 100644
--- a/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp
@@ -26,12 +26,12 @@ if [info exists COMPILE] {
] == -1 } {
return -1
}
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping ${testfile}."
- return
-} elseif { [build_executable ${testfile}.exp ${testfile} \
- [list ${srcfile} ${srcfile2}] {}] == -1 } {
- return -1
+} else {
+ require is_x86_64_m64_target
+ if { [build_executable ${testfile}.exp ${testfile} \
+ [list ${srcfile} ${srcfile2}] {}] == -1 } {
+ return -1
+ }
}
clean_restart $executable
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index e2af5a2..0f9fe9a 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3414,6 +3414,11 @@ proc is_x86_like_target {} {
return [expr [is_ilp32_target] && ![is_amd64_regs_target]]
}
+# Return 1 if this target is an x86_64 with -m64.
+proc is_x86_64_m64_target {} {
+ return [expr [istarget x86_64-*-* ] && [is_lp64_target]]
+}
+
# Return 1 if this target is an arm or aarch32 on aarch64.
gdb_caching_proc is_aarch32_target {