diff options
author | Tom de Vries <tdevries@suse.de> | 2023-01-26 10:09:44 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-01-26 10:09:44 +0100 |
commit | 4fe960e8f105c1c3c672a56f768bb65b2b8cc04e (patch) | |
tree | 6b13f760b063ff0f179183a66cf48ef31ae99248 /gdb/testsuite/gdb.dwarf2 | |
parent | f212f7feec305bb61407fff312f681add8c1b164 (diff) | |
download | binutils-gdb-4fe960e8f105c1c3c672a56f768bb65b2b8cc04e.tar.gz |
[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.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-common-block.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-error.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-restore.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-restrict.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/fission-base.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/fission-loclists.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/trace-crash.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/typeddwarf.exp | 2 |
17 files changed, 17 insertions, 50 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/clztest.exp b/gdb/testsuite/gdb.dwarf2/clztest.exp index 75dfb15ec20..a42b99a0677 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 7ac4ecb8600..b4f5a71e05a 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 262b9728527..527ce6eb2a2 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 0980f43078f..564c8c47089 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 bdd7070dca2..d5401fa5701 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 535e74d255d..abb1dcebf9d 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 06dd4dc3723..c0105506d3d 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 fd8b2a84d22..3be758aa836 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 d51cb8e0b7a..6f5a17759ae 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 dfb531371eb..8ff6dadbe8b 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 e532c4cb8f2..d4b7917fbdd 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 63e75fb6343..a4bd938961e 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 b654de40fcb..e753ef1293e 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 a6fb3e875a8..ae8e20f4636 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 d906eeb69cc..6bcb2988324 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 06c0c67a35e..fc1966a016b 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 0b89741e361..3fafe9cf6f8 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 |