From: Tom Tromey Date: Tue, 13 Dec 2022 22:16:16 +0000 (-0700) Subject: Use require supports_process_record X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ade3e4f5b154f983dddff333edd8dd7445955b67;p=binutils-gdb.git Use require supports_process_record This changes some tests to use "require supports_process_record". --- diff --git a/gdb/testsuite/gdb.mi/mi-record-changed.exp b/gdb/testsuite/gdb.mi/mi-record-changed.exp index c324e8a31e7..c5fb6355a6c 100644 --- a/gdb/testsuite/gdb.mi/mi-record-changed.exp +++ b/gdb/testsuite/gdb.mi/mi-record-changed.exp @@ -13,9 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if ![supports_process_record] { - return -} +require supports_process_record standard_testfile basics.c if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ diff --git a/gdb/testsuite/gdb.python/py-record-full.exp b/gdb/testsuite/gdb.python/py-record-full.exp index 07fa6a1d5c5..fe19d6b207c 100644 --- a/gdb/testsuite/gdb.python/py-record-full.exp +++ b/gdb/testsuite/gdb.python/py-record-full.exp @@ -17,10 +17,7 @@ # Skip this test if target does not support recording. -if { ![supports_process_record] } { - untested "skipping recording tests" - return -1 -} +require supports_process_record load_lib gdb-python.exp diff --git a/gdb/testsuite/gdb.reverse/break-precsave.exp b/gdb/testsuite/gdb.reverse/break-precsave.exp index b41c3621729..2f04cbe0057 100644 --- a/gdb/testsuite/gdb.reverse/break-precsave.exp +++ b/gdb/testsuite/gdb.reverse/break-precsave.exp @@ -17,9 +17,7 @@ # with breakpoints in a process record logfile. # This test suitable only for process record-replay -if ![supports_process_record] { - return -} +require supports_process_record standard_testfile break-reverse.c set precsave [standard_output_file break.precsave] @@ -39,10 +37,8 @@ proc precsave_tests {} { runto_main - if [supports_process_record] { - # Activate process record/replay - gdb_test_no_output "record" "turn on process record" - } + # Activate process record/replay + gdb_test_no_output "record" "turn on process record" gdb_test "break $end_location" \ "Breakpoint $decimal at .*$srcfile, line $end_location\." \ diff --git a/gdb/testsuite/gdb.reverse/consecutive-precsave.exp b/gdb/testsuite/gdb.reverse/consecutive-precsave.exp index 3c8696df6de..a0a4ed0014f 100644 --- a/gdb/testsuite/gdb.reverse/consecutive-precsave.exp +++ b/gdb/testsuite/gdb.reverse/consecutive-precsave.exp @@ -17,9 +17,7 @@ # consecutive instructions in a process record logfile. # This test suitable only for process record-replay -if ![supports_process_record] { - return -} +require supports_process_record standard_testfile consecutive-reverse.c set precsave [standard_output_file consecutive.precsave] @@ -30,10 +28,8 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { runto_main -if [supports_process_record] { - # Activate process record/replay - gdb_test_no_output "record" "turn on process record" -} +# Activate process record/replay +gdb_test_no_output "record" "turn on process record" set is_stmt [is_stmt_addresses $srcfile] diff --git a/gdb/testsuite/gdb.reverse/i386-precsave.exp b/gdb/testsuite/gdb.reverse/i386-precsave.exp index 7ab2f54a95a..301e3b60208 100644 --- a/gdb/testsuite/gdb.reverse/i386-precsave.exp +++ b/gdb/testsuite/gdb.reverse/i386-precsave.exp @@ -20,9 +20,7 @@ # # This test suitable only for process record-replay -if ![supports_process_record] { - return -} +require supports_process_record if {![is_x86_like_target]} { @@ -46,10 +44,8 @@ set end_of_inc_dec_tests [gdb_get_line_number " end inc_dec_tests "] runto_main -if [supports_process_record] { - # Activate process record/replay - gdb_test_no_output "record" "turn on process record" -} +# Activate process record/replay +gdb_test_no_output "record" "turn on process record" global hex global decimal diff --git a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp index 678aac8dc58..fd53806e467 100644 --- a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp +++ b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp @@ -36,9 +36,7 @@ # # This test suitable only for process record-replay -if ![supports_process_record] { - return -} +require supports_process_record standard_testfile machinestate.c ms1.c set precsave [standard_output_file machinestate.precsave] @@ -57,10 +55,8 @@ set endmain [gdb_get_line_number " end main " $srcfile] runto_main -if [supports_process_record] { - # Activate process record/replay - gdb_test_no_output "record" "turn on process record" -} +# Activate process record/replay +gdb_test_no_output "record" "turn on process record" gdb_test "break $endmain" \ "Breakpoint $decimal at .*$srcfile, line $endmain\." \ diff --git a/gdb/testsuite/gdb.reverse/solib-precsave.exp b/gdb/testsuite/gdb.reverse/solib-precsave.exp index 518a45b98dc..92d0a0d30a0 100644 --- a/gdb/testsuite/gdb.reverse/solib-precsave.exp +++ b/gdb/testsuite/gdb.reverse/solib-precsave.exp @@ -17,12 +17,7 @@ # with shared libraries and a logfile. # This test suitable only for process record-replay -if ![supports_process_record] { - return -} -if {[skip_shlib_tests]} { - return -} +require supports_process_record !skip_shlib_tests standard_testfile solib-reverse.c set precsave [standard_output_file solib.precsave] @@ -77,10 +72,8 @@ gdb_load_shlib $library2 runto_main -if [supports_process_record] { - # Activate process record/replay - gdb_test_no_output "record" "turn on process record" -} +# Activate process record/replay +gdb_test_no_output "record" "turn on process record" set end_of_main [gdb_get_line_number "end of main" ] gdb_test "break $end_of_main" \ diff --git a/gdb/testsuite/gdb.reverse/step-precsave.exp b/gdb/testsuite/gdb.reverse/step-precsave.exp index ec12389fc45..19cd5d9930e 100644 --- a/gdb/testsuite/gdb.reverse/step-precsave.exp +++ b/gdb/testsuite/gdb.reverse/step-precsave.exp @@ -21,9 +21,7 @@ # # This test suitable only for process record-replay -if ![supports_process_record] { - return -} +require supports_process_record standard_testfile step-reverse.c set precsave [standard_output_file step.precsave] @@ -34,10 +32,8 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { runto_main -if [supports_process_record] { - # Activate process record/replay - gdb_test_no_output "record" "turn on process record" -} +# Activate process record/replay +gdb_test_no_output "record" "turn on process record" set end_of_main [gdb_get_line_number "end of main" ] gdb_test "break $end_of_main" \ diff --git a/gdb/testsuite/gdb.reverse/until-precsave.exp b/gdb/testsuite/gdb.reverse/until-precsave.exp index 0c2d7537cd6..b5b2ba764d3 100644 --- a/gdb/testsuite/gdb.reverse/until-precsave.exp +++ b/gdb/testsuite/gdb.reverse/until-precsave.exp @@ -17,9 +17,7 @@ # 'advance' in precord logfile. # This test suitable only for process record-replay -if ![supports_process_record] { - return -} +require supports_process_record standard_testfile until-reverse.c ur1.c set precsave [standard_output_file until.precsave] @@ -38,10 +36,8 @@ set bp_location21 [gdb_get_line_number "set breakpoint 21 here"] runto_main -if [supports_process_record] { - # Activate process record/replay - gdb_test_no_output "record" "turn on process record" -} +# Activate process record/replay +gdb_test_no_output "record" "turn on process record" set end_of_main [gdb_get_line_number "set breakpoint 10a here" ] gdb_test "break $end_of_main" \ diff --git a/gdb/testsuite/gdb.reverse/watch-precsave.exp b/gdb/testsuite/gdb.reverse/watch-precsave.exp index bb8cab47afd..1f981393f0e 100644 --- a/gdb/testsuite/gdb.reverse/watch-precsave.exp +++ b/gdb/testsuite/gdb.reverse/watch-precsave.exp @@ -18,9 +18,7 @@ # debugging with watchpoints. # This test suitable only for process record-replay -if ![supports_process_record] { - return -} +require supports_process_record standard_testfile watch-reverse.c set precsave [standard_output_file watch.precsave] @@ -31,10 +29,8 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { runto_main -if [supports_process_record] { - # Activate process record/replay - gdb_test_no_output "record" "turn on process record" -} +# Activate process record/replay +gdb_test_no_output "record" "turn on process record" set end_location [gdb_get_line_number "end of main" ] gdb_test "break $end_location" \