From: Tom de Vries Date: Tue, 30 Sep 2025 19:32:50 +0000 (+0200) Subject: [gdb/testsuite, tclint] Fix gdb.dwarf2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c20bd67b533596edd28a85c73580ec431ea045b;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite, tclint] Fix gdb.dwarf2 Running tclint on the test-cases in gdb.dwarf2 shows a few problems. Fix these. --- diff --git a/gdb/tclint.toml b/gdb/tclint.toml index e37c7d9f3a5..f32d0648829 100644 --- a/gdb/tclint.toml +++ b/gdb/tclint.toml @@ -36,7 +36,6 @@ exclude = [ "gdb/testsuite/lib", "gdb/testsuite/gdb.arch", "gdb/testsuite/gdb.base", -"gdb/testsuite/gdb.dwarf2", # IGNORE (document reason in trailing comment): "gdb/testsuite/gdb.stabs", # To be removed. ] diff --git a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp index 4f6701f035e..40177449f33 100644 --- a/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp +++ b/gdb/testsuite/gdb.dwarf2/anon-ns-fn.exp @@ -17,7 +17,7 @@ require allow_cplus_tests standard_testfile .cc -if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}] { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp index eea13af3aa4..f81826f69fe 100644 --- a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp +++ b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp @@ -65,7 +65,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp index 82eaed776cd..59330ac6b49 100644 --- a/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp +++ b/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp @@ -69,11 +69,11 @@ Dwarf::assemble $asm_file { } } -if [prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}] { +if {[prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}]} { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp index a9eddc39b1b..ff9f41f94f7 100644 --- a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp +++ b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp @@ -20,7 +20,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} $sources] } { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.exp b/gdb/testsuite/gdb.dwarf2/callframecfa.exp index 712e51e4e0e..2dd036fd00e 100644 --- a/gdb/testsuite/gdb.dwarf2/callframecfa.exp +++ b/gdb/testsuite/gdb.dwarf2/callframecfa.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/clztest.exp b/gdb/testsuite/gdb.dwarf2/clztest.exp index 93c2cedd940..554077ac77d 100644 --- a/gdb/testsuite/gdb.dwarf2/clztest.exp +++ b/gdb/testsuite/gdb.dwarf2/clztest.exp @@ -29,7 +29,7 @@ if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp index f4d91951551..b1e890ce44d 100644 --- a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp +++ b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp @@ -59,7 +59,7 @@ proc do_test {cu_lang gdb_lang} { return -1 } - if ![runto func] { + if {![runto func]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/count.exp b/gdb/testsuite/gdb.dwarf2/count.exp index 4d2ec311dc7..92b0ebf194f 100644 --- a/gdb/testsuite/gdb.dwarf2/count.exp +++ b/gdb/testsuite/gdb.dwarf2/count.exp @@ -130,7 +130,7 @@ if { [prepare_for_testing "failed to prepare" $testfile \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/data-loc.exp b/gdb/testsuite/gdb.dwarf2/data-loc.exp index 94b9e09e8d7..615d04bfaf5 100644 --- a/gdb/testsuite/gdb.dwarf2/data-loc.exp +++ b/gdb/testsuite/gdb.dwarf2/data-loc.exp @@ -124,7 +124,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp index 28f21571184..583b230fd41 100644 --- a/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp @@ -59,8 +59,8 @@ Dwarf::assemble { } } -if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \ - [list ldflags=-nostartfiles]] { +if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \ + [list ldflags=-nostartfiles]]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp index 77db1442758..936cfe56eb6 100644 --- a/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp @@ -66,8 +66,8 @@ Dwarf::assemble { } } -if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \ - [list ldflags=-nostartfiles]] { +if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \ + [list ldflags=-nostartfiles]]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl b/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl index 4de96ffe20e..19d618f9860 100644 --- a/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl +++ b/gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl @@ -83,8 +83,8 @@ Dwarf::assemble { } } -if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \ - [list ldflags=-nostartfiles]] { +if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \ + [list ldflags=-nostartfiles]]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/debug-names.exp b/gdb/testsuite/gdb.dwarf2/debug-names.exp index 7f63af29b43..d099aa9ed60 100644 --- a/gdb/testsuite/gdb.dwarf2/debug-names.exp +++ b/gdb/testsuite/gdb.dwarf2/debug-names.exp @@ -58,8 +58,8 @@ Dwarf::assemble { } } -if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \ - [list ldflags=-nostartfiles]] { +if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" \ + [list ldflags=-nostartfiles]]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-align.exp b/gdb/testsuite/gdb.dwarf2/dw2-align.exp index dfb11af8c1c..84f016bc3f7 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-align.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-align.exp @@ -71,7 +71,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp index a0ae49807a2..429386f26d0 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp @@ -173,7 +173,7 @@ proc run_test { goto_main } { clean_restart ${::testfile} if { $goto_main } { - if ![runto_main] { + if {![runto_main]} { return -1 } } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp index b8f96a19ab0..271b6ec65fa 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp @@ -71,7 +71,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp index 73567adf262..b5ad32bdf86 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp @@ -23,8 +23,8 @@ set additional_flags [gdb_target_symbol_prefix_flags_asm] standard_testfile .S set executable ${testfile} -if [prepare_for_testing "failed to prepare" $testfile $srcfile \ - [list nodebug $additional_flags]] { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ + [list nodebug $additional_flags]]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp index afe23a63692..13015a340f8 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp @@ -19,7 +19,7 @@ require dwarf2_support standard_testfile .c -debug.S -if [is_ilp32_target] { +if {[is_ilp32_target]} { set ptrbits 32 } else { set ptrbits 64 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-complex-parts.exp b/gdb/testsuite/gdb.dwarf2/dw2-complex-parts.exp index 509924ab5fe..2ad358fd64c 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-complex-parts.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-complex-parts.exp @@ -31,8 +31,8 @@ require dwarf2_support standard_testfile main.c -debug.S -if [prepare_for_testing "failed to prepare" $testfile \ - "${srcfile}" {}] { +if {[prepare_for_testing "failed to prepare" $testfile \ + "${srcfile}" {}]} { return -1 } @@ -67,19 +67,19 @@ Dwarf::assemble $asm_file { declare_labels cf_type cd_type cld_type cf_type: DW_TAG_base_type { - DW_AT_byte_size [expr 2 * $::float_size] DW_FORM_sdata + DW_AT_byte_size [expr {2 * $::float_size}] DW_FORM_sdata DW_AT_encoding @DW_ATE_complex_float DW_AT_name "complex float" } cd_type: DW_TAG_base_type { - DW_AT_byte_size [expr 2 * $::double_size] DW_FORM_sdata + DW_AT_byte_size [expr {2 * $::double_size}] DW_FORM_sdata DW_AT_encoding @DW_ATE_complex_float DW_AT_name "complex double" } cld_type: DW_TAG_base_type { - DW_AT_byte_size [expr 2 * $::long_double_size] DW_FORM_sdata + DW_AT_byte_size [expr {2 * $::long_double_size}] DW_FORM_sdata DW_AT_encoding @DW_ATE_complex_float DW_AT_name "complex long double" } @@ -105,7 +105,7 @@ Dwarf::assemble $asm_file { declare_labels ci_type ci_type: DW_TAG_base_type { - DW_AT_byte_size [expr 2 * $::int_size] DW_FORM_sdata + DW_AT_byte_size [expr {2 * $::int_size}] DW_FORM_sdata DW_AT_encoding @DW_ATE_lo_user DW_AT_name "complex int" } @@ -122,7 +122,7 @@ Dwarf::assemble $asm_file { declare_labels clang_cf_type clang_cd_type clang_cld_type clang_cf_type: DW_TAG_base_type { - DW_AT_byte_size [expr 2 * $::float_size] DW_FORM_sdata + DW_AT_byte_size [expr {2 * $::float_size}] DW_FORM_sdata DW_AT_encoding @DW_ATE_complex_float DW_AT_name "complex" } @@ -133,7 +133,7 @@ Dwarf::assemble $asm_file { } clang_cd_type: DW_TAG_base_type { - DW_AT_byte_size [expr 2 * $::double_size] DW_FORM_sdata + DW_AT_byte_size [expr {2 * $::double_size}] DW_FORM_sdata DW_AT_encoding @DW_ATE_complex_float DW_AT_name "complex" } @@ -144,7 +144,7 @@ Dwarf::assemble $asm_file { } clang_cld_type: DW_TAG_base_type { - DW_AT_byte_size [expr 2 * $::long_double_size] DW_FORM_sdata + DW_AT_byte_size [expr {2 * $::long_double_size}] DW_FORM_sdata DW_AT_encoding @DW_ATE_complex_float DW_AT_name "complex" } @@ -157,12 +157,12 @@ Dwarf::assemble $asm_file { } } -if [prepare_for_testing "failed to prepare" $testfile \ - "${asm_file} ${srcfile}" {}] { +if {[prepare_for_testing "failed to prepare" $testfile \ + "${asm_file} ${srcfile}" {}]} { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } @@ -191,7 +191,7 @@ proc do_test { type {clang 0}} { gdb_test "ptype '$ctype'" \ "type = $ctype" - eval set type_size \$::${type_id}_size + set type_size [subst \$::${type_id}_size] gdb_test "p sizeof ('$type')" \ " = $type_size" @@ -200,7 +200,7 @@ proc do_test { type {clang 0}} { # With clang, the ctype name does not uniquely map to a type, # so the size is unpredictable. gdb_test "p sizeof ('$ctype')" \ - " = [expr 2 * $type_size]" + " = [expr {2 * $type_size}]" } set re_kfail \ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp index 696ccfac925..8cf941da2de 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp @@ -449,7 +449,7 @@ remote_exec host "sh -c \"for d in $dircreatelist; do cp ${srcdir}/${subdir}/${s clean_restart ${testfile} -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp index ddbab26ddc9..eb7a6d8478d 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp @@ -97,7 +97,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp b/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp index 66368ca6505..3bbd5b8bdf2 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp @@ -29,8 +29,8 @@ gdb_test_no_output "set breakpoint pending off" gdb_test "break 'z:file.c':func" {Breakpoint [0-9]+ at .*} -set dos [expr [istarget "*-*-cygwin*"] || [istarget "i?86-*-mingw*"] \ - || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"] ] +set dos [expr {[istarget "*-*-cygwin*"] || [istarget "i?86-*-mingw*"] \ + || [istarget "*-*-msdosdjgpp*"] || [istarget "*-*-go32*"]}] if { $dos } { gdb_test "break file.c:func" {Breakpoint [0-9]+ at .*} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp index b1980e8d7eb..6274bbf617c 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp @@ -26,7 +26,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug nopie} return -1 } -if ![runto stop_frame] { +if {![runto stop_frame]} { perror "Failed to stop in stop_frame" return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp index 1a0eebad452..1099edb95bb 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-pc.exp @@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } @@ -60,7 +60,7 @@ foreach var { r1_s r1_e r2_s r2_e r3_s r3_e } { # Line on which 'foo' is declared. Used in generated debug. set foo_decl_line [gdb_get_line_number "foo decl line"] -if [is_ilp32_target] { +if {[is_ilp32_target]} { set ptr_type "data4" } else { set ptr_type "data8" @@ -87,7 +87,7 @@ proc build_and_runto_main { suffix asm_file } { return false } - if ![runto_main] { + if {![runto_main]} { return false } @@ -244,7 +244,7 @@ proc_with_prefix use_low_high_bounds_with_entry_offset { dwarf_version } { declare_labels lines_table - set foo_offset [expr $::foo_middle_addr - $::foo_start_addr] + set foo_offset [expr {$::foo_middle_addr - $::foo_start_addr}] cu { version $::dwarf_version } { compile_unit { @@ -420,7 +420,7 @@ proc_with_prefix use_ranges_with_entry_offset { dwarf_version } { declare_labels lines_table ranges_label - set foo_offset [expr $::foo_middle_addr - $::r1_s] + set foo_offset [expr {$::foo_middle_addr - $::r1_s}] cu { version $::dwarf_version } { compile_unit { diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp index 97194d53339..2dda0e5258c 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp @@ -176,7 +176,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } @@ -201,7 +201,7 @@ gdb_test "bt" [multi_line \ clean_restart ${testfile} -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp index e0f208c2273..fed0d2e0ec3 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp @@ -21,7 +21,7 @@ if { [prepare_for_testing "failed to prepare" "dw2-entry-value" {dw2-entry-value return -1 } -if ![runto f] { +if {![runto f]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl b/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl index 7e60b6e28bf..9c0622cc592 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl +++ b/gdb/testsuite/gdb.dwarf2/dw2-epilogue-begin.exp.tcl @@ -169,7 +169,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp index 766608944fc..e8a80830931 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp @@ -117,7 +117,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp index 6611bf31828..8c09406aecd 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp @@ -30,7 +30,7 @@ with_shared_gdb { proc line_for { l } { global srcfile set line [gdb_get_line_number "$l:" $srcfile] - return [expr $line + 1] + return [expr {$line + 1}] } # A helper proc to create the DWARF assembly for the test. diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp index ef48038e465..0a1f5d8f710 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp @@ -62,7 +62,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto func] { +if {![runto func]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp index ecf0614bae0..99f008036bd 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp @@ -157,7 +157,7 @@ proc do_test { start_label func_name tag } { return -1 } - if ![runto_main] { + if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp index 3d08ac08f71..8d68aa14fd2 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp @@ -145,7 +145,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp index ad914b9c915..77a64a2370e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp @@ -134,7 +134,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp index e8668e06ff2..e97f325feff 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp @@ -289,7 +289,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp index 938f16d1a1b..c4cc63c2c4f 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp @@ -42,7 +42,7 @@ gdb_unload set objcopy_program [gdb_find_objcopy] set command "$objcopy_program -N block_start -N block_end -N break_at ${binfile} ${binfile_stripped}" verbose -log "Executing: $command" -set result [catch "exec $command" output] +set result [catch {exec {*}$command} output] verbose "result is $result" verbose "output is $output" if {$result != 0} { @@ -51,7 +51,7 @@ if {$result != 0} { gdb_load ${binfile_stripped} -if ![runto "*${break_at}"] { +if {![runto "*${break_at}"]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp index a4309d4bdd6..0e9b0a2cf55 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp @@ -123,7 +123,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp index a544616a200..e20e355960d 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp @@ -126,7 +126,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp index 8e99cb43265..f517807e04f 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error-2.exp @@ -43,8 +43,8 @@ Dwarf::assemble $asm_file { } } -if [build_executable "failed to prepare" $testfile \ - [list $asm_file $srcfile] {nodebug}] { +if {[build_executable "failed to prepare" $testfile \ + [list $asm_file $srcfile] {nodebug}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp index ded5f107899..6d3d86b2924 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-error.exp @@ -45,8 +45,8 @@ Dwarf::assemble $asm_file { } } -if [build_executable "failed to prepare" $testfile \ - [list $asm_file $srcfile] {nodebug}] { +if {[build_executable "failed to prepare" $testfile \ + [list $asm_file $srcfile] {nodebug}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp index 0ae600454e1..b15d13d51e7 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-forth-and-back.exp @@ -55,8 +55,8 @@ Dwarf::assemble $asm_file { } } -if [prepare_for_testing "failed to prepare" $testfile \ - [list $asm_file $srcfile] {nodebug}] { +if {[prepare_for_testing "failed to prepare" $testfile \ + [list $asm_file $srcfile] {nodebug}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp index fc72cf78ef3..7fbe22ed3f4 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inter-cu-symbol.exp @@ -77,7 +77,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto main] { +if {![runto main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp index 77bac5211db..4da14d87318 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp @@ -148,7 +148,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp index 1b9ccaad5f9..ff92fbd9243 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp @@ -99,7 +99,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp index 144e62e8bfe..c51f710090b 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp @@ -113,7 +113,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } @@ -129,7 +129,7 @@ gdb_continue_to_breakpoint "bar2" "\[^\r\n\]*:41\r\n.*" gdb_test "n" "foo \\(2\\);" "bar2, 1st next" gdb_test "n" "foo \\(4\\);" "bar2, 2nd next" -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp index 6eacf0be80c..fbaa53e9e13 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-lines.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-lines.exp @@ -33,7 +33,7 @@ with_shared_gdb { proc line_for { l } { global srcfile set line [gdb_get_line_number "$l:" $srcfile] - return [expr $line + 1] + return [expr {$line + 1}] } # Execute test. @@ -119,7 +119,7 @@ proc test_1 { _cv _cdw64 _lv _ldw64 {_string_form ""}} { return -1 } - if ![runto_main] { + if {![runto_main]} { return -1 } @@ -135,9 +135,9 @@ proc test_1 { _cv _cdw64 _lv _ldw64 {_string_form ""}} { # Add unique test prefix. proc test { cv cdw64 lv ldw64 {string_form ""}} { with_test_prefix cv=$cv { - with_test_prefix cdw=[expr $cdw64 ? 64 : 32] { + with_test_prefix cdw=[expr {$cdw64 ? 64 : 32}] { with_test_prefix lv=$lv { - with_test_prefix ldw=[expr $ldw64 ? 64 : 32] { + with_test_prefix ldw=[expr {$ldw64 ? 64 : 32}] { if { $string_form == "" } { test_1 $cv $cdw64 $lv $ldw64 } else { diff --git a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp index e05e4c92562..f23366db3ef 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp @@ -49,7 +49,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp index cec3f1591d5..05865f6995a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp @@ -24,8 +24,8 @@ set additional_flags [gdb_target_symbol_prefix_flags_asm] standard_testfile .S -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ - ${additional_flags}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ + ${additional_flags}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-no-code-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-no-code-cu.exp index 6153def31c5..7ff8a8a96c1 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-no-code-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-no-code-cu.exp @@ -15,7 +15,7 @@ standard_testfile .c main.c -if [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2"] { +if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2"]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp index 526f88af7ac..00e2863cd16 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp @@ -272,7 +272,7 @@ proc file_symbols {type} { file_symbols no-run -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp index 5c412f49c76..26b2de22579 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp @@ -34,7 +34,7 @@ gdb_test "p array2" " = 2" "array2 using DW_OP_call2" gdb_test "p array3" " = 3" "array3 using DW_OP_call4" # Location lists need PC. -if ![runto_main] { +if {![runto_main]} { return -1 } gdb_test "p arraynoloc" " = " diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp index 14d5ab18667..cc8985b6a34 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp @@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S {nodebug}] } { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp index 866df3ac105..76b959146ea 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp @@ -44,7 +44,7 @@ proc build_test_program {} { # Creating a CU with 4-byte addresses lets this test link on # both 32- and 64-bit machines. cu { addr_size 4 } { - + DW_TAG_compile_unit { DW_AT_language @DW_LANG_C99 DW_AT_name $srcfile @@ -58,7 +58,7 @@ proc build_test_program {} { DW_AT_encoding @DW_ATE_signed DW_AT_name integer } - + array_label: DW_TAG_array_type { DW_AT_name foo__array_type DW_AT_type :$int_label @@ -67,9 +67,9 @@ proc build_test_program {} { DW_AT_type :$int_label DW_AT_lower_bound 0 DW_FORM_data1 DW_AT_upper_bound 127 DW_FORM_data1 - } + } } - + struct_label: DW_TAG_structure_type { DW_AT_name "foo" DW_AT_byte_size 12 DW_FORM_sdata @@ -90,12 +90,12 @@ proc build_test_program {} { DW_AT_data_member_location 8 data1 } } - + pointer_label: DW_TAG_pointer_type { DW_AT_byte_size 4 DW_FORM_sdata DW_AT_type :$struct_label } - + DW_TAG_subprogram { DW_AT_name func01 DW_AT_type :$int_label @@ -108,7 +108,7 @@ proc build_test_program {} { DW_AT_location {} DW_FORM_block1 } } - + DW_TAG_subprogram { DW_AT_name main DW_AT_type :$int_label @@ -119,7 +119,7 @@ proc build_test_program {} { } } } - + set sources "$srcfile $asm_file" if {[build_executable "failed to compile" $testfile $sources {nodebug}]} { return -1 @@ -146,17 +146,17 @@ proc do_console_test {} { if {![runto func01]} { return -1 } - + gdb_test "info addr ptr" "Symbol \"ptr\" is optimized out." - + gdb_test "print ptr" "" - + gdb_test "print *ptr" "value has been optimized out" - + gdb_test "print ptr->a" "value has been optimized out" - + gdb_test "print ptr->x" "value has been optimized out" - + gdb_test "print ptr->y" "value has been optimized out" } } @@ -171,19 +171,19 @@ proc do_mi_test {} { global mi_gdb_prompt global binfile - + with_test_prefix "mi" { if {[mi_clean_restart $::testfile]} { return } - + # This causes GDB to dereference a pointer-to-structure when doing # -var-create. mi_gdb_test "-gdb-set print object on" ".*" "set print object on" - + mi_gdb_test "-break-insert main" ".*" "insert breakpoint main" mi_gdb_test "-break-insert func01" ".*" "insert breakpoint func01" - + # Run to main. Use an explicit expect here since the limited # debug info will result in output that isn't handled by the # MI test utilities. @@ -197,7 +197,7 @@ proc do_mi_test {} { fail "$test (timeout)" } } - + # Run to func01. Use an explicit expect here as above. set test "continue to func01" mi_send_resuming_command "exec-continue" "$test" @@ -209,14 +209,14 @@ proc do_mi_test {} { fail "$test (timeout)" } } - + # Test that -var-create for 'ptr' is successful. mi_create_varobj "var1" "ptr" "create varobj for ptr" set struct_foo_ptr \ [string cat \ [string_to_regexp "struct foo *"] "( $::re_address_class)?"] - + # Test that -var-list-children of 'ptr' is successful. mi_list_varobj_children "var1" \ [list \ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp index 70db4712f49..76266edab5f 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp @@ -79,7 +79,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp index 57ef6d00429..e142292d86e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp @@ -24,7 +24,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \ return -1 } -if ![runto f] { +if {![runto f]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp index 8e66abea93c..740ec442ba0 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp @@ -83,7 +83,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } @@ -94,7 +94,7 @@ with_test_prefix "ignore-prologue-end" { clean_restart $::testfile gdb_test_no_output "maintenance set ignore-prologue-end-flag on" - if ![runto_main] { + if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp index 9e39f6bcc0c..5e1f6cd46d2 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp @@ -121,7 +121,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } @@ -163,7 +163,7 @@ gdb_test_multiple "maint info line-table gdb.dwarf2/dw2-ranges-base.c" \ exp_continue } -re "^$gdb_prompt $" { - gdb_assert [expr $end_seq_count == 3] $gdb_test_name + gdb_assert [expr {$end_seq_count == 3}] $gdb_test_name } -re ".*linetable: \\(\\(struct linetable \\*\\) 0x0\\):\r\nNo line table.\r\n" { exp_continue diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp index 56aab606e18..6fc5ba52fd0 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp @@ -203,7 +203,7 @@ proc do_test {suffix} { return -1 } - if ![runto_main] { + if {![runto_main]} { return -1 } @@ -234,12 +234,12 @@ proc do_test {suffix} { with_test_prefix "step-test-2" { clean_restart ${testfile} - if ![runto_main] { + if {![runto_main]} { return -1 } # Note that the RE used for the following test will fail when the - # breakpoint has been set on multiple locations. E.g. "(2 locations)". + # breakpoint has been set on multiple locations. E.g. "(2 locations)". # This is intentional since that behavior is one of the bugs that # this test case tests for. gdb_test "break foo" \ @@ -271,7 +271,7 @@ proc do_test {suffix} { } clean_restart ${testfile} - if ![runto_main] { + if {![runto_main]} { return -1 } @@ -363,7 +363,7 @@ proc do_test {suffix} { with_test_prefix "step-test-3" { clean_restart ${testfile} - if ![runto_main] { + if {![runto_main]} { return -1 } @@ -382,7 +382,7 @@ proc do_test {suffix} { # Tests in the "enable_foo_cold_stepping" section, below, did # not work prior to July, 2019. They had been disabled via # use of the "enable_foo_cold_stepping" flag. - # + # # As noted elsewhere, this test case causes foo_cold, # originally a separate function invoked via a subroutine # call, to be considered as part of foo via use of diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp index 75c874e0ffc..85e7bb17ffb 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp @@ -70,7 +70,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto foo] { +if {![runto foo]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp index fa1e03ba098..d33fc5cee0c 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp @@ -109,7 +109,7 @@ clean_restart gdb_load_no_complaints $binfile -if ![runto_main] { +if {![runto_main]} { return -1 } @@ -120,7 +120,7 @@ if ![runto_main] { # warning: (Internal error: pc 0x555555554619 in read in psymtab, # but not in symtab.) # ... -# (gdb) +# (gdb) gdb_test "break baz" \ "Breakpoint.*at.*" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp index 6440722699e..c9df12a46b0 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp @@ -119,7 +119,7 @@ if { [build_executable "failed to prepare" ${testfile} \ clean_restart gdb_load_no_complaints $binfile -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp index ad35573e5f3..154023e8449 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp @@ -48,7 +48,7 @@ if { [prepare_for_testing_full "failed to prepare" \ } # First try referencing DW_AT_frame_base which is not defined. -if [runto func_nofb] { +if {[runto func_nofb]} { gdb_test "p func_nofb_var" {Could not find the frame base for "func_nofb".} "func_nofb print" gdb_test "bt full" " in main .* main_var = 1" "func_nofb backtrace" } @@ -58,7 +58,7 @@ clean_restart $executable # And now try referencing DW_AT_frame_base defined using a self-reference # (DW_OP_fbreg). -if [runto func_loopfb] { +if {[runto func_loopfb]} { gdb_test "p func_loopfb_var" "DWARF-2 expression error: Loop detected .*" "func_loopfb print" gdb_test "bt full" " in main .* main_var = 1" "func_loopfb backtrace" } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp index 87e27d65746..2de7484c348 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp @@ -26,7 +26,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug nopie} return -1 } -if ![runto stop_frame] { +if {![runto stop_frame]} { perror "Failed to stop in stop_frame" return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp index d1243dd5f57..6c17b30522a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp @@ -31,7 +31,7 @@ if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile] \ return -1 } -if ![runto foo] { +if {![runto foo]} { return 0 } gdb_test "continue" "$hex in foo \\(\\)" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp index 2fe63c649b9..70c65be2ead 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp @@ -17,7 +17,7 @@ load_lib dwarf.exp # Test multiple location breakpoints vs. prologue analysis on -O2 -g code. # when the first statement of a function is an inlined function GDB could # crash. Map of this testcase: -# +# # File name Line number Starting address # main.c 5 func_start # other.c 1 func0 @@ -37,7 +37,7 @@ require dwarf2_support standard_testfile set executable ${testfile} -if [is_ilp32_target] { +if {[is_ilp32_target]} { set ptrbits 32 } else { set ptrbits 64 @@ -53,10 +53,10 @@ if { [build_executable ${testfile}.exp ${executable} \ # We need those symbols global to access them from the .S file. set test "strip stub symbols" set objcopy_program [gdb_find_objcopy] -set result [catch "exec $objcopy_program \ +set result [catch {exec $objcopy_program \ -N func0 -N func1 -N func2 -N func3 -N func_start -N func_end \ -N fund0 -N fund1 -N fund2 -N fund3 -N fund -N fund_start \ - ${binfile}" output] + ${binfile}} output] verbose "result is $result" verbose "output is $output" if {$result != 0} { @@ -67,7 +67,7 @@ pass $test clean_restart $executable -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp index 1eb1e38cd98..d2f3a0232e4 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-step-between-different-inline-functions.exp @@ -183,7 +183,7 @@ if {[prepare_for_testing "failed to prepare" "${::testfile}" \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp index 1a76c58953b..05326a28d86 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-step-between-inline-func-blocks.exp @@ -166,7 +166,7 @@ if {[prepare_for_testing "failed to prepare" "${::testfile}" \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp index 3eaaa526794..e9c405ebf7d 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp @@ -102,7 +102,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp index cad64efa3cd..5a6dc48b89c 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp @@ -26,7 +26,7 @@ if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile {nodebug nopie return -1 } -if ![runto "stop_frame"] { +if {![runto "stop_frame"]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unexpected-entry-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-unexpected-entry-pc.exp index fb257f0ccc5..3c85b998810 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-unexpected-entry-pc.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-unexpected-entry-pc.exp @@ -46,7 +46,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return } -if ![runto_main] { +if {![runto_main]} { return } @@ -60,7 +60,7 @@ foreach foo {foo_1 foo_2 foo_3 foo_4 foo_5 foo_6} { set foo_decl_line [gdb_get_line_number "foo decl line"] set bar_call_line [gdb_get_line_number "bar call line"] -if [is_ilp32_target] { +if {[is_ilp32_target]} { set ptr_type "data4" } else { set ptr_type "data8" @@ -142,11 +142,11 @@ proc run_test { entry_label dwarf_version with_line_table } { if {$with_line_table} { program { DW_LNE_set_address foo_label - line [expr $::bar_call_line - 2] + line [expr {$::bar_call_line - 2}] DW_LNS_copy DW_LNE_set_address foo_0 - line [expr $::bar_call_line - 1] + line [expr {$::bar_call_line - 1}] DW_LNS_copy DW_LNE_set_address foo_1 @@ -202,7 +202,7 @@ proc run_test { entry_label dwarf_version with_line_table } { return false } - if ![runto_main] { + if {![runto_main]} { return false } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp index 9eff15eed1b..ae3c27a2da5 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp @@ -26,7 +26,7 @@ if { [prepare_for_testing "failed to prepare" "dw2-unresolved" \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp index fece7674119..a21641eaf12 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp @@ -91,12 +91,12 @@ Dwarf::assemble $asm_file { } } -if [prepare_for_testing "failed to prepare" $testfile \ - "${asm_file} ${srcfile} ${srcfile2}" {}] { +if {[prepare_for_testing "failed to prepare" $testfile \ + "${asm_file} ${srcfile} ${srcfile2}" {}]} { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp index 6632a86a7b8..f5f22e61abb 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp @@ -41,7 +41,7 @@ set asm_file [standard_output_file $srcfile2] # For that, we ask GDB by debugging our test program. Any program # would do, but since we already have one specifically for this # testcase, might as well use that. -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { return -1 } set int_size [get_sizeof "int" -1] @@ -112,7 +112,7 @@ proc run_test { field_name } { return -1 } - if ![runto_main] { + if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp index 6d8d9b1737b..122ee614ad0 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp @@ -89,7 +89,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp index c6234d56201..e4977ddbd47 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp @@ -19,8 +19,8 @@ require dwarf2_support standard_testfile .S main.c -if [prepare_for_testing "failed to prepare" ${testfile} \ - [list $srcfile $srcfile2] {nodebug}] { +if {[prepare_for_testing "failed to prepare" ${testfile} \ + [list $srcfile $srcfile2] {nodebug}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp index 6432c9db01a..e0ccd21a72d 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp @@ -67,7 +67,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { 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 35eaa16f274..9109cc556ae 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp @@ -91,7 +91,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp index f892d703ab5..a986b199a84 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-wrong-mangled-name.exp @@ -57,7 +57,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp b/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp index 99bb4cc0848..1d9aed692e3 100644 --- a/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp +++ b/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp @@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \ # Stress test gdb's handling of cached comp units, disable the cache. gdb_test_no_output "maint set dwarf max-cache-age 0" -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw4-toplevel-types.exp b/gdb/testsuite/gdb.dwarf2/dw4-toplevel-types.exp index 166ce6aafe3..ef5834ebe88 100644 --- a/gdb/testsuite/gdb.dwarf2/dw4-toplevel-types.exp +++ b/gdb/testsuite/gdb.dwarf2/dw4-toplevel-types.exp @@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp b/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp index badb9c0b43c..9a34157e649 100644 --- a/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp +++ b/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp @@ -28,7 +28,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp b/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp index 81b8354546e..e39da5df4bd 100644 --- a/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp +++ b/gdb/testsuite/gdb.dwarf2/dwp-sepdebug.exp @@ -18,7 +18,7 @@ standard_testfile if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } { return -1 } -if ![remote_file host exists [standard_output_file ${testfile}.dwp]] { +if {![remote_file host exists [standard_output_file ${testfile}.dwp]]} { unsupported "testsuite run does not produce dwp files" return 0 } @@ -29,7 +29,7 @@ if ![remote_file host exists [standard_output_file ${testfile}.dwp]] { # the name of a debuginfo only file. This file will be stored in the # gdb.base/ subdirectory. -if [gdb_gnu_strip_debug $binfile$EXEEXT] { +if {[gdb_gnu_strip_debug $binfile$EXEEXT]} { # check that you have a recent version of strip and objcopy installed unsupported "cannot produce separate debug info files" return -1 diff --git a/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp b/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp index 3846870ee68..c2202cbc5ed 100644 --- a/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp +++ b/gdb/testsuite/gdb.dwarf2/dwp-symlink.exp @@ -16,14 +16,14 @@ standard_testfile remote_file host delete [standard_output_file ${testfile}.dwp] -if [remote_file host exists [standard_output_file ${testfile}.dwp]] { +if {[remote_file host exists [standard_output_file ${testfile}.dwp]]} { unsupported "dwp file cannot be deleted" return 0 } if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } { return -1 } -if ![remote_file host exists [standard_output_file ${testfile}.dwp]] { +if {![remote_file host exists [standard_output_file ${testfile}.dwp]]} { unsupported "testsuite run does not produce dwp files" return 0 } @@ -34,11 +34,11 @@ remote_file host delete [standard_output_file ${thelink}] remote_file host delete [standard_output_file ${thelink}.dwp] # file link is only Tcl 8.4+. remote_exec host "ln -sf ${testfile} [standard_output_file $thelink]" -if ![remote_file host exists [standard_output_file $thelink]] { +if {![remote_file host exists [standard_output_file $thelink]]} { unsupported "host does not support symbolic links (binary symlink is missing)" return 0 } -if [remote_file host exists [standard_output_file $thelink.dwp]] { +if {[remote_file host exists [standard_output_file $thelink.dwp]]} { unsupported "host does not support symbolic links (we tried to delete a file and it is still there)" return 0 } @@ -55,11 +55,11 @@ gdb_test "ptype main" $main_type_re "binary symlink, dwp default" gdb_exit remote_exec host "mv -f [standard_output_file ${testfile}.dwp] [standard_output_file ${thelink}.dwp]" -if [remote_file host exists [standard_output_file ${testfile}.dwp]] { +if {[remote_file host exists [standard_output_file ${testfile}.dwp]]} { unsupported "host does not support symbolic links (binary symlink exists)" return 0 } -if ![remote_file host exists [standard_output_file ${thelink}.dwp]] { +if {![remote_file host exists [standard_output_file ${thelink}.dwp]]} { unsupported "host does not support symbolic links (dwp symlink is missing)" return 0 } @@ -125,7 +125,7 @@ remote_exec host "ln -sf ${dwp_dwp_dir}/${dwp_real_dwp} ${dwp_symlink_dir}/${dwp clean_restart "${dwp_symlink_dir}/${dwp_symlink_binary}" -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dwz.exp b/gdb/testsuite/gdb.dwarf2/dwz.exp index ebccea63256..872e3a2fd80 100644 --- a/gdb/testsuite/gdb.dwarf2/dwz.exp +++ b/gdb/testsuite/gdb.dwarf2/dwz.exp @@ -80,11 +80,11 @@ Dwarf::assemble $asm_file { } } -if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}] { +if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}]} { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp index e4248d0de10..91beb791d2d 100644 --- a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp +++ b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp @@ -129,7 +129,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp index 331cfc2c7e4..aeb0aa2ab6b 100644 --- a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp +++ b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp @@ -124,7 +124,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp index 640d4d2283b..e5ef01afd1c 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp @@ -116,7 +116,7 @@ if { [build_executable_and_dwo_files "${testfile}.exp" ${binfile} {nodebug} \ # Now we can start GDB. clean_restart ${testfile} -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp index 9f70f305466..2f115d14a32 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-base.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp @@ -28,16 +28,16 @@ standard_testfile .S set obj [standard_output_file "${testfile}.o"] set dwo [standard_output_file "${testfile}.dwo"] -if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \ - [list $srcfile \ - [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \ - $obj]] { +if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \ + [list $srcfile \ + [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \ + $obj]]} { return -1 } clean_restart $::testfile -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp index aa5471821c5..62f80a7846b 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp @@ -33,16 +33,17 @@ standard_testfile .S set obj [standard_output_file "${testfile}.o"] set dwo [standard_output_file "${testfile}.dwo"] -if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" \ - {nodebug pie} \ - [list $srcfile [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \ - $obj]] { +if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" \ + {nodebug pie} \ + [list $srcfile \ + [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \ + $obj]]} { return -1 } clean_restart $::testfile -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp index 59cd10b5bf5..991725eb16d 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp @@ -28,16 +28,16 @@ standard_testfile .S set obj [standard_output_file "${testfile}.o"] set dwo [standard_output_file "${testfile}.dwo"] -if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \ - [list $srcfile \ - [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \ - $obj]] { +if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \ + [list $srcfile \ + [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \ + $obj]]} { return -1 } clean_restart $::testfile -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp index ff498c91b11..13fb3bf27d0 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp @@ -196,16 +196,16 @@ Dwarf::assemble $asm_file_2 { # Compile all of the input files, split the DWARF into the .dwo files. set obj1 [standard_output_file "${testfile}-1-dw.o"] set obj2 [standard_output_file "${testfile}-2-dw.o"] -if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \ - [list $asm_file_1 [list nodebug split-dwo] $obj1] \ - [list $asm_file_2 [list nodebug split-dwo] $obj2] \ - [list $srcfile [list nodebug]]] { +if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \ + [list $asm_file_1 [list nodebug split-dwo] $obj1] \ + [list $asm_file_2 [list nodebug split-dwo] $obj2] \ + [list $srcfile [list nodebug]]]} { return -1 } clean_restart $::testfile -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp index e605aef8b71..b533f61d65f 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp @@ -113,7 +113,7 @@ if { [build_executable_and_dwo_files "${testfile}.exp" ${testfile} {nodebug} \ # Now we can start GDB. clean_restart ${testfile} -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp index 238afb142ce..8a123770466 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-reread.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp @@ -38,8 +38,8 @@ set dwo_options $options lappend dwo_options split-dwo lappend dwo_options additional_flags=-DDWO=\"$dwo\" -if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" $options \ - [list $srcfile $dwo_options $obj]] { +if {[build_executable_and_dwo_files "$testfile.exp" "${binfile}" $options \ + [list $srcfile $dwo_options $obj]]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/formdata16.exp b/gdb/testsuite/gdb.dwarf2/formdata16.exp index c08183ec385..96d82116367 100644 --- a/gdb/testsuite/gdb.dwarf2/formdata16.exp +++ b/gdb/testsuite/gdb.dwarf2/formdata16.exp @@ -22,7 +22,7 @@ standard_testfile main.c -dw.S # We need to know the endianess in order # to write some of the debugging info we'd like to generate. -if [prepare_for_testing "failed to prepare for endianness test" ${testfile} ${srcfile}] { +if {[prepare_for_testing "failed to prepare for endianness test" ${testfile} ${srcfile}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp index b751900bf7b..5517375aaf2 100644 --- a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp +++ b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp @@ -141,7 +141,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-index.exp index f7c3337897d..41bd480e968 100644 --- a/gdb/testsuite/gdb.dwarf2/gdb-index.exp +++ b/gdb/testsuite/gdb.dwarf2/gdb-index.exp @@ -144,7 +144,7 @@ if {[run_on_host "touch binary" touch $host_binfile_with_index]} { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } gdb_test "mt print objfiles ${testfile}" \ diff --git a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp index be3a648c936..e7894dd12b2 100644 --- a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp +++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp @@ -125,11 +125,11 @@ proc test_1 { name dwarf_version offset_size addr_size ref_addr_size two_cu } { # 32-bit targets do not support any of the testcases; keep quiet there. set opts {quiet} set executable ${testfile}-${name} - if [prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" $opts] { + if {[prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" $opts]} { return -1 } - if ![runto_main] { + if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp index 7feb9839084..701c79db3dc 100644 --- a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp +++ b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp @@ -76,12 +76,12 @@ Dwarf::assemble $asm_file { } } -if [prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}] { +if {[prepare_for_testing "failed to prepare" $executable "${asm_file} ${srcfile}" {}]} { return -1 } # DW_OP_GNU_implicit_pointer implementation requires a valid frame. -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/implptr.exp b/gdb/testsuite/gdb.dwarf2/implptr.exp index 78d5f4fcb6a..da7bc28453f 100644 --- a/gdb/testsuite/gdb.dwarf2/implptr.exp +++ b/gdb/testsuite/gdb.dwarf2/implptr.exp @@ -28,7 +28,7 @@ set opts {} lappend opts nopie -if [info exists COMPILE] { +if {[info exists COMPILE]} { # make check RUNTESTFLAGS='gdb.dwarf2/implptr.exp COMPILE=1 CC_FOR_TARGET=gcc\ -m32' set srcfile ${csrcfile} lappend opts debug optimize=-O2 @@ -41,7 +41,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile $opts]} { # Additional test to verify the referenced CU is not aged out. gdb_test_no_output "maintenance set dwarf max-cache-age 0" -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp index 8e735ca2784..5078296cc20 100644 --- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp +++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp @@ -88,7 +88,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp index 58c5e666696..1b9dc5eb213 100644 --- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp +++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp @@ -106,7 +106,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/implref-array.exp b/gdb/testsuite/gdb.dwarf2/implref-array.exp index 1236537c73e..9dec1731908 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-array.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-array.exp @@ -113,12 +113,12 @@ Dwarf::assemble ${asm_file} { } } -if [prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}] { +if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} { return -1 } # DW_OP_GNU_implicit_pointer implementation requires a valid frame. -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/implref-const.exp b/gdb/testsuite/gdb.dwarf2/implref-const.exp index ec19eedd443..bf3892d837c 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-const.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-const.exp @@ -36,7 +36,7 @@ set asm_file [standard_output_file ${srcfile2}] # For that, we ask GDB by debugging our implref-const program. # Any program would do, but since we already have implref-const # specifically for this testcase, might as well use that. -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { return -1 } @@ -92,12 +92,12 @@ Dwarf::assemble ${asm_file} { } } -if [prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}] { +if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} { return -1 } # DW_OP_GNU_implicit_pointer implementation requires a valid frame. -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/implref-global.exp b/gdb/testsuite/gdb.dwarf2/implref-global.exp index cb885ef6ad0..a9397bd67bd 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-global.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-global.exp @@ -36,7 +36,7 @@ set asm_file [standard_output_file ${srcfile2}] # For that, we ask GDB by debugging our implref-global program. # Any program would do, but since we already have implref-global # specifically for this testcase, might as well use that. -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { return -1 } @@ -92,12 +92,12 @@ Dwarf::assemble ${asm_file} { } } -if [prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}] { +if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} { return -1 } # DW_OP_GNU_implicit_pointer implementation requires a valid frame. -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/implref-struct.exp b/gdb/testsuite/gdb.dwarf2/implref-struct.exp index 9dc3b1b0964..450576e1eb1 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp @@ -36,7 +36,7 @@ set asm_file [standard_output_file ${srcfile2}] # For that, we ask GDB by debugging our implref-struct program. # Any program would do, but since we already have implref-struct # specifically for this testcase, might as well use that. -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}]} { return -1 } @@ -129,12 +129,12 @@ Dwarf::assemble ${asm_file} { } } -if [prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}] { +if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} { return -1 } # DW_OP_GNU_implicit_pointer implementation requires a valid frame. -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp index 7141d6b7bd8..2f81317b18e 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp +++ b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp @@ -28,7 +28,7 @@ set asm_file [standard_output_file ${srcfile2}] # We need to know the size of integer type in order # to write some of the debugging info we'd like to generate. -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp index 4ccda52cc62..6bfc8c7ebd0 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp +++ b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp @@ -10,7 +10,7 @@ set asm_file [standard_output_file ${srcfile2}] # We need to know the size of integer and address types in order # to write some of the debugging info we'd like to generate. -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}]} { return -1 } @@ -96,7 +96,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp index 12dc69ee125..432386a7d14 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp +++ b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp @@ -25,7 +25,7 @@ set asm_file [standard_output_file ${srcfile2}] # We need to know the size of integer types in order to write some of the # debugging info we'd like to generate. -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp index 2c17f2d455e..b51c07aeb06 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp +++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp @@ -37,7 +37,7 @@ set asm_file [standard_output_file ${srcfile2}] # We need to know the size of integer and address types in order # to write some of the debugging info we'd like to generate. -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp index 59c96690004..3f4dd07c744 100644 --- a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp +++ b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp @@ -68,7 +68,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/inline.exp b/gdb/testsuite/gdb.dwarf2/inline.exp index a36110e8f40..1aed55f5c7e 100644 --- a/gdb/testsuite/gdb.dwarf2/inline.exp +++ b/gdb/testsuite/gdb.dwarf2/inline.exp @@ -15,8 +15,8 @@ standard_testfile .c -if [prepare_for_testing "failed to prepare" $testfile $srcfile \ - {debug nowarnings}] { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ + {debug nowarnings}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/intbits.exp b/gdb/testsuite/gdb.dwarf2/intbits.exp index ec77c2d244c..fc5a2ae2162 100644 --- a/gdb/testsuite/gdb.dwarf2/intbits.exp +++ b/gdb/testsuite/gdb.dwarf2/intbits.exp @@ -25,7 +25,7 @@ standard_testfile .c .S set executable ${testfile} set asm_file [standard_output_file ${srcfile2}] -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp index 2a8b4573789..ba01137db5e 100644 --- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp +++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp @@ -89,8 +89,8 @@ if {[gdb_compile_shlib $libsrc $lib_so \ # Value returned is $1 = (B *) $hex # Note that this compilation is used for all GDB sessions. set exec_options [list debug shlib=$lib_so] -if [prepare_for_testing "failed to prepare" ${testfile} \ - ${::srcfile} $exec_options] { +if {[prepare_for_testing "failed to prepare" ${testfile} \ + ${::srcfile} $exec_options]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl index b71d55d6505..df7101db8d9 100644 --- a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl +++ b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp.tcl @@ -51,7 +51,7 @@ proc do_test { test_name lines_version DW_AT_name main_file_idx directories set ::directories $directories set ::file_names $file_names set ::is_64 $is_64 - set 32_or_64 [expr $is_64 ? 64 : 32] + set 32_or_64 [expr {$is_64 ? 64 : 32}] set asm_file [standard_output_file ${::testfile}-${test_name}-${32_or_64}.S] Dwarf::assemble $asm_file { @@ -149,7 +149,7 @@ proc do_test { test_name lines_version DW_AT_name main_file_idx directories } } - if ![runto_main] { + if {![runto_main]} { return } diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp index ee6992b397a..5d97ba49b4e 100644 --- a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp +++ b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp @@ -157,7 +157,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp index 68a555267ea..6478991bc5a 100644 --- a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp +++ b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp @@ -100,7 +100,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp index 93c3deac2b2..abf34add464 100644 --- a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp +++ b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp @@ -201,7 +201,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp index ab73554d112..4af365549ee 100644 --- a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp +++ b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp @@ -22,7 +22,7 @@ lappend opts debug lappend opts c++ lappend opts additional_flags=-std=c++11 -if [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp index b4d275c9a36..2564daee96a 100644 --- a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp +++ b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp @@ -183,11 +183,11 @@ Dwarf::assemble $asm_file { } } -if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile} ${srcfile3}" {nodebug}] { +if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile} ${srcfile3}" {nodebug}]} { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp index 85f19c7e50e..0ae36128a70 100644 --- a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp +++ b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp @@ -25,8 +25,8 @@ if { [build_executable "failed to prepare" $testfile $srcfile \ set host_binfile [gdb_remote_download host $binfile] set has_index_section [exec_has_index_section $binfile] -set uses_readnow [expr [string first "-readnow" $GDBFLAGS] != -1] -set expecting_index_cache_use [expr !$has_index_section && !$uses_readnow] +set uses_readnow [expr {[string first "-readnow" $GDBFLAGS] != -1}] +set expecting_index_cache_use [expr {!$has_index_section && !$uses_readnow}] lassign [remote_exec host mktemp -d] ret cache_dir diff --git a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp index 65f5fad1740..259e7e9e2e8 100644 --- a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp +++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp @@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile $opts]} { return -1 } -if ![runto foo] { +if {![runto foo]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/pieces.exp b/gdb/testsuite/gdb.dwarf2/pieces.exp index 5641d1647fb..a08cd828c1d 100644 --- a/gdb/testsuite/gdb.dwarf2/pieces.exp +++ b/gdb/testsuite/gdb.dwarf2/pieces.exp @@ -26,7 +26,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile]} { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/pr11465.exp b/gdb/testsuite/gdb.dwarf2/pr11465.exp index cf99fa098ce..c5b57147c3d 100644 --- a/gdb/testsuite/gdb.dwarf2/pr11465.exp +++ b/gdb/testsuite/gdb.dwarf2/pr11465.exp @@ -19,7 +19,7 @@ require dwarf2_support standard_testfile .S -if [is_ilp32_target] { +if {[is_ilp32_target]} { set ptrbits 32 } else { set ptrbits 64 diff --git a/gdb/testsuite/gdb.dwarf2/self-spec.exp b/gdb/testsuite/gdb.dwarf2/self-spec.exp index 3d6c8531635..c5818b8619e 100644 --- a/gdb/testsuite/gdb.dwarf2/self-spec.exp +++ b/gdb/testsuite/gdb.dwarf2/self-spec.exp @@ -52,7 +52,7 @@ Dwarf::assemble $asm_file { } } -if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}] { +if {[prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp index 7e159998f0c..f2165ff572c 100644 --- a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp +++ b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp @@ -113,7 +113,7 @@ set struct_s_j_re \ " int j;" \ "}"] -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp index 6efd4589930..87ef2b2243e 100644 --- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp +++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp @@ -47,7 +47,7 @@ if { [is_aarch64_target] } { standard_testfile symbol_needs_eval.c ${gdb_test_file_name}-dw.S -if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} { return } @@ -107,7 +107,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \ # so an error should be reported. gdb_test "print/d a" "No frame selected." "variable a can't be printed" -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp index 61a40eb56b9..9f797a5843c 100644 --- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp +++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp @@ -47,7 +47,7 @@ if { [is_aarch64_target] } { standard_testfile symbol_needs_eval.c ${gdb_test_file_name}-dw.S -if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} { return } @@ -125,7 +125,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp index 52d9b32a593..507c344aeab 100644 --- a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp +++ b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp @@ -76,7 +76,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp index b80ce973dd7..0fa812ae2b5 100644 --- a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp +++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp @@ -37,7 +37,7 @@ if { [prepare_for_testing "failed to prepare" "${test}" ${sfile} $opts] } { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/valop.exp b/gdb/testsuite/gdb.dwarf2/valop.exp index 5de7f4e8a30..d8c19e72a7a 100644 --- a/gdb/testsuite/gdb.dwarf2/valop.exp +++ b/gdb/testsuite/gdb.dwarf2/valop.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/var-access.exp b/gdb/testsuite/gdb.dwarf2/var-access.exp index 6889cc203e0..3276b28a81f 100644 --- a/gdb/testsuite/gdb.dwarf2/var-access.exp +++ b/gdb/testsuite/gdb.dwarf2/var-access.exp @@ -253,7 +253,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/variant.exp b/gdb/testsuite/gdb.dwarf2/variant.exp index 93abcbd7fa3..9c9716b8dcd 100644 --- a/gdb/testsuite/gdb.dwarf2/variant.exp +++ b/gdb/testsuite/gdb.dwarf2/variant.exp @@ -205,7 +205,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto func] { +if {![runto func]} { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/varval.exp b/gdb/testsuite/gdb.dwarf2/varval.exp index 8f132bbf0ba..97c4ef87907 100644 --- a/gdb/testsuite/gdb.dwarf2/varval.exp +++ b/gdb/testsuite/gdb.dwarf2/varval.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Test support for DW_OP_GNU_variable_value. +# Test support for DW_OP_GNU_variable_value. load_lib dwarf.exp @@ -33,7 +33,7 @@ set asm_file [standard_output_file ${srcfile2}] # For that, we ask GDB by debugging our varval program. # Any program would do, but since we already have varval # specifically for this testcase, might as well use that. -if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] { +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { return -1 } set int_size [get_sizeof "int" -1] @@ -44,7 +44,7 @@ proc setup_exec { arg_bad } { global asm_file executable srcfile bad set bad ${arg_bad} - # Create the DWARF. + # Create the DWARF. Dwarf::assemble ${asm_file} { global bad int_size addr_size @@ -314,7 +314,7 @@ proc setup_exec { arg_bad } { } } - if [prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}] { + if {[prepare_for_testing "failed to prepare" ${executable} [list ${asm_file} ${srcfile}] {}]} { return -1 } } @@ -328,7 +328,7 @@ with_test_prefix "pre-main" { } # DW_OP_GNU_variable_value implementation requires a valid frame. -if ![runto_main] { +if {![runto_main]} { return -1 } @@ -357,7 +357,7 @@ if { [setup_exec 1] == -1 } { } # DW_OP_GNU_variable_value implementation requires a valid frame. -if ![runto_main] { +if {![runto_main]} { return -1 } gdb_test "print badval" "value has been optimized out" diff --git a/gdb/testsuite/gdb.dwarf2/void-type.exp b/gdb/testsuite/gdb.dwarf2/void-type.exp index 10f5738c5dd..963410f93e6 100644 --- a/gdb/testsuite/gdb.dwarf2/void-type.exp +++ b/gdb/testsuite/gdb.dwarf2/void-type.exp @@ -96,7 +96,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 }