aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2
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 /gdb/testsuite/gdb.dwarf2
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.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2')
-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
17 files changed, 17 insertions, 50 deletions
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