From: Tom de Vries Date: Sun, 23 Nov 2025 11:55:16 +0000 (+0100) Subject: [gdb/testsuite] Fix whitespace issues X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45311dce11671fd265e7468e961b3ad5b9204b9e;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix whitespace issues This is the result of: ... $ git rm -rf gdb/testsuite $ git commit -a -m tmp $ git revert HEAD $ git rebase --whitespace=fix HEAD^ ... Tested on x86_64-linux. PR build/33616 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33616 --- diff --git a/gdb/testsuite/ChangeLog-1993-2013 b/gdb/testsuite/ChangeLog-1993-2013 index a54c643ae65..9dc07d9de48 100644 --- a/gdb/testsuite/ChangeLog-1993-2013 +++ b/gdb/testsuite/ChangeLog-1993-2013 @@ -316,7 +316,7 @@ 2013-11-20 Walfred Tedeschi - * gdb.python/py-pp-maint.exp: Consider new pretty-print added + * gdb.python/py-pp-maint.exp: Consider new pretty-print added for bnd registers. 2013-11-20 Walfred Tedeschi @@ -454,9 +454,9 @@ 2013-11-11 Phil Muldoon - * gdb.python/py-linetable.S: New file. + * gdb.python/py-linetable.S: New file. * gdb.python/py-linetable.c: New file. - * gdb.python/py-linetable.exp: New file. + * gdb.python/py-linetable.exp: New file. 2013-11-11 Joel Brobecker @@ -1114,7 +1114,7 @@ PR gdb/15501 * gdb.base/ena-dis-br.exp: Add test to verify - enable/disable commands work correctly with + enable/disable commands work correctly with multiple arguments that include multiple locations. 2013-08-22 Samuel Bronson diff --git a/gdb/testsuite/config/dve.exp b/gdb/testsuite/config/dve.exp index b08514b6890..b60d6d4d79f 100644 --- a/gdb/testsuite/config/dve.exp +++ b/gdb/testsuite/config/dve.exp @@ -16,4 +16,3 @@ load_lib ../config/monitor.exp set timeout 1000 verbose "Timeout is now $timeout seconds" 2 - diff --git a/gdb/testsuite/config/m32r.exp b/gdb/testsuite/config/m32r.exp index 2ea691b901a..132c65e3f0e 100644 --- a/gdb/testsuite/config/m32r.exp +++ b/gdb/testsuite/config/m32r.exp @@ -16,4 +16,3 @@ load_lib ../config/monitor.exp set timeout 120 verbose "Timeout is now $timeout seconds" 2 - diff --git a/gdb/testsuite/config/mn10300-eval.exp b/gdb/testsuite/config/mn10300-eval.exp index b08514b6890..b60d6d4d79f 100644 --- a/gdb/testsuite/config/mn10300-eval.exp +++ b/gdb/testsuite/config/mn10300-eval.exp @@ -16,4 +16,3 @@ load_lib ../config/monitor.exp set timeout 1000 verbose "Timeout is now $timeout seconds" 2 - diff --git a/gdb/testsuite/config/sid.exp b/gdb/testsuite/config/sid.exp index 54825fd1254..e466e3512d6 100644 --- a/gdb/testsuite/config/sid.exp +++ b/gdb/testsuite/config/sid.exp @@ -25,8 +25,8 @@ proc sid_start {} { if {[target_info exists sim,defaultendian]} { set sidendian [target_info sim,defaultendian] } else { - # rely on endianness settings in sid configuration defaults - set sidendian "" + # rely on endianness settings in sid configuration defaults + set sidendian "" } } } @@ -92,7 +92,7 @@ proc sid_start {} { sleep 4 if ![target_info exists gdb,no_push_conn] { - remote_push_conn host + remote_push_conn host } } diff --git a/gdb/testsuite/gdb.ada/O2_float_param/caller.adb b/gdb/testsuite/gdb.ada/O2_float_param/caller.adb index 8736917e7b3..30d4baf33ce 100644 --- a/gdb/testsuite/gdb.ada/O2_float_param/caller.adb +++ b/gdb/testsuite/gdb.ada/O2_float_param/caller.adb @@ -23,4 +23,3 @@ package body Caller is Increment (Val, "Verbose_Increment"); end Verbose_Increment; end Caller; - diff --git a/gdb/testsuite/gdb.ada/O2_float_param/caller.ads b/gdb/testsuite/gdb.ada/O2_float_param/caller.ads index fe3ec2e00e3..9ea162a8e7a 100644 --- a/gdb/testsuite/gdb.ada/O2_float_param/caller.ads +++ b/gdb/testsuite/gdb.ada/O2_float_param/caller.ads @@ -16,4 +16,3 @@ package Caller is procedure Verbose_Increment (Val : in out Float; Msg : String); end Caller; - diff --git a/gdb/testsuite/gdb.ada/access_tagged_param.exp b/gdb/testsuite/gdb.ada/access_tagged_param.exp index 12a351202bc..f3722259b43 100644 --- a/gdb/testsuite/gdb.ada/access_tagged_param.exp +++ b/gdb/testsuite/gdb.ada/access_tagged_param.exp @@ -38,4 +38,4 @@ gdb_breakpoint "pck.adb:19" # the value of all the parameters. gdb_test "continue" \ - ".*Breakpoint $decimal, pck\\.inspect \\(obj=$hex, =\[1-9\]\\) at .*" + ".*Breakpoint $decimal, pck\\.inspect \\(obj=$hex, =\[1-9\]\\) at .*" diff --git a/gdb/testsuite/gdb.ada/addr_arith.exp b/gdb/testsuite/gdb.ada/addr_arith.exp index 15c57e52e07..cac98e0b636 100644 --- a/gdb/testsuite/gdb.ada/addr_arith.exp +++ b/gdb/testsuite/gdb.ada/addr_arith.exp @@ -31,13 +31,13 @@ if {![runto "foo_na07_019.adb:$bp_location"]} { } gdb_test "print something'address + 0" \ - "\\(system\\.address\\) $hex " + "\\(system\\.address\\) $hex " gdb_test "print 0 + something'address" \ - "\\(system\\.address\\) $hex " + "\\(system\\.address\\) $hex " gdb_test "print something'address - 0" \ - "\\(system\\.address\\) $hex " + "\\(system\\.address\\) $hex " gdb_test "print 0 - something'address" \ - "\\(system\\.address\\) $hex.*" + "\\(system\\.address\\) $hex.*" diff --git a/gdb/testsuite/gdb.ada/aliased_array.exp b/gdb/testsuite/gdb.ada/aliased_array.exp index 2110cf14a6c..3933cc516d8 100644 --- a/gdb/testsuite/gdb.ada/aliased_array.exp +++ b/gdb/testsuite/gdb.ada/aliased_array.exp @@ -29,4 +29,3 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "print bt" " = \\(1, 2, 3\\)" - diff --git a/gdb/testsuite/gdb.ada/aliased_array/foo.adb b/gdb/testsuite/gdb.ada/aliased_array/foo.adb index b859ddbee97..b10c0d7e119 100644 --- a/gdb/testsuite/gdb.ada/aliased_array/foo.adb +++ b/gdb/testsuite/gdb.ada/aliased_array/foo.adb @@ -19,4 +19,3 @@ procedure Foo is begin Do_Nothing (BT'Address); -- STOP end Foo; - diff --git a/gdb/testsuite/gdb.ada/array_bounds.exp b/gdb/testsuite/gdb.ada/array_bounds.exp index 3b84db594d1..431e6d1d9e4 100644 --- a/gdb/testsuite/gdb.ada/array_bounds.exp +++ b/gdb/testsuite/gdb.ada/array_bounds.exp @@ -31,13 +31,13 @@ if {![runto "bar.adb:$bp_location"]} { } gdb_test "print itable'first" \ - "= 2" + "= 2" gdb_test "print itable'last" \ - "= 5" + "= 5" gdb_test "print table'first" \ - "= zero" + "= zero" gdb_test "print table'last" \ - "= two" + "= two" diff --git a/gdb/testsuite/gdb.ada/array_bounds/bar.adb b/gdb/testsuite/gdb.ada/array_bounds/bar.adb index 0d2a81f0737..5ed73c47bed 100644 --- a/gdb/testsuite/gdb.ada/array_bounds/bar.adb +++ b/gdb/testsuite/gdb.ada/array_bounds/bar.adb @@ -24,4 +24,3 @@ begin Table (Zero) := 5; -- START ITable (3) := 10; end Bar; - diff --git a/gdb/testsuite/gdb.ada/array_char_idx.exp b/gdb/testsuite/gdb.ada/array_char_idx.exp index f0919b04ba7..166996fe92d 100644 --- a/gdb/testsuite/gdb.ada/array_char_idx.exp +++ b/gdb/testsuite/gdb.ada/array_char_idx.exp @@ -26,12 +26,12 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { clean_restart ${testfile} gdb_test "ptype char_table" \ - "= array \\(character\\) of natural" + "= array \\(character\\) of natural" gdb_test "ptype global_char_table" \ - "= array \\(character\\) of natural" + "= array \\(character\\) of natural" # Some more recent versions of gcc can statically initialize this # array, so we allow either 0 or 4874. gdb_test "print my_table" "= \\((0|4874) \\)" \ - "Display my_table" + "Display my_table" diff --git a/gdb/testsuite/gdb.ada/array_return.exp b/gdb/testsuite/gdb.ada/array_return.exp index 21a75d8c4fa..3973f9cf2c4 100644 --- a/gdb/testsuite/gdb.ada/array_return.exp +++ b/gdb/testsuite/gdb.ada/array_return.exp @@ -41,34 +41,34 @@ if {![runto_main]} { # the "finish" command. gdb_test "break create_small" \ - "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \ - "insert breakpoint in create_small" + "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \ + "insert breakpoint in create_small" gdb_test "break create_large" \ - "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \ - "insert breakpoint in create_large" + "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \ + "insert breakpoint in create_large" gdb_test "break create_small_float_vector" \ - "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \ - "insert breakpoint in create_small_float_vector" + "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \ + "insert breakpoint in create_small_float_vector" # Then continue until reaching the first breakpoint inside Create_Small, # and then do a "finish". gdb_test "cont" \ - "Breakpoint \[0-9\]+, pck.create_small \\(\\).*" \ - "continuing to Create_Small" + "Breakpoint \[0-9\]+, pck.create_small \\(\\).*" \ + "continuing to Create_Small" gdb_test "finish" \ - "Value returned is \\\$\[0-9\]+ = \\(1, 1\\)" \ - "value printed by finish of Create_Small" + "Value returned is \\\$\[0-9\]+ = \\(1, 1\\)" \ + "value printed by finish of Create_Small" # Now continue until reaching the second breakpoint inside Create_Large, # and then do another "finish". gdb_test "cont" \ - "Breakpoint \[0-9\]+, pck.create_large \\(\\).*" \ - "continuing to Create_Large" + "Breakpoint \[0-9\]+, pck.create_large \\(\\).*" \ + "continuing to Create_Large" # On hppa32, the value returned is too large to be returned via a register. # Instead, it is returned using the struct convention, and the debugger @@ -79,17 +79,16 @@ if {![istarget "hppa*64*-*-*"]} { } gdb_test "finish" \ - "Value returned is \\\$\[0-9\]+ = \\(2, 2, 2, 2\\)" \ - "value printed by finish of Create_Large" + "Value returned is \\\$\[0-9\]+ = \\(2, 2, 2, 2\\)" \ + "value printed by finish of Create_Large" # Now continue until reaching the third breakpoint, and then do another # "finish" again. gdb_test "cont" \ - "Breakpoint \[0-9\]+, pck.create_small_float_vector \\(\\).*" \ - "continuing to Create_Small_Float_Vector" + "Breakpoint \[0-9\]+, pck.create_small_float_vector \\(\\).*" \ + "continuing to Create_Small_Float_Vector" gdb_test "finish" \ - "Value returned is \\\$\[0-9\]+ = \\(4.25, 4.25\\)" \ - "value printed by finish of Create_Small_Float_Vector" - + "Value returned is \\\$\[0-9\]+ = \\(4.25, 4.25\\)" \ + "value printed by finish of Create_Small_Float_Vector" diff --git a/gdb/testsuite/gdb.ada/array_return/pck.ads b/gdb/testsuite/gdb.ada/array_return/pck.ads index 45284aad2ac..2e3e035a4d9 100644 --- a/gdb/testsuite/gdb.ada/array_return/pck.ads +++ b/gdb/testsuite/gdb.ada/array_return/pck.ads @@ -25,4 +25,3 @@ package Pck is function Create_Small_Float_Vector return Small_Float_Vector; end Pck; - diff --git a/gdb/testsuite/gdb.ada/array_subscript_addr.exp b/gdb/testsuite/gdb.ada/array_subscript_addr.exp index c679a70d604..a07992c3ff7 100644 --- a/gdb/testsuite/gdb.ada/array_subscript_addr.exp +++ b/gdb/testsuite/gdb.ada/array_subscript_addr.exp @@ -31,4 +31,4 @@ runto "p.adb:$bp_location" # Verify that we can compare a string slice with another string. gdb_test "print a(2)'Address" \ - "= \\(system\\.address\\) 0x\[0-9a-fA-F\]+" + "= \\(system\\.address\\) 0x\[0-9a-fA-F\]+" diff --git a/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb b/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb index 057d7a02a9c..838dddd9ef1 100644 --- a/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb +++ b/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb @@ -27,4 +27,3 @@ procedure P is begin C := A (1) + A (2); -- STOP end P; - diff --git a/gdb/testsuite/gdb.ada/arraydim.exp b/gdb/testsuite/gdb.ada/arraydim.exp index a732751395d..e8f0b40e0da 100644 --- a/gdb/testsuite/gdb.ada/arraydim.exp +++ b/gdb/testsuite/gdb.ada/arraydim.exp @@ -34,7 +34,7 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "ptype m" \ - "array \\(1 \\.\\. 1, 2 \\.\\. 3, 4 \\.\\. 6\\) of integer" + "array \\(1 \\.\\. 1, 2 \\.\\. 3, 4 \\.\\. 6\\) of integer" gdb_test "print m'first" " = 1" gdb_test "print m'last" " = 1" @@ -53,7 +53,7 @@ gdb_test "print m'last(3)" " = 6" gdb_test "print m'length(3)" " = 3" gdb_test "ptype global_3dim_for_gdb_testing" \ - "array \\(0 \\.\\. 0, 0 \\.\\. 1, 0 \\.\\. 2\\) of int" + "array \\(0 \\.\\. 0, 0 \\.\\. 1, 0 \\.\\. 2\\) of int" gdb_test "print global_3dim_for_gdb_testing'first" " = 0" gdb_test "print global_3dim_for_gdb_testing'last" " = 0" diff --git a/gdb/testsuite/gdb.ada/arraydim/pck.adb b/gdb/testsuite/gdb.ada/arraydim/pck.adb index d05dba81302..04e2b8b43b0 100644 --- a/gdb/testsuite/gdb.ada/arraydim/pck.adb +++ b/gdb/testsuite/gdb.ada/arraydim/pck.adb @@ -19,4 +19,3 @@ package body Pck is null; end Do_Nothing; end Pck; - diff --git a/gdb/testsuite/gdb.ada/arraydim/pck.ads b/gdb/testsuite/gdb.ada/arraydim/pck.ads index cfa98d472e6..16a570ca791 100644 --- a/gdb/testsuite/gdb.ada/arraydim/pck.ads +++ b/gdb/testsuite/gdb.ada/arraydim/pck.ads @@ -17,4 +17,3 @@ with System; package Pck is procedure Do_Nothing (A : System.Address); end Pck; - diff --git a/gdb/testsuite/gdb.ada/arrayidx.exp b/gdb/testsuite/gdb.ada/arrayidx.exp index 6a7188a9b35..74620277fbb 100644 --- a/gdb/testsuite/gdb.ada/arrayidx.exp +++ b/gdb/testsuite/gdb.ada/arrayidx.exp @@ -38,45 +38,45 @@ if {$old_gcc} { setup_xfail "*-*-*" } gdb_test "print one_two_three" \ - "= \\(1, 2, 3\\)" \ - "print one_two_three, indexes off" + "= \\(1, 2, 3\\)" \ + "print one_two_three, indexes off" gdb_test "print e_one_two_three" \ - "= \\(1, 2, 3\\)" \ - "print e_one_two_three, indexes off" + "= \\(1, 2, 3\\)" \ + "print e_one_two_three, indexes off" gdb_test "print r_two_three" \ - "= \\(two => 2, 3\\)" \ - "print r_two_three, indexes off" + "= \\(two => 2, 3\\)" \ + "print r_two_three, indexes off" gdb_test "print u_one_two_three" \ - "= \\(1, 2, 3\\)" \ - "print u_one_two_three, indexes off" + "= \\(1, 2, 3\\)" \ + "print u_one_two_three, indexes off" gdb_test "print p_one_two_three" \ - "= \\(false, true, true\\)" \ - "print p_one_two_three, indexes off" + "= \\(false, true, true\\)" \ + "print p_one_two_three, indexes off" if {$old_gcc} { setup_xfail "*-*-*" } gdb_test "print few_reps" \ - "= \\(1, 2, 3, 3, 3, 3, 3, 4, 5\\)" \ - "print few_reps, indexes off" + "= \\(1, 2, 3, 3, 3, 3, 3, 4, 5\\)" \ + "print few_reps, indexes off" if {$old_gcc} { setup_xfail "*-*-*" } gdb_test "print many_reps" \ - "= \\(1, 2, 3 , 4, 5\\)" \ - "print many_reps, indexes off" + "= \\(1, 2, 3 , 4, 5\\)" \ + "print many_reps, indexes off" if {$old_gcc} { setup_xfail "*-*-*" } gdb_test "print empty" \ - "= \\(\\)" \ - "print empty, indexes off" + "= \\(\\)" \ + "print empty, indexes off" # Next, print all the arrays with the indexes @@ -86,34 +86,34 @@ if {$old_gcc} { setup_xfail "*-*-*" } gdb_test "print one_two_three" \ - "= \\(1 => 1, 2 => 2, 3 => 3\\)" + "= \\(1 => 1, 2 => 2, 3 => 3\\)" gdb_test "print e_one_two_three" \ - "= \\(one => 1, two => 2, three => 3\\)" + "= \\(one => 1, two => 2, three => 3\\)" gdb_test "print r_two_three" \ - "= \\(two => 2, three => 3\\)" + "= \\(two => 2, three => 3\\)" gdb_test "print u_one_two_three" \ - "= \\(1 => 1, 2 => 2, 3 => 3\\)" + "= \\(1 => 1, 2 => 2, 3 => 3\\)" gdb_test "print p_one_two_three" \ - "= \\(one => false, two => true, three => true\\)" + "= \\(one => false, two => true, three => true\\)" if {$old_gcc} { setup_xfail "*-*-*" } gdb_test "print few_reps" \ - "= \\(1 => 1, 2 => 2, 3 => 3, 4 => 3, 5 => 3, 6 => 3, 7 => 3, 8 => 4, 9 => 5\\)" + "= \\(1 => 1, 2 => 2, 3 => 3, 4 => 3, 5 => 3, 6 => 3, 7 => 3, 8 => 4, 9 => 5\\)" if {$old_gcc} { setup_xfail "*-*-*" } gdb_test "print many_reps" \ - "= \\(1 => 1, 2 => 2, 3 => 3 , 15 => 4, 16 => 5\\)" + "= \\(1 => 1, 2 => 2, 3 => 3 , 15 => 4, 16 => 5\\)" if {$old_gcc} { setup_xfail "*-*-*" } gdb_test "print empty" \ - "= \\(\\)" + "= \\(\\)" diff --git a/gdb/testsuite/gdb.ada/arrayparam/foo.adb b/gdb/testsuite/gdb.ada/arrayparam/foo.adb index bdd2499b110..7d004d439f3 100644 --- a/gdb/testsuite/gdb.ada/arrayparam/foo.adb +++ b/gdb/testsuite/gdb.ada/arrayparam/foo.adb @@ -23,4 +23,3 @@ begin Length := -1; Call_Me (My_String); -- STOP end Foo; - diff --git a/gdb/testsuite/gdb.ada/arrayparam/pck.adb b/gdb/testsuite/gdb.ada/arrayparam/pck.adb index 794ac34ec90..aae3a63a3c1 100644 --- a/gdb/testsuite/gdb.ada/arrayparam/pck.adb +++ b/gdb/testsuite/gdb.ada/arrayparam/pck.adb @@ -25,4 +25,3 @@ package body Pck is end Call_Me; end Pck; - diff --git a/gdb/testsuite/gdb.ada/arrayparam/pck.ads b/gdb/testsuite/gdb.ada/arrayparam/pck.ads index af5c8399ea8..0fb6421d8e3 100644 --- a/gdb/testsuite/gdb.ada/arrayparam/pck.ads +++ b/gdb/testsuite/gdb.ada/arrayparam/pck.ads @@ -22,4 +22,3 @@ package Pck is procedure Call_Me (Str : String); end Pck; - diff --git a/gdb/testsuite/gdb.ada/assign_1.exp b/gdb/testsuite/gdb.ada/assign_1.exp index 622fa962425..2339beb28f6 100644 --- a/gdb/testsuite/gdb.ada/assign_1.exp +++ b/gdb/testsuite/gdb.ada/assign_1.exp @@ -22,11 +22,11 @@ clean_restart # Force the language to Ada, as this will not happen automatically # in this case (no test program). gdb_test_no_output "set lang ada" \ - "changing the language to ada" + "changing the language to ada" gdb_test "print \$xxx := 1" \ - "= 1" \ - "set convenience variable \$xxx to 1" + "= 1" \ + "set convenience variable \$xxx to 1" gdb_test "print \$xxx := @ + 23 + @" \ diff --git a/gdb/testsuite/gdb.ada/assign_arr.exp b/gdb/testsuite/gdb.ada/assign_arr.exp index b4897183f76..87ec190a649 100644 --- a/gdb/testsuite/gdb.ada/assign_arr.exp +++ b/gdb/testsuite/gdb.ada/assign_arr.exp @@ -29,10 +29,10 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/main_p324_051.adb] runto "main_p324_051.adb:$bp_location" gdb_test "print assign_arr_input.u2 :=(0.25,0.5,0.75)" \ - " = \\(0\\.25, 0\\.5, 0\\.75\\)" + " = \\(0\\.25, 0\\.5, 0\\.75\\)" gdb_test "print assign_arr_input.u2 :=(0.25, others => 0.125)" \ - " = \\(0\\.25, 0\\.125, 0\\.125\\)" + " = \\(0\\.25, 0\\.125, 0\\.125\\)" set line [gdb_get_line_number "STOP2" ${testdir}/target_wrapper.adb] gdb_breakpoint target_wrapper.adb:$line diff --git a/gdb/testsuite/gdb.ada/atomic_enum.exp b/gdb/testsuite/gdb.ada/atomic_enum.exp index 58838feda63..22b0f8709a4 100644 --- a/gdb/testsuite/gdb.ada/atomic_enum.exp +++ b/gdb/testsuite/gdb.ada/atomic_enum.exp @@ -28,11 +28,10 @@ clean_restart ${testfile} set test "ptype pck.data_flag" gdb_test_multiple "$test" $test { -re "type = \\(one, two, three\\).*$gdb_prompt $" { - pass $test - } + pass $test + } -re "type = \\(\\).*$gdb_prompt $" { - # This is a known compiler problem with Stabs. - xfail $test - } + # This is a known compiler problem with Stabs. + xfail $test + } } - diff --git a/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp b/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp index 87a233a253e..4ea55fc5858 100644 --- a/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp +++ b/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp @@ -39,7 +39,7 @@ with_test_prefix "run" { } gdb_test "continue" \ - ".*Breakpoint \[0-9\]+, foo\\.p \\(s=.*\\) at .*foo.adb:\[0-9\]+.*" + ".*Breakpoint \[0-9\]+, foo\\.p \\(s=.*\\) at .*foo.adb:\[0-9\]+.*" with_test_prefix "cont" { gdb_test "print s'first" " = 4" diff --git a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp index 48ff9c1ae87..96fa3350d45 100644 --- a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp +++ b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp @@ -34,17 +34,17 @@ runto "foo.adb:$bp_location" # report an error. Try various weird combinations too. gdb_test "break *break_me'address TASK 2" \ - "Garbage 'TASK 2' at end of command" + "Garbage 'TASK 2' at end of command" set test "break *break_me'address TASK Task TaSK 2" gdb_test_multiple "$test" $test { -re "Garbage 'TASK Task TaSK 2' at end of command\[\r\n\]+$gdb_prompt $" { - pass $test - } + pass $test + } -re "Garbage 'TaSK 2' at end of command\[\r\n\]+$gdb_prompt $" { - kfail gdb/14111 "$test" - } + kfail gdb/14111 "$test" + } } gdb_test "break *break_me'address TASK if" \ - "Garbage 'TASK if' at end of command" + "Garbage 'TASK if' at end of command" diff --git a/gdb/testsuite/gdb.ada/big_packed_array.exp b/gdb/testsuite/gdb.ada/big_packed_array.exp index 96ed9d29a28..fbc20d58d72 100644 --- a/gdb/testsuite/gdb.ada/big_packed_array.exp +++ b/gdb/testsuite/gdb.ada/big_packed_array.exp @@ -45,14 +45,14 @@ foreach_gnat_encoding scenario flags {all minimal} { set re_xfail2 "= \\(0 => 0 , ($decimal)\\)" gdb_test_multiple "print bad" "" { -re -wrap $re { - pass $gdb_test_name + pass $gdb_test_name } -re -wrap $re_xfail { - if { $have_xfail } { - # gcc/101643 - setup_xfail *-*-* - } - fail $gdb_test_name + if { $have_xfail } { + # gcc/101643 + setup_xfail *-*-* + } + fail $gdb_test_name } -re -wrap $re_xfail2 { set last $expect_out(1,string) @@ -61,12 +61,12 @@ foreach_gnat_encoding scenario flags {all minimal} { } else { set mask 0xf0 } - if { $have_xfail && [string is integer $last] \ + if { $have_xfail && [string is integer $last] \ && [expr ($last & $mask) == 0] } { - # gcc/101643 - setup_xfail *-*-* - } - fail $gdb_test_name + # gcc/101643 + setup_xfail *-*-* + } + fail $gdb_test_name } } } diff --git a/gdb/testsuite/gdb.ada/boolean_expr.exp b/gdb/testsuite/gdb.ada/boolean_expr.exp index de6cc4c4b71..9d52db7fc5e 100644 --- a/gdb/testsuite/gdb.ada/boolean_expr.exp +++ b/gdb/testsuite/gdb.ada/boolean_expr.exp @@ -25,10 +25,10 @@ set any_addr "0x\[0-9a-zA-Z\]+" # Force the language to Ada, as this will not happen automatically # in this case (no test program). gdb_test_no_output "set lang ada" \ - "changing the language to ada" + "changing the language to ada" gdb_test "print 1 = 2" \ - "= false" + "= false" gdb_test "print 3 = 3" \ - "= true" + "= true" diff --git a/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp b/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp index 63b6ecb126e..288ed29a958 100644 --- a/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp +++ b/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp @@ -52,43 +52,43 @@ if {![runto "foo_h731_021"]} { # Verify that the current language is Ada. gdb_test "show lang" \ - "\"auto; currently ada\"\\." + "\"auto; currently ada\"\\." # Before running to the C function (and thus switching out of Ada # mode), try printing the function using the "<...>" notation. gdb_test "p " \ - " = void" \ - "p , in Ada" + " = void" \ + "p , in Ada" gdb_test "p " \ - " = {} $hex " \ - "p , in Ada" + " = {} $hex " \ + "p , in Ada" # Try inserting a breakpoint inside a C function. Because the function's # name has some uppercase letters, we need to use the "<...>" notation. # The purpose of this testcase is to verify that we can in fact do so # and that it inserts the breakpoint at the expected location. gdb_test "break " \ - "Breakpoint $decimal at $hex: file .*bar.c, line $decimal\\." + "Breakpoint $decimal at $hex: file .*bar.c, line $decimal\\." # Same, but this time on the function with no debug info. gdb_test "break " \ - "Breakpoint $decimal at $hex" + "Breakpoint $decimal at $hex" # Resume the program's execution, verifying that it lands at the expected # location. gdb_test "continue" \ - "Breakpoint $decimal, MixedCaseFunc \\(\\) at .*bar\\.c:$decimal.*" + "Breakpoint $decimal, MixedCaseFunc \\(\\) at .*bar\\.c:$decimal.*" # Try printing again using the "<...>" notation. This shouldn't work # now, since the current frame is a C function. gdb_test "p " \ - "A syntax error in expression, near `'\\." \ - "p , in C" + "A syntax error in expression, near `'\\." \ + "p , in C" gdb_test "p " \ - "A syntax error in expression, near `'\\." \ - "p , in C" + "A syntax error in expression, near `'\\." \ + "p , in C" set test "break , in C" gdb_test_multiple "break " $test { diff --git a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp index 511b5dbcf48..d104ae48921 100644 --- a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp +++ b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp @@ -27,7 +27,7 @@ clean_restart ${testfile} # Force GDB to convert the psymtab of pck.adb into a symtab. gdb_test "list pck.adb:1" \ - "$decimal\[ \t\]+-- Copyright.*" + "$decimal\[ \t\]+-- Copyright.*" # Break on subprogram "Archive". There is an enumeral that's an # homonym, so verify that GDB doesn't provide the choice between @@ -35,7 +35,7 @@ gdb_test "list pck.adb:1" \ # Instead, it should insert the breakpoint on the function alone. gdb_test "break archive" \ - "Breakpoint $decimal at $hex: file .*pck.adb, line $decimal\\." + "Breakpoint $decimal at $hex: file .*pck.adb, line $decimal\\." # Run the program. Make sure the program runs until it hits # the breakpoint and that the debugger does not unexpectedly ask @@ -45,6 +45,5 @@ gdb_test "break archive" \ gdb_run_cmd gdb_test "" \ - "Breakpoint $decimal, pck\\.archive \\(\\).*" \ - "run to pck.archive breakpoint" - + "Breakpoint $decimal, pck\\.archive \\(\\).*" \ + "run to pck.archive breakpoint" diff --git a/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb b/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb index 84cb6976f7f..988f28f6f17 100644 --- a/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb +++ b/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb @@ -23,4 +23,3 @@ begin Archive; end if; end P; - diff --git a/gdb/testsuite/gdb.ada/bp_fun_addr.exp b/gdb/testsuite/gdb.ada/bp_fun_addr.exp index 82481a94c7e..be67a2a1d45 100644 --- a/gdb/testsuite/gdb.ada/bp_fun_addr.exp +++ b/gdb/testsuite/gdb.ada/bp_fun_addr.exp @@ -26,10 +26,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { clean_restart ${testfile} gdb_test "break *bp_fun_addr'address" \ - "Breakpoint \[0-9\]+ at.*: file .*bp_fun_addr.adb, line \[0-9\]+." + "Breakpoint \[0-9\]+ at.*: file .*bp_fun_addr.adb, line \[0-9\]+." gdb_run_cmd gdb_test "" \ - "Breakpoint $decimal, bp_fun_addr \\(\\).*" \ - "run until breakpoint at bp_fun_addr'address" - + "Breakpoint $decimal, bp_fun_addr \\(\\).*" \ + "run until breakpoint at bp_fun_addr'address" diff --git a/gdb/testsuite/gdb.ada/bp_inlined_func.exp b/gdb/testsuite/gdb.ada/bp_inlined_func.exp index 3bab85a126d..8b05a428a78 100644 --- a/gdb/testsuite/gdb.ada/bp_inlined_func.exp +++ b/gdb/testsuite/gdb.ada/bp_inlined_func.exp @@ -33,8 +33,8 @@ if {![runto_main]} { # 4 breakpoints (or possibly 5, including the read_small function itself). gdb_test "break read_small" \ - "Breakpoint $decimal at $hex: read_small\\. \\(\[45\] locations\\)" \ - "set breakpoint at read_small" + "Breakpoint $decimal at $hex: read_small\\. \\(\[45\] locations\\)" \ + "set breakpoint at read_small" # We do not verify each breakpoint info, but use continue commands instead # to verify that we properly stop on each expected breakpoint. @@ -50,5 +50,5 @@ for {set i 0} {$i < 4} {incr i} { } gdb_test "continue" \ - "Continuing\\..*$inferior_exited_re.*" \ - "continuing to program completion" + "Continuing\\..*$inferior_exited_re.*" \ + "continuing to program completion" diff --git a/gdb/testsuite/gdb.ada/bp_on_var.exp b/gdb/testsuite/gdb.ada/bp_on_var.exp index 78ba4bfba70..0b5e6a1a0a6 100644 --- a/gdb/testsuite/gdb.ada/bp_on_var.exp +++ b/gdb/testsuite/gdb.ada/bp_on_var.exp @@ -33,7 +33,7 @@ clean_restart ${testfile} gdb_test_no_output "set breakpoint pending off" "disable pending breakpoints" gdb_test "break pck.my_global_variable" \ - "Function \"pck\\.my_global_variable\" not defined\\." + "Function \"pck\\.my_global_variable\" not defined\\." # Test inserting breakpoint on pck.my_hidden_variable. @@ -44,4 +44,4 @@ gdb_test_no_output "set breakpoint pending off" \ "disable pending breakpoints after restart" gdb_test "break pck.my_hidden_variable" \ - "Function \"pck\\.my_hidden_variable\" not defined\\." + "Function \"pck\\.my_hidden_variable\" not defined\\." diff --git a/gdb/testsuite/gdb.ada/bp_on_var/pck.adb b/gdb/testsuite/gdb.ada/bp_on_var/pck.adb index 2371a1f6b6b..5b8641af65f 100644 --- a/gdb/testsuite/gdb.ada/bp_on_var/pck.adb +++ b/gdb/testsuite/gdb.ada/bp_on_var/pck.adb @@ -24,4 +24,3 @@ package body Pck is My_Hidden_Variable := My_Hidden_Variable + 1; end Do_Something; end Pck; - diff --git a/gdb/testsuite/gdb.ada/bp_on_var/pck.ads b/gdb/testsuite/gdb.ada/bp_on_var/pck.ads index 979207a515a..279678e880a 100644 --- a/gdb/testsuite/gdb.ada/bp_on_var/pck.ads +++ b/gdb/testsuite/gdb.ada/bp_on_var/pck.ads @@ -17,4 +17,3 @@ package Pck is My_Global_Variable : Integer := 11; procedure Do_Something (I : in out Integer); end Pck; - diff --git a/gdb/testsuite/gdb.ada/bp_range_type.exp b/gdb/testsuite/gdb.ada/bp_range_type.exp index fd9ab988196..ba16fe23235 100644 --- a/gdb/testsuite/gdb.ada/bp_range_type.exp +++ b/gdb/testsuite/gdb.ada/bp_range_type.exp @@ -28,12 +28,12 @@ clean_restart ${testfile} set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] gdb_test "break foo.adb:$bp_location if small_value > 20" \ - "Breakpoint $decimal at $hex: file .*foo.adb, line $decimal\\." + "Breakpoint $decimal at $hex: file .*foo.adb, line $decimal\\." gdb_run_cmd gdb_test "" \ - "Breakpoint $decimal, foo \\(\\).*" \ - "run to breakpoint" + "Breakpoint $decimal, foo \\(\\).*" \ + "run to breakpoint" # Verify that we stopped at the correct iteration. gdb_test "print small_value" " = 25" diff --git a/gdb/testsuite/gdb.ada/bp_reset.exp b/gdb/testsuite/gdb.ada/bp_reset.exp index c8a18570b6f..d5441debf6e 100644 --- a/gdb/testsuite/gdb.ada/bp_reset.exp +++ b/gdb/testsuite/gdb.ada/bp_reset.exp @@ -26,10 +26,10 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } clean_restart ${testfile} gdb_test "break nested_sub" \ - "Breakpoint $decimal at $hex: file .*foo.adb, line $decimal\\." + "Breakpoint $decimal at $hex: file .*foo.adb, line $decimal\\." gdb_test "break do_nothing" \ - "Breakpoint $decimal at $hex: file .*pck.adb, line $decimal\\." + "Breakpoint $decimal at $hex: file .*pck.adb, line $decimal\\." # Run the program. Make sure the program runs until it hits # the first breakpoint inside nested_sub. diff --git a/gdb/testsuite/gdb.ada/byte_packed_arr.exp b/gdb/testsuite/gdb.ada/byte_packed_arr.exp index d3f51d933cb..6014c0864b0 100644 --- a/gdb/testsuite/gdb.ada/byte_packed_arr.exp +++ b/gdb/testsuite/gdb.ada/byte_packed_arr.exp @@ -29,4 +29,4 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/reprod.adb] runto "reprod.adb:$bp_location" gdb_test "print broken" \ - " = \\(len => 1, data => \\(\\(i => 1\\)\\)\\)" + " = \\(len => 1, data => \\(\\(i => 1\\)\\)\\)" diff --git a/gdb/testsuite/gdb.ada/call_pn/foo.adb b/gdb/testsuite/gdb.ada/call_pn/foo.adb index 7923732071a..42ad7bdb5b2 100644 --- a/gdb/testsuite/gdb.ada/call_pn/foo.adb +++ b/gdb/testsuite/gdb.ada/call_pn/foo.adb @@ -20,4 +20,3 @@ procedure Foo is begin New_Node := Pn (1234); -- STOP end Foo; - diff --git a/gdb/testsuite/gdb.ada/call_pn/pck.adb b/gdb/testsuite/gdb.ada/call_pn/pck.adb index 6604aeaf111..61f81d037cc 100644 --- a/gdb/testsuite/gdb.ada/call_pn/pck.adb +++ b/gdb/testsuite/gdb.ada/call_pn/pck.adb @@ -22,4 +22,3 @@ package body Pck is return N; end Pn; end Pck; - diff --git a/gdb/testsuite/gdb.ada/call_pn/pck.ads b/gdb/testsuite/gdb.ada/call_pn/pck.ads index f1cc9c2dd7f..6e9edd4ed9f 100644 --- a/gdb/testsuite/gdb.ada/call_pn/pck.ads +++ b/gdb/testsuite/gdb.ada/call_pn/pck.ads @@ -20,4 +20,3 @@ package Pck is function Pn (N : Node_Id) return Node_Id; end Pck; - diff --git a/gdb/testsuite/gdb.ada/catch_assert_if.exp b/gdb/testsuite/gdb.ada/catch_assert_if.exp index eca657f869e..443a90fc09e 100644 --- a/gdb/testsuite/gdb.ada/catch_assert_if.exp +++ b/gdb/testsuite/gdb.ada/catch_assert_if.exp @@ -39,8 +39,8 @@ if {![runto_main]} { } gdb_test "catch assert if Global_Var = 2" \ - "Catchpoint $decimal: failed Ada assertions" \ - "insert catchpoint on failed assertions with condition" + "Catchpoint $decimal: failed Ada assertions" \ + "insert catchpoint on failed assertions with condition" # Check that condition is stored and properly displayed. @@ -53,8 +53,8 @@ set catchpoint_msg \ "Catchpoint $decimal, failed assertion at $hex in bla \\\(\\\).*at .*bla.adb:$bp_location" gdb_test "continue" \ "Continuing\\.$eol$eol$catchpoint_msg$eol.*STOP" \ - "continuing to expected failed assertion" + "continuing to expected failed assertion" gdb_test "continue" \ - "Continuing\\..*$inferior_exited_re.*" \ - "continuing to program completion" + "Continuing\\..*$inferior_exited_re.*" \ + "continuing to program completion" diff --git a/gdb/testsuite/gdb.ada/catch_assert_if/pck.ads b/gdb/testsuite/gdb.ada/catch_assert_if/pck.ads index 62409d58d13..3f48421e8e1 100644 --- a/gdb/testsuite/gdb.ada/catch_assert_if/pck.ads +++ b/gdb/testsuite/gdb.ada/catch_assert_if/pck.ads @@ -16,4 +16,3 @@ package Pck is Global_Var : Integer := 0; end Pck; - diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp index 34f32022541..8ea718e4eaf 100644 --- a/gdb/testsuite/gdb.ada/catch_ex.exp +++ b/gdb/testsuite/gdb.ada/catch_ex.exp @@ -49,20 +49,20 @@ gdb_test "catch exception" \ "insert catchpoint on all Ada exceptions" gdb_test "info break" \ - "$info_break_header$eol.*$catch_exception_info" \ - "info break, catch all Ada exceptions" + "$info_break_header$eol.*$catch_exception_info" \ + "info break, catch all Ada exceptions" set catchpoint_msg \ "Catchpoint $any_nb, CONSTRAINT_ERROR (\\\(ignore C_E\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb" gdb_test "continue" \ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT1" \ - "continuing to first exception" + "continuing to first exception" set catchpoint_msg \ "Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo\\.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb" gdb_test "continue" \ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT2" \ - "continuing to second exception" + "continuing to second exception" ################################################ # 2. Try catching only some of the exceptions. # @@ -83,16 +83,16 @@ if {![runto_main]} { } gdb_test "catch exception Program_Error" \ - "Catchpoint $any_nb: \`Program_Error' Ada exception" \ - "insert catchpoint on Program_Error" + "Catchpoint $any_nb: \`Program_Error' Ada exception" \ + "insert catchpoint on Program_Error" gdb_test "catch assert" \ - "Catchpoint $any_nb: failed Ada assertions" \ - "insert catchpoint on failed assertions" + "Catchpoint $any_nb: failed Ada assertions" \ + "insert catchpoint on failed assertions" gdb_test "catch exception unhandled" \ - "Catchpoint $any_nb: unhandled Ada exceptions" \ - "insert catchpoint on unhandled exceptions" + "Catchpoint $any_nb: unhandled Ada exceptions" \ + "insert catchpoint on unhandled exceptions" set catch_exception_entry \ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}\`Program_Error' Ada exception" @@ -102,30 +102,30 @@ set catch_unhandled_entry \ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}unhandled Ada exceptions" gdb_test "info break" \ - "$info_break_header$eol.*$catch_exception_entry$eol$catch_assert_entry$eol$catch_unhandled_entry" \ - "info break, second run" + "$info_break_header$eol.*$catch_exception_entry$eol$catch_assert_entry$eol$catch_unhandled_entry" \ + "info break, second run" set catchpoint_msg \ "Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb" gdb_test "continue" \ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT2" \ - "continuing to Program_Error exception" + "continuing to Program_Error exception" set catchpoint_msg \ "Catchpoint $any_nb, failed assertion at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb" gdb_test "continue" \ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT3" \ - "continuing to failed assertion" + "continuing to failed assertion" set catchpoint_msg \ "Catchpoint $any_nb, unhandled CONSTRAINT_ERROR at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb" gdb_test "continue" \ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT4" \ - "continuing to unhandled exception" + "continuing to unhandled exception" gdb_test "continue" \ - "Continuing\\..*$inferior_exited_re.*" \ - "continuing to program completion" + "Continuing\\..*$inferior_exited_re.*" \ + "continuing to program completion" ################################# # 3. Try temporary catchpoints. # @@ -143,18 +143,16 @@ if {![runto_main]} { } gdb_test "tcatch exception" \ - "Temporary catchpoint $any_nb: all Ada exceptions" + "Temporary catchpoint $any_nb: all Ada exceptions" set temp_catchpoint_msg \ "Temporary catchpoint $any_nb, CONSTRAINT_ERROR (\\\(.*\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb" gdb_test "continue" \ "Continuing\\.$eol$eol$temp_catchpoint_msg$eol.*SPOT1" \ - "continuing to temporary catchpoint" + "continuing to temporary catchpoint" with_test_prefix "temporary catchpoint" { gdb_test "continue" \ "Continuing\\..*$inferior_exited_re.*" \ "continuing to program completion" } - - diff --git a/gdb/testsuite/gdb.ada/char_enum/pck.adb b/gdb/testsuite/gdb.ada/char_enum/pck.adb index fc67d2f6938..2bfbe8ce33e 100644 --- a/gdb/testsuite/gdb.ada/char_enum/pck.adb +++ b/gdb/testsuite/gdb.ada/char_enum/pck.adb @@ -19,4 +19,3 @@ package body Pck is null; end Do_Nothing; end Pck; - diff --git a/gdb/testsuite/gdb.ada/char_enum/pck.ads b/gdb/testsuite/gdb.ada/char_enum/pck.ads index 0293c79ff34..e83e7442f50 100644 --- a/gdb/testsuite/gdb.ada/char_enum/pck.ads +++ b/gdb/testsuite/gdb.ada/char_enum/pck.ads @@ -19,4 +19,3 @@ package Pck is type Global_Enum_Type is ('x', 'Y', '+'); procedure Do_Nothing (A : System.Address); end Pck; - diff --git a/gdb/testsuite/gdb.ada/char_param.exp b/gdb/testsuite/gdb.ada/char_param.exp index 1490b710284..b33d8201411 100644 --- a/gdb/testsuite/gdb.ada/char_param.exp +++ b/gdb/testsuite/gdb.ada/char_param.exp @@ -34,23 +34,21 @@ runto "foo.adb:$bp_location" # the function call. gdb_test "print procedure_result" \ - "= 32 ' '" \ - "print procedure_result before calling same" + "= 32 ' '" \ + "print procedure_result before calling same" gdb_test "call same (first)" \ - "" \ - "call same" + "" \ + "call same" gdb_test "print procedure_result" \ - "= 97 'a'" \ - "print procedure_result after calling same" + "= 97 'a'" \ + "print procedure_result after calling same" gdb_test "call next (first)" \ - "= 98 'b'" \ - "call next" + "= 98 'b'" \ + "call next" gdb_test "print procedure_result" \ - "= 98 'b'" \ - "print procedure_result after calling next" - - + "= 98 'b'" \ + "print procedure_result after calling next" diff --git a/gdb/testsuite/gdb.ada/char_param/foo.adb b/gdb/testsuite/gdb.ada/char_param/foo.adb index b1e4bfd2423..b07fc9eb594 100644 --- a/gdb/testsuite/gdb.ada/char_param/foo.adb +++ b/gdb/testsuite/gdb.ada/char_param/foo.adb @@ -22,6 +22,3 @@ begin Same (First); -- STOP Next (First); end Foo; - - - diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp index fbdd24c466b..725f06bbb39 100644 --- a/gdb/testsuite/gdb.ada/complete.exp +++ b/gdb/testsuite/gdb.ada/complete.exp @@ -50,7 +50,7 @@ proc test_gdb_complete { expr expected_output {msg ""} } { set msg $cmd } gdb_test "complete p $expr" \ - "$expected_output" $msg + "$expected_output" $msg } # A convenience function that verifies that the "complete EXPR" command @@ -63,12 +63,12 @@ proc test_gdb_no_completion { expr } { # Try a global variable, only one match should be found: test_gdb_complete "my_glob" \ - "p my_global_variable" + "p my_global_variable" # A global variable, inside a nested package: test_gdb_complete "insi" \ - "p inside_variable" + "p inside_variable" # A global variable inside a nested package, but only giving part of # the fully qualified name (top level package name missing): @@ -77,16 +77,16 @@ test_gdb_no_completion "inner.insi" # An incomplete nested package name, were lies a single symbol: test_gdb_complete "pck.inne" \ - "p pck.inner.inside_variable" \ - "complete nested package name" + "p pck.inner.inside_variable" \ + "complete nested package name" # A fully qualified symbol name, mangled... test_gdb_complete "pck__inner__ins" \ - "p pck__inner__inside_variable" + "p pck__inner__inside_variable" # A fully qualified symbol name... test_gdb_complete "pck.inner.ins" \ - "p pck.inner.inside_variable" + "p pck.inner.inside_variable" # Make sure that "inside" is not returned as a possible completion # for "side"... @@ -98,7 +98,7 @@ test_gdb_no_completion "exported" # check the "<...>" notation. test_gdb_complete "" + "p " # While at it, make sure we can print the symbol too, using the '<' # notation. @@ -112,16 +112,16 @@ gdb_test "p exported_capitalized" \ # A global symbol, created by the binder, that starts with __gnat... test_gdb_complete "__gnat_ada_main_progra" \ - "p __gnat_ada_main_program_name" + "p __gnat_ada_main_program_name" # A global symbol, created by the binder, that starts with __gnat, # and using the '<' notation. test_gdb_complete "<__gnat_ada_main_prog" \ - "p <__gnat_ada_main_program_name>" + "p <__gnat_ada_main_program_name>" # A local variable test_gdb_complete "some" \ - "p some_local_variable" + "p some_local_variable" # A local variable variable, but in a different procedure. No match # should be returned. @@ -132,7 +132,7 @@ test_gdb_no_completion "pck.ins" # A fully qualified variable name that does exist... test_gdb_complete "pck.my" \ - "p pck.my_global_variable" + "p pck.my_global_variable" # A fully qualified package name test_gdb_complete "pck.inner" \ @@ -141,28 +141,28 @@ test_gdb_complete "pck.inner" \ # A fully qualified package name, with a dot at the end test_gdb_complete "pck.inner." \ - "p pck.inner.inside_variable" + "p pck.inner.inside_variable" # Two matches, from the global scope: test_gdb_complete "local_ident" \ - [multi_line "p local_identical_one" \ - "p local_identical_two" ] + [multi_line "p local_identical_one" \ + "p local_identical_two" ] # Two matches, from the global scope, but using fully qualified names: test_gdb_complete "pck.local_ident" \ - [multi_line "p pck.local_identical_one" \ - "p pck.local_identical_two" ] + [multi_line "p pck.local_identical_one" \ + "p pck.local_identical_two" ] # Two matches, from the global scope, but using mangled fully qualified # names: test_gdb_complete "pck__local_ident" \ - [multi_line "p pck__local_identical_one" \ - "p pck__local_identical_two" ] + [multi_line "p pck__local_identical_one" \ + "p pck__local_identical_two" ] # Two matches, one from the global scope, the other from the local scope: test_gdb_complete "external_ident" \ - [multi_line "p external_identical_one" \ - "p external_identical_two" ] + [multi_line "p external_identical_one" \ + "p external_identical_two" ] # Complete on the name of package. test_gdb_complete "pck" \ @@ -198,7 +198,7 @@ test_gdb_complete "pck." \ # Complete a mangled symbol name, but using the '<...>' notation. test_gdb_complete "" + "p " # Very simple completion, but using the interactive form, this time. # The verification we are trying to make involves the event loop, @@ -224,12 +224,12 @@ if { [readline_is_used] } { # which users can select a specific function. This should not happen during # completion, though. test_gdb_complete "ambig" \ - [multi_line "p ambiguous_func" \ - "p ambiguous_proc" ] + [multi_line "p ambiguous_func" \ + "p ambiguous_proc" ] test_gdb_complete "ambiguous_f" \ - "p ambiguous_func" + "p ambiguous_func" test_gdb_complete "ambiguous_func" \ - "p ambiguous_func" + "p ambiguous_func" # Perform a test intended to verify the behavior where the number # of possible completions is very large. The goal is not to verify diff --git a/gdb/testsuite/gdb.ada/complete/foo.adb b/gdb/testsuite/gdb.ada/complete/foo.adb index 446d054ca47..5d93e53ac4e 100644 --- a/gdb/testsuite/gdb.ada/complete/foo.adb +++ b/gdb/testsuite/gdb.ada/complete/foo.adb @@ -26,4 +26,3 @@ begin Aux_Pck.Ambiguous_Proc; Pck.Ambiguous_Func; end Foo; - diff --git a/gdb/testsuite/gdb.ada/cond_lang.exp b/gdb/testsuite/gdb.ada/cond_lang.exp index a0db685b09c..599a1223643 100644 --- a/gdb/testsuite/gdb.ada/cond_lang.exp +++ b/gdb/testsuite/gdb.ada/cond_lang.exp @@ -33,7 +33,7 @@ clean_restart ${testfile} # Run to c_function an verify that the language automatically gets set to C. runto c_function gdb_test "show lang" \ - "The current source language is \"auto; currently c\"\\." + "The current source language is \"auto; currently c\"\\." # Now, insert a breakpoint inside an Ada unit, using a condition written # in Ada. Even though the current language is "auto; currently c", we @@ -41,13 +41,11 @@ gdb_test "show lang" \ # current language mode is auto, and the breakpoint is inside Ada code. set bp_location [gdb_get_line_number "STOP" ${testdir}/mixed.adb] gdb_test "break mixed.adb:${bp_location} if light = green" \ - "Breakpoint \[0-9\]* at .*: file (.*/)?mixed.adb, line \[0-9\]*\\." + "Breakpoint \[0-9\]* at .*: file (.*/)?mixed.adb, line \[0-9\]*\\." # Now, continue until we hit the breakpoint. If the condition is # evaluated correctly, the first hit will be ignored, and the debugger # will stop at the second hit only, when the "light" argument is equal # to green. gdb_test "continue" \ - "Breakpoint \[0-9\]*, mixed\\.break_me \\(light=green\\) at .*" - - + "Breakpoint \[0-9\]*, mixed\\.break_me \\(light=green\\) at .*" diff --git a/gdb/testsuite/gdb.ada/cond_lang/foo.c b/gdb/testsuite/gdb.ada/cond_lang/foo.c index aeb28b8229a..55fb1a84fe9 100644 --- a/gdb/testsuite/gdb.ada/cond_lang/foo.c +++ b/gdb/testsuite/gdb.ada/cond_lang/foo.c @@ -22,4 +22,3 @@ c_function (void) { callme (); } - diff --git a/gdb/testsuite/gdb.ada/disc_arr_bound.exp b/gdb/testsuite/gdb.ada/disc_arr_bound.exp index 7ea65a8d1e9..e34ab4ece07 100644 --- a/gdb/testsuite/gdb.ada/disc_arr_bound.exp +++ b/gdb/testsuite/gdb.ada/disc_arr_bound.exp @@ -31,7 +31,7 @@ if {![runto "foo_n612_026.adb:$bp_location"]} { } gdb_test "print r" \ - " = \\(n => 10, a => \\(10, 20, 30, 40, 50, 60, 70, 80, 90, 100\\)\\)" + " = \\(n => 10, a => \\(10, 20, 30, 40, 50, 60, 70, 80, 90, 100\\)\\)" gdb_test "print r.a" \ - " = \\(10, 20, 30, 40, 50, 60, 70, 80, 90, 100\\)" + " = \\(10, 20, 30, 40, 50, 60, 70, 80, 90, 100\\)" diff --git a/gdb/testsuite/gdb.ada/dot_all/pck.adb b/gdb/testsuite/gdb.ada/dot_all/pck.adb index 7b1933a9791..4c32dd51854 100644 --- a/gdb/testsuite/gdb.ada/dot_all/pck.adb +++ b/gdb/testsuite/gdb.ada/dot_all/pck.adb @@ -21,5 +21,3 @@ package body Pck is end Do_Nothing; end Pck; - - diff --git a/gdb/testsuite/gdb.ada/dot_all/pck.ads b/gdb/testsuite/gdb.ada/dot_all/pck.ads index 90ba348c437..778ac5ad280 100644 --- a/gdb/testsuite/gdb.ada/dot_all/pck.ads +++ b/gdb/testsuite/gdb.ada/dot_all/pck.ads @@ -18,5 +18,3 @@ with System; package Pck is procedure Do_Nothing (A : System.Address); end Pck; - - diff --git a/gdb/testsuite/gdb.ada/dyn_arrayidx.exp b/gdb/testsuite/gdb.ada/dyn_arrayidx.exp index f166e2add33..0affece8681 100644 --- a/gdb/testsuite/gdb.ada/dyn_arrayidx.exp +++ b/gdb/testsuite/gdb.ada/dyn_arrayidx.exp @@ -33,4 +33,4 @@ runto "foo.adb:$bp_location" gdb_test_no_output "maintenance set ada ignore-descriptive-types" gdb_test "ptype array_type" \ - " = array \\(5 \\.\\. 10\\) of natural" \ + " = array \\(5 \\.\\. 10\\) of natural" \ diff --git a/gdb/testsuite/gdb.ada/dyn_loc.exp b/gdb/testsuite/gdb.ada/dyn_loc.exp index b8207644212..5ff2287779c 100644 --- a/gdb/testsuite/gdb.ada/dyn_loc.exp +++ b/gdb/testsuite/gdb.ada/dyn_loc.exp @@ -35,13 +35,12 @@ set eol "\r\n" set test "info locals" gdb_test_multiple "$test" "$test" { -re "i = \"AA\"${eol}s = \" \"" { - pass $test + pass $test } -re "i = \"AA\"${eol}.*${eol}s = \" \"" { - # The debugger printed the two local variable correctly, but - # it probably failed to NOT print some variables internally - # generated by the compiler. This is a known issue. - xfail $test + # The debugger printed the two local variable correctly, but + # it probably failed to NOT print some variables internally + # generated by the compiler. This is a known issue. + xfail $test } } - diff --git a/gdb/testsuite/gdb.ada/dyn_stride.exp b/gdb/testsuite/gdb.ada/dyn_stride.exp index 95ec606b3b8..b25a56910da 100644 --- a/gdb/testsuite/gdb.ada/dyn_stride.exp +++ b/gdb/testsuite/gdb.ada/dyn_stride.exp @@ -31,16 +31,16 @@ if {![runto "foo.adb:$bp_location"]} { } gdb_test "print A1(1)" \ - "\\(i => 0, s => \"\"\\)" + "\\(i => 0, s => \"\"\\)" gdb_test "print A1(2)" \ - "\\(i => 1, s => \"A\"\\)" + "\\(i => 1, s => \"A\"\\)" gdb_test "print A1(3)" \ - "\\(i => 2, s => \"AB\"\\)" + "\\(i => 2, s => \"AB\"\\)" gdb_test "print A1(1..3)" \ - "\\(\\(i => 0, s => \"\"\\), \\(i => 1, s => \"A\"\\), \\(i => 2, s => \"AB\"\\)\\)" + "\\(\\(i => 0, s => \"\"\\), \\(i => 1, s => \"A\"\\), \\(i => 2, s => \"AB\"\\)\\)" # Test the use of the "repeat" operator (@). # @@ -59,4 +59,4 @@ gdb_test "print A1(1..3)" \ # of the array). gdb_test "print a1(1)@3" \ - " = \\(\\(i => 0, s => \"\"\\), \\(i => -?$decimal, s => .*\\), \\(i => -?$decimal, s => .*\\)\\)" + " = \\(\\(i => 0, s => \"\"\\), \\(i => -?$decimal, s => .*\\), \\(i => -?$decimal, s => .*\\)\\)" diff --git a/gdb/testsuite/gdb.ada/excep_handle.exp b/gdb/testsuite/gdb.ada/excep_handle.exp index 40047f4f640..b2dc3bf0fb7 100644 --- a/gdb/testsuite/gdb.ada/excep_handle.exp +++ b/gdb/testsuite/gdb.ada/excep_handle.exp @@ -70,7 +70,7 @@ gdb_test "continue" \ "continuing and stopping in Storage_Error exception handlers" gdb_test_no_output "delete 2" \ - "delete catchpoint on all Ada exceptions handlers" + "delete catchpoint on all Ada exceptions handlers" ################################################## # 2. Try catching some named exception handlers. # @@ -79,8 +79,8 @@ gdb_test_no_output "delete 2" \ # Insert a catchpoint on Program_Error Ada exception handlers. gdb_test "catch handlers Program_Error" \ - "Catchpoint $decimal: `Program_Error' Ada exception handlers" \ - "insert catchpoint on Program_Error Ada exception handlers" + "Catchpoint $decimal: `Program_Error' Ada exception handlers" \ + "insert catchpoint on Program_Error Ada exception handlers" # Continue, we should not stop at ABORT_SIGNAL but at Program_Error one. @@ -95,8 +95,8 @@ gdb_test_no_output \ # Insert a catchpoint on Storage_Error Ada exception handlers. gdb_test "catch handlers Storage_Error" \ - "Catchpoint $decimal: `Storage_Error' Ada exception handlers" \ - "insert catchpoint on Storage_Error Ada exception handlers" + "Catchpoint $decimal: `Storage_Error' Ada exception handlers" \ + "insert catchpoint on Storage_Error Ada exception handlers" # Continue, we should stop at Storage_Error handlers. @@ -115,13 +115,13 @@ gdb_test_no_output \ # Insert a catchpoint on all Ada exceptions handlers with condition. gdb_test "catch handlers if Global_Var = 2" \ - "Catchpoint $decimal: all Ada exceptions handlers" \ - "insert catchpoint on all Ada exception handlers with condition" + "Catchpoint $decimal: all Ada exceptions handlers" \ + "insert catchpoint on all Ada exception handlers with condition" # Check that condition is stored and properly displayed. gdb_test "info breakpoint" "stop only if Global_Var = 2" \ - "Check catch handlers with condition" + "Check catch handlers with condition" # Continue, we should not stop at ABORT_SIGNAL but at Program_Error one. @@ -154,5 +154,5 @@ gdb_test "continue" \ # Continue, the program should exit properly. gdb_test "continue" \ - "Continuing\\..*$inferior_exited_re.*" \ - "continuing to program completion" + "Continuing\\..*$inferior_exited_re.*" \ + "continuing to program completion" diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp index b67f6d49c06..8f64be3acdc 100644 --- a/gdb/testsuite/gdb.ada/exec_changed.exp +++ b/gdb/testsuite/gdb.ada/exec_changed.exp @@ -56,8 +56,8 @@ if { [gdb_start_cmd] < 0 } { } gdb_test "" \ - "first \\(\\) at .*first.adb.*" \ - "start first" + "first \\(\\) at .*first.adb.*" \ + "start first" # Restore first executable to its original name, and move # second executable into its place. Ensure that the new @@ -78,8 +78,8 @@ if { [gdb_start_cmd] < 0 } { fail "start second" } else { gdb_test "" \ - "second \\(\\) at .*second.adb.*" \ - "start second" + "second \\(\\) at .*second.adb.*" \ + "start second" } # Try again, this time with just changing the file time of first. diff --git a/gdb/testsuite/gdb.ada/expr_delims.exp b/gdb/testsuite/gdb.ada/expr_delims.exp index 83e398a8302..332cc811df2 100644 --- a/gdb/testsuite/gdb.ada/expr_delims.exp +++ b/gdb/testsuite/gdb.ada/expr_delims.exp @@ -36,32 +36,32 @@ gdb_run_cmd gdb_test "" "Breakpoint $decimal, foo \\(\\).*" \ "run to foo" gdb_test "continue" \ - "Continuing\\..*Breakpoint $decimal, foo \\(\\).*" + "Continuing\\..*Breakpoint $decimal, foo \\(\\).*" # Make sure that "thread" may be used as a variable without being mistaken # for an expression delimiter. gdb_test "print thread" \ - "= 1" \ - "print variable 'thread'" + "= 1" \ + "print variable 'thread'" gdb_test_no_output "delete 1" gdb_test "watch thread" \ - ".*atchpoint \[0-9\]+: thread" \ - "set plain watchpoint on variable 'thread'" + ".*atchpoint \[0-9\]+: thread" \ + "set plain watchpoint on variable 'thread'" # Make sure that 'if' when followed by an expression beginning # with 'i' works. gdb_test "watch thread if i = 2" \ - ".*atchpoint \[0-9\]+: thread" \ - "set conditional watchpoint." + ".*atchpoint \[0-9\]+: thread" \ + "set conditional watchpoint." gdb_test "info break" \ - ".*${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}stop only if i = 2" \ - "check that watchpoint is set correctly." + ".*${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}stop only if i = 2" \ + "check that watchpoint is set correctly." # Check for right error when using both 'if' and 'thread' clauses. gdb_test "break foo.adb:$bp_location if thread = 10 thread 999" \ - ".*Unknown thread 999\\." \ - "combination of 'if' and 'thread' delimiters." + ".*Unknown thread 999\\." \ + "combination of 'if' and 'thread' delimiters." diff --git a/gdb/testsuite/gdb.ada/expr_with_funcall/expr_r821_013.adb b/gdb/testsuite/gdb.ada/expr_with_funcall/expr_r821_013.adb index 8df4b1795b3..ba12a536703 100644 --- a/gdb/testsuite/gdb.ada/expr_with_funcall/expr_r821_013.adb +++ b/gdb/testsuite/gdb.ada/expr_with_funcall/expr_r821_013.adb @@ -20,4 +20,3 @@ procedure Expr_R821_013 is begin Do_Nothing (Val'Address); -- STOP end Expr_R821_013; - diff --git a/gdb/testsuite/gdb.ada/fin_fun_out.exp b/gdb/testsuite/gdb.ada/fin_fun_out.exp index fcc7b40f478..d71a31f0ebc 100644 --- a/gdb/testsuite/gdb.ada/fin_fun_out.exp +++ b/gdb/testsuite/gdb.ada/fin_fun_out.exp @@ -33,8 +33,8 @@ runto "bar.f" # to display, depending on the ABI. The objective of the test is # to verify that we don't crash, so keep the expected output simple... gdb_test "finish" \ - ".*Value returned.*" + ".*Value returned.*" # Verify that GDB is still alive... gdb_test "print 1" \ - "= 1" + "= 1" diff --git a/gdb/testsuite/gdb.ada/finish-var-size.exp b/gdb/testsuite/gdb.ada/finish-var-size.exp index 06baad58eb1..7486dcc10c6 100644 --- a/gdb/testsuite/gdb.ada/finish-var-size.exp +++ b/gdb/testsuite/gdb.ada/finish-var-size.exp @@ -40,7 +40,7 @@ set value [string_to_regexp "= (defined => true, payload => true)"] # With some ABIs the return value cannot be determined. Accept this, # or the correct result. gdb_test "finish" \ - "Value returned .*($value|Cannot determine contents)" + "Value returned .*($value|Cannot determine contents)" # Test that an inferior call yields the correct result. gdb_test "print pck.get(True)" $value diff --git a/gdb/testsuite/gdb.ada/fixed_cmp.exp b/gdb/testsuite/gdb.ada/fixed_cmp.exp index 0fe52dcc09e..0385f8ee847 100644 --- a/gdb/testsuite/gdb.ada/fixed_cmp.exp +++ b/gdb/testsuite/gdb.ada/fixed_cmp.exp @@ -32,16 +32,16 @@ foreach_gnat_encoding gnat_encodings flags {all minimal} { runto "fixed.adb:$bp_location" gdb_test "print My_Var > 10.0" \ - "= true" + "= true" gdb_test "print My_Var > 20.0" \ - "= false" + "= false" # Do the same, but with integer values. gdb_test "print My_Var > 10" \ - "= true" + "= true" gdb_test "print My_Var > 20" \ - "= false" + "= false" } diff --git a/gdb/testsuite/gdb.ada/fixed_points/pck.adb b/gdb/testsuite/gdb.ada/fixed_points/pck.adb index 06ff0af5c84..00c95106974 100644 --- a/gdb/testsuite/gdb.ada/fixed_points/pck.adb +++ b/gdb/testsuite/gdb.ada/fixed_points/pck.adb @@ -19,4 +19,3 @@ package body Pck is null; end Do_Nothing; end pck; - diff --git a/gdb/testsuite/gdb.ada/fixed_points/pck.ads b/gdb/testsuite/gdb.ada/fixed_points/pck.ads index 74a8144051c..e292644472a 100644 --- a/gdb/testsuite/gdb.ada/fixed_points/pck.ads +++ b/gdb/testsuite/gdb.ada/fixed_points/pck.ads @@ -36,4 +36,3 @@ package Pck is procedure Do_Nothing (A : System.Address); end pck; - diff --git a/gdb/testsuite/gdb.ada/fixed_points_function.exp b/gdb/testsuite/gdb.ada/fixed_points_function.exp index 3b0c78b1390..2299fd3c098 100644 --- a/gdb/testsuite/gdb.ada/fixed_points_function.exp +++ b/gdb/testsuite/gdb.ada/fixed_points_function.exp @@ -29,10 +29,10 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/fixed_points_function.adb runto "fixed_points_function.adb:$bp_location" gdb_test "print call_fp1(1)" \ - " = 1" + " = 1" gdb_test "print call_fp1(0.5)" \ - " = 0.5" + " = 0.5" gdb_test "print call_fp1(-0.5)" \ - " = -0.5" + " = -0.5" diff --git a/gdb/testsuite/gdb.ada/float_param.exp b/gdb/testsuite/gdb.ada/float_param.exp index 8b5fc4375e4..78384fa56b4 100644 --- a/gdb/testsuite/gdb.ada/float_param.exp +++ b/gdb/testsuite/gdb.ada/float_param.exp @@ -30,14 +30,12 @@ runto "foo.adb:$bp_location" gdb_test_no_output "call set_float(2.0)" gdb_test "print global_float" \ - " = 2\\.0" + " = 2\\.0" gdb_test_no_output "call set_double(1, 3.0)" gdb_test "print global_double" \ - " = 3\\.0" + " = 3\\.0" gdb_test_no_output "call set_long_double(1, global_small_struct, 4.0)" gdb_test "print global_long_double" \ - " = 4\\.0" - - + " = 4\\.0" diff --git a/gdb/testsuite/gdb.ada/formatted_ref.exp b/gdb/testsuite/gdb.ada/formatted_ref.exp index 08e56cee0ef..b1ea6ea4130 100644 --- a/gdb/testsuite/gdb.ada/formatted_ref.exp +++ b/gdb/testsuite/gdb.ada/formatted_ref.exp @@ -41,8 +41,8 @@ proc get_address { var } { gdb_test_multiple "print $var'access" "address of $var" { -re "\\$\[0-9\]+ = \\(.*\\) (0x\[0-9a-f\]+).*$gdb_prompt $" { - return $expect_out(1,string) - } + return $expect_out(1,string) + } } return "" } @@ -52,15 +52,15 @@ proc test_p_x { var val addr } { set test "print/x $var" gdb_test_multiple "$test" $test { - -re "\\$\[0-9\]+ = [string_to_regexp $val].*$gdb_prompt $" { + -re "\\$\[0-9\]+ = [string_to_regexp $val].*$gdb_prompt $" { pass $test } -re "\\$\[0-9\]+ = $addr.*$gdb_prompt $" { - fail "$test (prints just address)" - } + fail "$test (prints just address)" + } -re "\\$\[0-9\]+ = 0x\[a-f0-9\]+.*$gdb_prompt $" { - fail "$test (prints unexpected address)" - } + fail "$test (prints unexpected address)" + } } return 0 } diff --git a/gdb/testsuite/gdb.ada/frame_args.exp b/gdb/testsuite/gdb.ada/frame_args.exp index 9f8badd0276..701a8a1a5f5 100644 --- a/gdb/testsuite/gdb.ada/frame_args.exp +++ b/gdb/testsuite/gdb.ada/frame_args.exp @@ -37,10 +37,8 @@ if {![runto break_me]} { # First, print all the arrays without indexes gdb_test_no_output "set print frame-arguments scalars" \ - "set print frame-arguments scalars" + "set print frame-arguments scalars" gdb_test "frame 1" \ - "#1$sp$any_addr in pck.call_me \\(int=1, flt=2.0, bln=true, ary=\\.\\.\\., chr=106 'j', sad=\\(system.address\\) $any_addr, rec=\\.\\.\\.\\).*" \ - "display frame 1 with frame-arguments set to scalars" - - + "#1$sp$any_addr in pck.call_me \\(int=1, flt=2.0, bln=true, ary=\\.\\.\\., chr=106 'j', sad=\\(system.address\\) $any_addr, rec=\\.\\.\\.\\).*" \ + "display frame 1 with frame-arguments set to scalars" diff --git a/gdb/testsuite/gdb.ada/frame_args/pck.adb b/gdb/testsuite/gdb.ada/frame_args/pck.adb index 3fddae8963b..ba9ebac368f 100644 --- a/gdb/testsuite/gdb.ada/frame_args/pck.adb +++ b/gdb/testsuite/gdb.ada/frame_args/pck.adb @@ -33,4 +33,3 @@ package body Pck is end Call_Me; end Pck; - diff --git a/gdb/testsuite/gdb.ada/frame_args/pck.ads b/gdb/testsuite/gdb.ada/frame_args/pck.ads index abb380c873a..9914553dec1 100644 --- a/gdb/testsuite/gdb.ada/frame_args/pck.ads +++ b/gdb/testsuite/gdb.ada/frame_args/pck.ads @@ -34,4 +34,3 @@ package Pck is Rec : Struct); -- Non scalar end Pck; - diff --git a/gdb/testsuite/gdb.ada/fullname_bp.exp b/gdb/testsuite/gdb.ada/fullname_bp.exp index 7729c63fec7..ae0f7d21683 100644 --- a/gdb/testsuite/gdb.ada/fullname_bp.exp +++ b/gdb/testsuite/gdb.ada/fullname_bp.exp @@ -31,7 +31,7 @@ clean_restart ${testfile} # Break on "pck.hello" rather than just "hello" to make sure we trigger # the non-wild symbol lookup. gdb_test "break pck.hello" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+." + "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+." # Do the same, but this time using a linespec where the user also # provided a filename. @@ -39,7 +39,7 @@ gdb_test "break pck.hello" \ clean_restart ${testfile} gdb_test "break pck.adb:pck.hello" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+." + "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+." # Same scenarios as above, but with a function name that is spelled # with upper-case letters. @@ -47,9 +47,9 @@ gdb_test "break pck.adb:pck.hello" \ clean_restart ${testfile} gdb_test "break Pck.Hello" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+." + "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+." clean_restart ${testfile} gdb_test "break pck.adb:Pck.Hello" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+." + "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+." diff --git a/gdb/testsuite/gdb.ada/fullname_bp/pck.adb b/gdb/testsuite/gdb.ada/fullname_bp/pck.adb index cf218e29811..d2b823c6e3e 100644 --- a/gdb/testsuite/gdb.ada/fullname_bp/pck.adb +++ b/gdb/testsuite/gdb.ada/fullname_bp/pck.adb @@ -31,5 +31,3 @@ package body Pck is null; end There; end Pck; - - diff --git a/gdb/testsuite/gdb.ada/fullname_bp/pck.ads b/gdb/testsuite/gdb.ada/fullname_bp/pck.ads index f2c7f6d88eb..1cfc167d054 100644 --- a/gdb/testsuite/gdb.ada/fullname_bp/pck.ads +++ b/gdb/testsuite/gdb.ada/fullname_bp/pck.ads @@ -19,4 +19,3 @@ package Pck is -- The name of that procedure needs to be greater (in terms -- of alphabetical order) than the name of the procedure above. end Pck; - diff --git a/gdb/testsuite/gdb.ada/fun_addr.exp b/gdb/testsuite/gdb.ada/fun_addr.exp index 2d86fd43fd2..ed22a9d65b7 100644 --- a/gdb/testsuite/gdb.ada/fun_addr.exp +++ b/gdb/testsuite/gdb.ada/fun_addr.exp @@ -29,4 +29,4 @@ clean_restart ${testfile} # the inferior is *not* running (no frame). gdb_test "print foo'address" \ - "= .* 0x\[0-9a-zA-Z\]+ " + "= .* 0x\[0-9a-zA-Z\]+ " diff --git a/gdb/testsuite/gdb.ada/fun_in_declare.exp b/gdb/testsuite/gdb.ada/fun_in_declare.exp index edd231821e6..60f761048de 100644 --- a/gdb/testsuite/gdb.ada/fun_in_declare.exp +++ b/gdb/testsuite/gdb.ada/fun_in_declare.exp @@ -36,10 +36,9 @@ set any_addr "0x\[0-9a-zA-Z\]+" set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] gdb_test "break foo.adb:$bp_location" \ - "Breakpoint $any_nb at $any_addr: file .*foo.adb, line $any_nb." \ - "insert breakpoint inside foo.call_me" + "Breakpoint $any_nb at $any_addr: file .*foo.adb, line $any_nb." \ + "insert breakpoint inside foo.call_me" gdb_test "continue" \ - ".*Breakpoint $any_nb, foo\\.call_me \\(\\) at .*foo.adb:$any_nb.*" \ - "decoding of function name" - + ".*Breakpoint $any_nb, foo\\.call_me \\(\\) at .*foo.adb:$any_nb.*" \ + "decoding of function name" diff --git a/gdb/testsuite/gdb.ada/fun_overload_menu.exp b/gdb/testsuite/gdb.ada/fun_overload_menu.exp index 7bafd09ec04..117f1ffb8cd 100644 --- a/gdb/testsuite/gdb.ada/fun_overload_menu.exp +++ b/gdb/testsuite/gdb.ada/fun_overload_menu.exp @@ -44,17 +44,17 @@ proc test_menu {expr function first second selection output} { "> $"] set test_name "multiple matches for $function {$expr}" gdb_test_multiple "print $expr" "$test_name" { - -re "$menu1" { - pass "$test_name" - } - -re "$menu2" { - pass "$test_name" + -re "$menu1" { + pass "$test_name" + } + -re "$menu2" { + pass "$test_name" # Make sure we pick the correct one. set selection [expr {3 - $selection}] - } - default { - fail "$test_name" - } + } + default { + fail "$test_name" + } } gdb_test "$selection" "$output" } diff --git a/gdb/testsuite/gdb.ada/fun_renaming.exp b/gdb/testsuite/gdb.ada/fun_renaming.exp index 9d84a572cb7..05e0c2926f7 100644 --- a/gdb/testsuite/gdb.ada/fun_renaming.exp +++ b/gdb/testsuite/gdb.ada/fun_renaming.exp @@ -38,48 +38,48 @@ gdb_test "print fun_rename_test_next(1)" " = 2" set test "print fun_rename_test_n(1)" gdb_test_multiple $test $test { -wrap -re " = 2" { - pass $test + pass $test } -wrap -re "No definition of \"fun_rename_test_n\" in current context\\." { if {[gnat_version_compare >= 6]} { - fail $test - } else { - xfail $test - } + fail $test + } else { + xfail $test + } } } set test "print renamed_fun_rename_test_next(1)" gdb_test_multiple $test $test { -wrap -re " = 2" { - pass $test + pass $test } -wrap -re "No definition of \"renamed_fun_rename_test_next\" in current context\\." { if {[gnat_version_compare >= 6]} { - fail $test - } else { - xfail $test - } + fail $test + } else { + xfail $test + } } } set test "print pack.renamed_fun_rename_test_next(1)" gdb_test_multiple $test $test { -wrap -re " = 2" { - pass $test + pass $test } -wrap -re "No definition of \"pack\\.renamed_fun_rename_test_next\" in current context\\." { if {[gnat_version_compare >= 6]} { - fail $test - } else { - xfail $test - } + fail $test + } else { + xfail $test + } } -wrap -re "Type is not a structure or union type\\." { if {[gnat_version_compare >= 6]} { - fail $test - } else { - xfail $test - } + fail $test + } else { + xfail $test + } } } diff --git a/gdb/testsuite/gdb.ada/funcall_param.exp b/gdb/testsuite/gdb.ada/funcall_param.exp index 10e5175a99b..e3e7fe553b2 100644 --- a/gdb/testsuite/gdb.ada/funcall_param.exp +++ b/gdb/testsuite/gdb.ada/funcall_param.exp @@ -32,4 +32,4 @@ runto "foo.adb:$bp_location" # class-wide. gdb_test "p ident (ident (my_parameter))" \ - "= \\(one => 1, two => 2, three => 3\\)" "value of ident" + "= \\(one => 1, two => 2, three => 3\\)" "value of ident" diff --git a/gdb/testsuite/gdb.ada/funcall_ptr.exp b/gdb/testsuite/gdb.ada/funcall_ptr.exp index 8b93c12e4de..f20e9908932 100644 --- a/gdb/testsuite/gdb.ada/funcall_ptr.exp +++ b/gdb/testsuite/gdb.ada/funcall_ptr.exp @@ -29,7 +29,7 @@ set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "print pck.ga" " = \\(access integer\\) 0x0" \ - "Check that initial value of GA is null" + "Check that initial value of GA is null" gdb_test_no_output "call pck.p(0x1234)" @@ -39,4 +39,4 @@ gdb_test_no_output "call pck.p(0x1234)" # procedure hence should be 0x1234 after the call above. gdb_test "print pck.ga" " = \\(access integer\\) 0x1234" \ - "Check that value of GA is 0x1234" + "Check that value of GA is 0x1234" diff --git a/gdb/testsuite/gdb.ada/homonym.exp b/gdb/testsuite/gdb.ada/homonym.exp index ac3c22d4fba..778507c2cbe 100644 --- a/gdb/testsuite/gdb.ada/homonym.exp +++ b/gdb/testsuite/gdb.ada/homonym.exp @@ -51,24 +51,24 @@ runto "homonym.adb:$bp_location" # sure that the debugger doesn't get mixed up. gdb_test "ptype local_type" \ - "type = range -100 \\.\\. 100" \ - "ptype local_type at BREAK_1" + "type = range -100 \\.\\. 100" \ + "ptype local_type at BREAK_1" gdb_test "ptype local_type_subtype" \ - "type = range -100 \\.\\. 100" \ - "ptype local_type_subtype at BREAK_1" + "type = range -100 \\.\\. 100" \ + "ptype local_type_subtype at BREAK_1" gdb_test "ptype int_type" \ - "type = range -100 \\.\\. 100" \ - "ptype int_type at BREAK_1" + "type = range -100 \\.\\. 100" \ + "ptype int_type at BREAK_1" gdb_test "ptype lcl" \ - "type = range -100 \\.\\. 100" \ - "ptype lcl at BREAK_1" + "type = range -100 \\.\\. 100" \ + "ptype lcl at BREAK_1" gdb_test "print lcl" \ - "= 29" \ - "print lcl at BREAK_1" + "= 29" \ + "print lcl at BREAK_1" # Now, continue until reaching BREAK_2, and do the same commands # as above. The result should be different since the definitions @@ -76,25 +76,25 @@ gdb_test "print lcl" \ set bp_location [gdb_get_line_number "BREAK_2" ${testdir}/homonym.adb] gdb_test "break homonym.adb:$bp_location" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: file .*homonym\\.adb, line \[0-9\]+\\." \ - "break at BREAK_2" + "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: file .*homonym\\.adb, line \[0-9\]+\\." \ + "break at BREAK_2" gdb_test "continue" \ - ".*Breakpoint \[0-9\]+, homonym\\.get_value \\(\\) at .*homonym\\.adb:.*" \ - "continue until BREAK_2" + ".*Breakpoint \[0-9\]+, homonym\\.get_value \\(\\) at .*homonym\\.adb:.*" \ + "continue until BREAK_2" gdb_test "ptype local_type" \ - "type = range 1 \\.\\. 19740804" \ - "ptype local_type at BREAK_2" + "type = range 1 \\.\\. 19740804" \ + "ptype local_type at BREAK_2" gdb_test "ptype local_type_subtype" \ - "type = range 1 \\.\\. 19740804" \ - "ptype local_type_subtype at BREAK_2" + "type = range 1 \\.\\. 19740804" \ + "ptype local_type_subtype at BREAK_2" gdb_test "ptype lcl" \ - "type = range 1 \\.\\. 19740804" \ - "ptype lcl at BREAK_2" + "type = range 1 \\.\\. 19740804" \ + "ptype lcl at BREAK_2" gdb_test "print lcl" \ - "= 17" \ - "print lcl at BREAK_2" + "= 17" \ + "print lcl at BREAK_2" diff --git a/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.adb b/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.adb index 656c81e2c37..b73846c8eb6 100644 --- a/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.adb +++ b/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.adb @@ -21,4 +21,3 @@ package body Pck is end Do_Nothing; end Pck; - diff --git a/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.ads b/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.ads index af0c2aa688e..650b0d52b23 100644 --- a/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.ads +++ b/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.ads @@ -32,4 +32,3 @@ package Pck is procedure Do_Nothing (A : System.Address); end Pck; - diff --git a/gdb/testsuite/gdb.ada/info_auto_lang.exp b/gdb/testsuite/gdb.ada/info_auto_lang.exp index ea561e7d801..3520ab4f272 100644 --- a/gdb/testsuite/gdb.ada/info_auto_lang.exp +++ b/gdb/testsuite/gdb.ada/info_auto_lang.exp @@ -160,4 +160,3 @@ foreach_with_prefix language_choice { "auto" "ada" "c" } { } } } - diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp index b3ed9959a28..8d1f06d7b75 100644 --- a/gdb/testsuite/gdb.ada/info_exc.exp +++ b/gdb/testsuite/gdb.ada/info_exc.exp @@ -31,24 +31,24 @@ if {![runto_main]} { gdb_test "info exceptions" \ [multi_line "All defined Ada exceptions:" \ - "constraint_error: $hex" \ - "program_error: $hex" \ - "storage_error: $hex" \ - "tasking_error: $hex" \ - ".*\[\r\n\]*const.aint_global_gdb_e: $hex\[\r\n\]*.*" ] + "constraint_error: $hex" \ + "program_error: $hex" \ + "storage_error: $hex" \ + "tasking_error: $hex" \ + ".*\[\r\n\]*const.aint_global_gdb_e: $hex\[\r\n\]*.*" ] gdb_test "info exceptions task" \ [multi_line "All Ada exceptions matching regular expression \"task\":" \ - "tasking_error: $hex"] + "tasking_error: $hex"] gdb_test "info exceptions global_gdb" \ [multi_line "All Ada exceptions matching regular expression \"global_gdb\":" \ - "const.aint_global_gdb_e: $hex"] + "const.aint_global_gdb_e: $hex"] gdb_test "info exceptions const.aint" \ [multi_line "All Ada exceptions matching regular expression \"const\\.aint\":" \ - "constraint_error: $hex" \ - "const.aint_global_gdb_e: $hex"] + "constraint_error: $hex" \ + "const.aint_global_gdb_e: $hex"] foreach cmd {exception handlers} { gdb_test "complete catch $cmd const.a" \ diff --git a/gdb/testsuite/gdb.ada/info_locals_renaming.exp b/gdb/testsuite/gdb.ada/info_locals_renaming.exp index 9c33e944d90..eb79704a9f4 100644 --- a/gdb/testsuite/gdb.ada/info_locals_renaming.exp +++ b/gdb/testsuite/gdb.ada/info_locals_renaming.exp @@ -29,4 +29,3 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "info locals" "gv = 1" - diff --git a/gdb/testsuite/gdb.ada/info_types.c b/gdb/testsuite/gdb.ada/info_types.c index 34c7447d1d0..6de9100e089 100644 --- a/gdb/testsuite/gdb.ada/info_types.c +++ b/gdb/testsuite/gdb.ada/info_types.c @@ -31,4 +31,3 @@ main (void) do_something(&toto); return 0; } - diff --git a/gdb/testsuite/gdb.ada/info_types.exp b/gdb/testsuite/gdb.ada/info_types.exp index 24d7c8f467d..476c6936321 100644 --- a/gdb/testsuite/gdb.ada/info_types.exp +++ b/gdb/testsuite/gdb.ada/info_types.exp @@ -29,5 +29,4 @@ gdb_test "set lang ada" "" set eol "\r\n" gdb_test "info types new_integer_type" \ - "All types matching regular expression \"new_integer_type\":${eol}${eol}File .*info_types.c:${eol}.*\tint" - + "All types matching regular expression \"new_integer_type\":${eol}${eol}File .*info_types.c:${eol}.*\tint" diff --git a/gdb/testsuite/gdb.ada/int_deref.exp b/gdb/testsuite/gdb.ada/int_deref.exp index c3ecea869ce..7308e787648 100644 --- a/gdb/testsuite/gdb.ada/int_deref.exp +++ b/gdb/testsuite/gdb.ada/int_deref.exp @@ -31,11 +31,10 @@ runto "foo.adb:$bp_location" # Hijack a bit this testcase, to verify that name decoding works # when doing symbolic address printing. gdb_test "print watch'address" \ - " = \\(system\\.address\\) $hex " + " = \\(system\\.address\\) $hex " gdb_test "print *long_integer(watch'address)" \ - " = 4874" + " = 4874" gdb_test "print long_integer(watch'address).all" \ - " = 4874" - + " = 4874" diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp index e038c47d087..b46cf576b51 100644 --- a/gdb/testsuite/gdb.ada/interface.exp +++ b/gdb/testsuite/gdb.ada/interface.exp @@ -31,10 +31,10 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "print r" \ - "= \\(x => 1, y => 2, w => 3, h => 4\\)" + "= \\(x => 1, y => 2, w => 3, h => 4\\)" gdb_test "print s" \ - "= \\(x => 1, y => 2, w => 3, h => 4\\)" + "= \\(x => 1, y => 2, w => 3, h => 4\\)" set r_re "r = \[^\r\n\]*" set s_re "s = \[^\r\n\]*" diff --git a/gdb/testsuite/gdb.ada/interface/foo.adb b/gdb/testsuite/gdb.ada/interface/foo.adb index 0c0da6d7ad9..f28d89ee7b5 100644 --- a/gdb/testsuite/gdb.ada/interface/foo.adb +++ b/gdb/testsuite/gdb.ada/interface/foo.adb @@ -22,4 +22,3 @@ begin Do_Nothing (R); -- STOP Do_Nothing (S); end Foo; - diff --git a/gdb/testsuite/gdb.ada/interface/types.adb b/gdb/testsuite/gdb.ada/interface/types.adb index 43d54e146ff..f967d846f26 100644 --- a/gdb/testsuite/gdb.ada/interface/types.adb +++ b/gdb/testsuite/gdb.ada/interface/types.adb @@ -26,4 +26,3 @@ package body Types is end Do_Nothing; end Types; - diff --git a/gdb/testsuite/gdb.ada/interface/types.ads b/gdb/testsuite/gdb.ada/interface/types.ads index e0fdabab217..e7a46b2cb20 100644 --- a/gdb/testsuite/gdb.ada/interface/types.ads +++ b/gdb/testsuite/gdb.ada/interface/types.ads @@ -39,4 +39,3 @@ package Types is end record; end Types; - diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp index a2a049f7f2e..3029f8978c4 100644 --- a/gdb/testsuite/gdb.ada/iwide.exp +++ b/gdb/testsuite/gdb.ada/iwide.exp @@ -52,16 +52,16 @@ gdb_test_multiple "" "Runto to $bp_location" { } gdb_test "print My_Drawable" \ - "= \\(center => \\(x => 1, y => 2\\), radius => 3\\)" + "= \\(center => \\(x => 1, y => 2\\), radius => 3\\)" gdb_test "print s_access.all" \ - "\\(center => \\(x => 1, y => 2\\), radius => 3\\)" + "\\(center => \\(x => 1, y => 2\\), radius => 3\\)" gdb_test "print sp_access.all" \ - "\\(center => \\(x => 1, y => 2\\), radius => 3\\)" + "\\(center => \\(x => 1, y => 2\\), radius => 3\\)" gdb_test "print d_access.all" \ - "\\(center => \\(x => 1, y => 2\\), radius => 3\\)" + "\\(center => \\(x => 1, y => 2\\), radius => 3\\)" gdb_test "print dp_access.all" \ - "\\(center => \\(x => 1, y => 2\\), radius => 3\\)" + "\\(center => \\(x => 1, y => 2\\), radius => 3\\)" diff --git a/gdb/testsuite/gdb.ada/lang_switch.exp b/gdb/testsuite/gdb.ada/lang_switch.exp index 70f5d0ba799..7f40c29ec5d 100644 --- a/gdb/testsuite/gdb.ada/lang_switch.exp +++ b/gdb/testsuite/gdb.ada/lang_switch.exp @@ -37,8 +37,8 @@ gdb_test_no_output "set print frame-arguments all" # Make sure that the language is switched to Ada for the second frame # by checking the string parameter. gdb_test "bt" \ - ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=\"msg\"\\).*" \ - "backtrace" + ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=\"msg\"\\).*" \ + "backtrace" # Now, make sure that the language doesn't get automatically switched # if the current language is not "auto". @@ -47,5 +47,5 @@ gdb_test "set lang c" # -fgnat-encodings=all, but since we don't care so much about the # precise details here, we just accept anything. gdb_test "bt" \ - ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=(@$hex: +)?.*\\).*" \ - "backtrace with lang set to C" + ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=(@$hex: +)?.*\\).*" \ + "backtrace with lang set to C" diff --git a/gdb/testsuite/gdb.ada/limited-length/foo.adb b/gdb/testsuite/gdb.ada/limited-length/foo.adb index b269ce2d1d8..c7e78e51629 100644 --- a/gdb/testsuite/gdb.ada/limited-length/foo.adb +++ b/gdb/testsuite/gdb.ada/limited-length/foo.adb @@ -34,4 +34,3 @@ begin Do_Nothing (Large_1d_Array'Address); Do_Nothing (Large_3d_Array'Address); -- STOP end Foo; - diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert.exp b/gdb/testsuite/gdb.ada/mi_catch_assert.exp index d011ca58da2..eb5ffec909a 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_assert.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_assert.exp @@ -43,15 +43,15 @@ if {[mi_runto_main] < 0} { } mi_gdb_test "-catch-assert -c \"Global_Var = 2\"" \ - "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*,cond=\"Global_Var = 2\",.*}" \ - "catch assert failures with condition" + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*,cond=\"Global_Var = 2\",.*}" \ + "catch assert failures with condition" set bp_location [gdb_get_line_number "STOP" ${testdir}/bla.adb] mi_execute_to "exec-continue" \ - "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\"" \ - "bla" "" ".*" "$bp_location" \ - ".*" \ - "continue to assert failure catchpoint hit" + "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\"" \ + "bla" "" ".*" "$bp_location" \ + ".*" \ + "continue to assert failure catchpoint hit" # Exit the inferior. mi_send_resuming_command "exec-continue" "continuing to inferior exit" diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert/pck.ads b/gdb/testsuite/gdb.ada/mi_catch_assert/pck.ads index 62409d58d13..3f48421e8e1 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_assert/pck.ads +++ b/gdb/testsuite/gdb.ada/mi_catch_assert/pck.ads @@ -16,4 +16,3 @@ package Pck is Global_Var : Integer := 0; end Pck; - diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp index 974da0d72c9..d1bd9ed645b 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp @@ -43,8 +43,8 @@ with_test_prefix "scenario 1" { } mi_gdb_test "-catch-exception" \ - "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions\",.*}" \ - "catch all exceptions" + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions\",.*}" \ + "catch all exceptions" # Continue to caught exception. @@ -101,32 +101,31 @@ with_test_prefix "scenario 2" { } mi_gdb_test "-catch-exception -e Program_Error" \ - "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Program_Error' Ada exception\",.*}" \ - "catch Program_Error" + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Program_Error' Ada exception\",.*}" \ + "catch Program_Error" mi_gdb_test "-catch-assert" \ - "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*}" \ - "catch assert failures" + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*}" \ + "catch assert failures" mi_gdb_test "-catch-exception -u" \ - "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"unhandled Ada exceptions\",.*}" \ - "catch unhandled exceptions" + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"unhandled Ada exceptions\",.*}" \ + "catch unhandled exceptions" mi_execute_to "exec-continue" \ - "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"PROGRAM_ERROR(\",exception-message=\"foo\\.adb:$decimal explicit raise)?\"" \ - "foo" "" ".*" ".*" \ - ".*" \ - "continue to exception catchpoint hit" + "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"PROGRAM_ERROR(\",exception-message=\"foo\\.adb:$decimal explicit raise)?\"" \ + "foo" "" ".*" ".*" \ + ".*" \ + "continue to exception catchpoint hit" mi_execute_to "exec-continue" \ - "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\"" \ - "foo" "" ".*" ".*" \ - ".*" \ - "continue to assert failure catchpoint hit" + "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\"" \ + "foo" "" ".*" ".*" \ + ".*" \ + "continue to assert failure catchpoint hit" mi_execute_to "exec-continue" \ - "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"CONSTRAINT_ERROR\"" \ - "foo" "" ".*" ".*" \ - ".*" \ - "continue to unhandled exception catchpoint hit" - + "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"CONSTRAINT_ERROR\"" \ + "foo" "" ".*" ".*" \ + ".*" \ + "continue to unhandled exception catchpoint hit" diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp index f853f6bb561..330079594ea 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp @@ -39,8 +39,8 @@ with_test_prefix "scenario 1" { } mi_gdb_test "-catch-handlers" \ - "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions handlers\",.*}" \ - "catch all exceptions handlers" + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions handlers\",.*}" \ + "catch all exceptions handlers" # Continue to exception handler. @@ -55,7 +55,7 @@ proc continue_to_exception_handler { test line } { "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\",exception-name=\"exception\"" \ "foo" "" ".*" "$line" \ ".*" \ - $test + $test } # We don't have the exception name info when stopping at the exception handlers @@ -91,14 +91,14 @@ with_test_prefix "scenario 2" { } mi_gdb_test "-catch-handlers -e Constraint_Error" \ - "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Constraint_Error' Ada exception handlers\",.*}" \ - "catch Constraint_Error" + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Constraint_Error' Ada exception handlers\",.*}" \ + "catch Constraint_Error" mi_execute_to "exec-continue" \ - "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\",exception-name=\"exception\"" \ - "foo" "" ".*" "$bp_ce_location" \ - ".*" \ - "continue to exception catchpoint hit" + "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\",exception-name=\"exception\"" \ + "foo" "" ".*" "$bp_ce_location" \ + ".*" \ + "continue to exception catchpoint hit" # Exit the inferior. mi_send_resuming_command "exec-continue" "continuing to inferior exit" diff --git a/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb b/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb index f56a0d3898e..c141fe5bcac 100644 --- a/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb +++ b/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb @@ -21,4 +21,3 @@ procedure Foo is begin Do_Nothing (BT'Address); -- STOP end Foo; - diff --git a/gdb/testsuite/gdb.ada/mi_ex_cond.exp b/gdb/testsuite/gdb.ada/mi_ex_cond.exp index 51bea38998f..c8ab2604756 100644 --- a/gdb/testsuite/gdb.ada/mi_ex_cond.exp +++ b/gdb/testsuite/gdb.ada/mi_ex_cond.exp @@ -38,8 +38,8 @@ if {[mi_clean_restart $::testfile]} { # catchpoint that uses both conditions and exception name. mi_gdb_test "-catch-exception -c \"i = 2\" -e constraint_error" \ - "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`constraint_error' Ada exception\",.*,cond=\"i = 2\",.*}" \ - "catch C_E if i = 2" + "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`constraint_error' Ada exception\",.*,cond=\"i = 2\",.*}" \ + "catch C_E if i = 2" # It is important that we start the program's execution after having # inserted the exception catchpoint above. We want to verify that diff --git a/gdb/testsuite/gdb.ada/mi_exc_info.exp b/gdb/testsuite/gdb.ada/mi_exc_info.exp index 5358fcfa92d..49507510053 100644 --- a/gdb/testsuite/gdb.ada/mi_exc_info.exp +++ b/gdb/testsuite/gdb.ada/mi_exc_info.exp @@ -51,4 +51,3 @@ mi_gdb_test "-info-ada-exceptions global_gdb" \ mi_gdb_test "-info-ada-exceptions const.aint" \ "\\^done,ada-exceptions={nr_rows=\"2\",nr_cols=\"2\",hdr=\\\[{width=\"1\",alignment=\"-1\",col_name=\"name\",colhdr=\"Name\"},{width=\"1\",alignment=\"-1\",col_name=\"address\",colhdr=\"Address\"}\\\],body=\\\[{name=\"constraint_error\",address=\"$hex\"},{name=\"const.aint_global_gdb_e\",address=\"$hex\"}\\\]}" \ "-info-ada-exceptions const.aint" - diff --git a/gdb/testsuite/gdb.ada/mi_task_info.exp b/gdb/testsuite/gdb.ada/mi_task_info.exp index 3b1a37e306a..efa437adf3b 100644 --- a/gdb/testsuite/gdb.ada/mi_task_info.exp +++ b/gdb/testsuite/gdb.ada/mi_task_info.exp @@ -56,4 +56,3 @@ mi_gdb_test "-ada-task-info" \ mi_gdb_test "-ada-task-info 3" \ "\\^done,tasks={nr_rows=\"1\",nr_cols=\"8\",$ada_task_info_hdr,body=\\\[$task_3\\\]}" \ "-ada-task-info 3" - diff --git a/gdb/testsuite/gdb.ada/minsyms.exp b/gdb/testsuite/gdb.ada/minsyms.exp index 2d77f6b7bed..a66b271479d 100644 --- a/gdb/testsuite/gdb.ada/minsyms.exp +++ b/gdb/testsuite/gdb.ada/minsyms.exp @@ -32,13 +32,13 @@ if {![runto "_ada_foo_qb07_057"]} { gdb_test_no_output "set language ada" gdb_test "print some_minsym" \ - "'some_minsym' has unknown type; cast it to its declared type" + "'some_minsym' has unknown type; cast it to its declared type" gdb_test "print integer(some_minsym)" \ - " = 1234" + " = 1234" gdb_test "print &some_minsym" \ - " = \\(access \\) $hex " + " = \\(access \\) $hex " gdb_test "print /x integer(&some_minsym)" \ - " = $hex" + " = $hex" diff --git a/gdb/testsuite/gdb.ada/mod_from_name/foo.adb b/gdb/testsuite/gdb.ada/mod_from_name/foo.adb index a8d70d3164a..8cb3c38e940 100644 --- a/gdb/testsuite/gdb.ada/mod_from_name/foo.adb +++ b/gdb/testsuite/gdb.ada/mod_from_name/foo.adb @@ -33,4 +33,3 @@ procedure Foo is begin Slice (4) := 4; -- START end Foo; - diff --git a/gdb/testsuite/gdb.ada/n_arr_bound.exp b/gdb/testsuite/gdb.ada/n_arr_bound.exp index 3df5747c71e..d4762231856 100644 --- a/gdb/testsuite/gdb.ada/n_arr_bound.exp +++ b/gdb/testsuite/gdb.ada/n_arr_bound.exp @@ -29,4 +29,4 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "ptype var" \ - "= array \\(0 .. -1\\) of integer" + "= array \\(0 .. -1\\) of integer" diff --git a/gdb/testsuite/gdb.ada/nested.exp b/gdb/testsuite/gdb.ada/nested.exp index 3e91e688d9e..336f69ecd34 100644 --- a/gdb/testsuite/gdb.ada/nested.exp +++ b/gdb/testsuite/gdb.ada/nested.exp @@ -31,8 +31,8 @@ set any_addr "0x\[0-9a-zA-Z\]+" # Try breaking on a nested function. gdb_test "break first" \ - "Breakpoint $any_nb at $any_addr: file .*hello.adb, line $any_nb." \ - "break on nested function First" + "Breakpoint $any_nb at $any_addr: file .*hello.adb, line $any_nb." \ + "break on nested function First" gdb_test "break fourth" \ "Breakpoint $any_nb at $any_addr: file .*hello.adb, line $any_nb." \ diff --git a/gdb/testsuite/gdb.ada/notcplusplus.exp b/gdb/testsuite/gdb.ada/notcplusplus.exp index 8f69a6cfa06..bfd7b01d96f 100644 --- a/gdb/testsuite/gdb.ada/notcplusplus.exp +++ b/gdb/testsuite/gdb.ada/notcplusplus.exp @@ -26,20 +26,20 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} { clean_restart ${testfile} gdb_test "print /x " \ - "= \\(a => 0x60287af\\)" \ - "print before loading symbols from ver.ads" + "= \\(a => 0x60287af\\)" \ + "print before loading symbols from ver.ads" # Force the partial symbosl from ver.ads to be expanded into full symbols. gdb_test \ "list ver.ads:16" \ [multi_line ".*" \ - "16\\s+package Ver is" \ - "17\\s+type Wrapper is record" \ - "18\\s+A : Integer;" \ - "19\\s+end record;" \ - "20\\s+u00045 : constant Wrapper := \\(A => 16#060287af#\\);"] + "16\\s+package Ver is" \ + "17\\s+type Wrapper is record" \ + "18\\s+A : Integer;" \ + "19\\s+end record;" \ + "20\\s+u00045 : constant Wrapper := \\(A => 16#060287af#\\);"] gdb_test "print /x " \ - "= \\(a => 0x60287af\\)" \ - "print after loading symbols from ver.ads" + "= \\(a => 0x60287af\\)" \ + "print after loading symbols from ver.ads" diff --git a/gdb/testsuite/gdb.ada/null_array.exp b/gdb/testsuite/gdb.ada/null_array.exp index 04ef5738040..dd2c6fd9782 100644 --- a/gdb/testsuite/gdb.ada/null_array.exp +++ b/gdb/testsuite/gdb.ada/null_array.exp @@ -33,10 +33,10 @@ if {[gnat_version_compare <= {4 4}]} { setup_xfail *-*-* } gdb_test "print my_table" \ - "= \\(\\)" + "= \\(\\)" gdb_test "ptype my_table" \ - "type = array \\(10 \\.\\. 1\\) of integer" + "type = array \\(10 \\.\\. 1\\) of integer" gdb_test "print my_matrix" \ - "= \\(m => \\((\"\", ){9}\"\"\\)\\)" + "= \\(m => \\((\"\", ){9}\"\"\\)\\)" diff --git a/gdb/testsuite/gdb.ada/null_record.exp b/gdb/testsuite/gdb.ada/null_record.exp index c9a5f4f58a5..e742ad1f156 100644 --- a/gdb/testsuite/gdb.ada/null_record.exp +++ b/gdb/testsuite/gdb.ada/null_record.exp @@ -29,5 +29,5 @@ set bp_location [gdb_get_line_number "START" ${testdir}/null_record.adb] runto "null_record.adb:$bp_location" gdb_test "ptype empty" \ - "type = record null; end record" \ - "ptype on null record" + "type = record null; end record" \ + "ptype on null record" diff --git a/gdb/testsuite/gdb.ada/null_record/null_record.adb b/gdb/testsuite/gdb.ada/null_record/null_record.adb index 07bf4d974c1..919b075ccb6 100644 --- a/gdb/testsuite/gdb.ada/null_record/null_record.adb +++ b/gdb/testsuite/gdb.ada/null_record/null_record.adb @@ -20,4 +20,3 @@ procedure Null_Record is begin Do_Nothing (E); -- START end Null_Record; - diff --git a/gdb/testsuite/gdb.ada/operator_bp.exp b/gdb/testsuite/gdb.ada/operator_bp.exp index 1bc3d271c28..45d13102704 100644 --- a/gdb/testsuite/gdb.ada/operator_bp.exp +++ b/gdb/testsuite/gdb.ada/operator_bp.exp @@ -56,8 +56,8 @@ foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" foreach op { "+" "-" "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} { set op_re [string_to_regexp $op] gdb_test "continue" \ - "Breakpoint $bkptno_numopt_re, ops\\.\"$op_re\" .*"\ - "continue to \"$op\"" + "Breakpoint $bkptno_numopt_re, ops\\.\"$op_re\" .*"\ + "continue to \"$op\"" } # Perform the same test, but using the qualified name of the operator, @@ -72,13 +72,13 @@ runto "ops_test.adb:$bp_location" foreach op { "+" "-" } { set op_re [string_to_regexp $op] gdb_test "break ops.\"$op\"" \ - "Breakpoint $decimal at $hex: ops\\.\"$op_re\"\\. \\(2 locations\\)" + "Breakpoint $decimal at $hex: ops\\.\"$op_re\"\\. \\(2 locations\\)" } foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} { set op_re [string_to_regexp $op] gdb_test "break ops.\"$op\"" \ - "Breakpoint $decimal at $hex: file .*ops.adb, line $decimal." + "Breakpoint $decimal at $hex: file .*ops.adb, line $decimal." } # Make sure we stop correctly in each operator function. @@ -86,8 +86,6 @@ foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" foreach op { "+" "-" "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} { set op_re [string_to_regexp $op] gdb_test "continue" \ - "Breakpoint $bkptno_numopt_re, ops\\.\"$op_re\" .*"\ - "continue to ops.\"$op\"" + "Breakpoint $bkptno_numopt_re, ops\\.\"$op_re\" .*"\ + "continue to ops.\"$op\"" } - - diff --git a/gdb/testsuite/gdb.ada/operator_bp/ops.adb b/gdb/testsuite/gdb.ada/operator_bp/ops.adb index 412824f59e7..7de82eb5b7b 100644 --- a/gdb/testsuite/gdb.ada/operator_bp/ops.adb +++ b/gdb/testsuite/gdb.ada/operator_bp/ops.adb @@ -135,6 +135,3 @@ package body Ops is end Dummy; end Ops; - - - diff --git a/gdb/testsuite/gdb.ada/operator_bp/ops.ads b/gdb/testsuite/gdb.ada/operator_bp/ops.ads index a5ca7eb51ce..d9f2b8c62ec 100644 --- a/gdb/testsuite/gdb.ada/operator_bp/ops.ads +++ b/gdb/testsuite/gdb.ada/operator_bp/ops.ads @@ -48,5 +48,3 @@ private type Int is new IntRep; end Ops; - - diff --git a/gdb/testsuite/gdb.ada/optim_drec.exp b/gdb/testsuite/gdb.ada/optim_drec.exp index 6256baae240..b4492d8ae67 100644 --- a/gdb/testsuite/gdb.ada/optim_drec.exp +++ b/gdb/testsuite/gdb.ada/optim_drec.exp @@ -30,6 +30,4 @@ if {![runto "foo"]} { } gdb_test "print z" \ - "= (\\(a => .*, b => .*, c => .*\\)|)" - - + "= (\\(a => .*, b => .*, c => .*\\)|)" diff --git a/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb b/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb index 3d5aaa20d7a..2f36424d3ff 100644 --- a/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb +++ b/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb @@ -21,4 +21,3 @@ procedure Foo is begin Do_Nothing (A2'Address); -- STOP end Foo; - diff --git a/gdb/testsuite/gdb.ada/pckd_neg.exp b/gdb/testsuite/gdb.ada/pckd_neg.exp index 3319bb1938a..5e5af3d6bdb 100644 --- a/gdb/testsuite/gdb.ada/pckd_neg.exp +++ b/gdb/testsuite/gdb.ada/pckd_neg.exp @@ -29,16 +29,16 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo_o508_021.adb] runto "foo_o508_021.adb:$bp_location" gdb_test "print SSA" \ - "= \\(-1, 2, -3, 4\\)" + "= \\(-1, 2, -3, 4\\)" gdb_test "print SSA(1)" \ - "= -1" + "= -1" gdb_test "print SSA(2)" \ - "= 2" + "= 2" gdb_test "print SSA(3)" \ - "= -3" + "= -3" gdb_test "print SSA(4)" \ - "= 4" + "= 4" diff --git a/gdb/testsuite/gdb.ada/pkd_arr_elem.exp b/gdb/testsuite/gdb.ada/pkd_arr_elem.exp index d589e888205..ed80f43c491 100644 --- a/gdb/testsuite/gdb.ada/pkd_arr_elem.exp +++ b/gdb/testsuite/gdb.ada/pkd_arr_elem.exp @@ -64,7 +64,7 @@ gdb_test_multiple "$test" $test { } gdb_test "print test.str" \ - "= \\(33 'A', nul \\)" + "= \\(33 'A', nul \\)" gdb_test "print test.str(1)" \ - "= 33 'A'" + "= 33 'A'" diff --git a/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb b/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb index 8ccb94d17dc..2973526cf2f 100644 --- a/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb +++ b/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb @@ -42,4 +42,3 @@ begin Test.Length := 1; Do_Nothing (Test'Address); -- START end; - diff --git a/gdb/testsuite/gdb.ada/pp-rec-component.exp b/gdb/testsuite/gdb.ada/pp-rec-component.exp index 30e362cdd8c..255d353a85f 100644 --- a/gdb/testsuite/gdb.ada/pp-rec-component.exp +++ b/gdb/testsuite/gdb.ada/pp-rec-component.exp @@ -34,7 +34,7 @@ set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "print before" \ - " = Thu Nov 14 02:22:23 2013 \\(1384395743\\)" + " = Thu Nov 14 02:22:23 2013 \\(1384395743\\)" gdb_test "print /r before" \ - " = \\(secs => 1384395743\\)" + " = \\(secs => 1384395743\\)" diff --git a/gdb/testsuite/gdb.ada/print_chars.exp b/gdb/testsuite/gdb.ada/print_chars.exp index b487772cc01..f3af8941c1f 100644 --- a/gdb/testsuite/gdb.ada/print_chars.exp +++ b/gdb/testsuite/gdb.ada/print_chars.exp @@ -30,12 +30,12 @@ runto "foo.adb:$bp_location" gdb_test "print C" \ - "= 97 'a'" + "= 97 'a'" gdb_test "print WC" \ - "= 98 'b'" + "= 98 'b'" gdb_test "print WWC" \ - "= 99 'c'" + "= 99 'c'" gdb_test "print MC" " = 77 'M'" diff --git a/gdb/testsuite/gdb.ada/print_pc.exp b/gdb/testsuite/gdb.ada/print_pc.exp index 8b2043cab66..6a98097ecdf 100644 --- a/gdb/testsuite/gdb.ada/print_pc.exp +++ b/gdb/testsuite/gdb.ada/print_pc.exp @@ -29,4 +29,4 @@ set bp_location [gdb_get_line_number "START" ${testdir}/dummy.adb] runto "dummy.adb:$bp_location" gdb_test "p /x \$pc" \ - "= 0x\[0-9a-zA-Z\]+" + "= 0x\[0-9a-zA-Z\]+" diff --git a/gdb/testsuite/gdb.ada/ptr_typedef.exp b/gdb/testsuite/gdb.ada/ptr_typedef.exp index 7bed41c3f7f..854e1b93fe8 100644 --- a/gdb/testsuite/gdb.ada/ptr_typedef.exp +++ b/gdb/testsuite/gdb.ada/ptr_typedef.exp @@ -29,5 +29,3 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "print my_blob.bees(1)" "= \\(access boolean\\) 0x0" - - diff --git a/gdb/testsuite/gdb.ada/ptype_arith_binop.exp b/gdb/testsuite/gdb.ada/ptype_arith_binop.exp index b4f6ee5907b..b3414a45508 100644 --- a/gdb/testsuite/gdb.ada/ptype_arith_binop.exp +++ b/gdb/testsuite/gdb.ada/ptype_arith_binop.exp @@ -18,10 +18,10 @@ require allow_ada_tests clean_restart gdb_test_no_output "set lang ada" \ - "set lang ada" + "set lang ada" gdb_test "ptype 3 * 2.0" \ - "= <\[0-9\]+-byte float>" + "= <\[0-9\]+-byte float>" gdb_test "ptype 3 / 2.0" \ - "= <\[0-9\]+-byte float>" + "= <\[0-9\]+-byte float>" diff --git a/gdb/testsuite/gdb.ada/ptype_array/pck.adb b/gdb/testsuite/gdb.ada/ptype_array/pck.adb index d44600abd3b..34162db7b19 100644 --- a/gdb/testsuite/gdb.ada/ptype_array/pck.adb +++ b/gdb/testsuite/gdb.ada/ptype_array/pck.adb @@ -19,5 +19,3 @@ package body Pck is null; end Do_Nothing; end Pck; - - diff --git a/gdb/testsuite/gdb.ada/ptype_field.exp b/gdb/testsuite/gdb.ada/ptype_field.exp index 16e5e1d6654..03cae87acb7 100644 --- a/gdb/testsuite/gdb.ada/ptype_field.exp +++ b/gdb/testsuite/gdb.ada/ptype_field.exp @@ -29,19 +29,19 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "ptype circle" \ - [multi_line "type = record" \ - " pos: pck\\.position;" \ - " radius: integer;" \ - "end record" ] + [multi_line "type = record" \ + " pos: pck\\.position;" \ + " radius: integer;" \ + "end record" ] gdb_test "ptype circle.pos" \ - [multi_line "type = record" \ - " x: integer;" \ - " y: integer;" \ - "end record" ] + [multi_line "type = record" \ + " x: integer;" \ + " y: integer;" \ + "end record" ] gdb_test "ptype circle.pos.x" \ - "type = <\[0-9\]+-byte integer>" + "type = <\[0-9\]+-byte integer>" gdb_test "complete print my_circ" "print my_circle" gdb_test "complete print my_circle.r" "print my_circle\\.radius" diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb b/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb index a760e0499b8..95f041a091d 100644 --- a/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb +++ b/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb @@ -27,4 +27,3 @@ package body Pck is end Area; end Pck; - diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads b/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads index 2dd627e0466..a4c3ea0717e 100644 --- a/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads +++ b/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads @@ -26,4 +26,3 @@ package Pck is function Area (C : in Circle) return Integer; end Pck; - diff --git a/gdb/testsuite/gdb.ada/py_range.exp b/gdb/testsuite/gdb.ada/py_range.exp index 237cf46543c..5e48c747e3b 100644 --- a/gdb/testsuite/gdb.ada/py_range.exp +++ b/gdb/testsuite/gdb.ada/py_range.exp @@ -30,13 +30,13 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "python print(int(gdb.parse_and_eval('sr')))" \ - "48" + "48" gdb_test "python print(int(gdb.parse_and_eval('si')))" \ - "740804" + "740804" gdb_test "python print(int(gdb.parse_and_eval('ir')))" \ - "974" + "974" # Accept "foo." prefix for older versions of GNAT. gdb_test "python print(gdb.parse_and_eval('si').type)" \ diff --git a/gdb/testsuite/gdb.ada/rdv_wait.exp b/gdb/testsuite/gdb.ada/rdv_wait.exp index d6d446ec0d4..479f6107ec3 100644 --- a/gdb/testsuite/gdb.ada/rdv_wait.exp +++ b/gdb/testsuite/gdb.ada/rdv_wait.exp @@ -33,8 +33,8 @@ runto "break_me" # Switch to task 2, and verify that GDB is able to unwind all the way # to foo.T. gdb_test "task 2" \ - [join {"\\\[Switching to task 2 \"mit\"\\\].*" \ - ".*foo\\.t \\(.*\\).*foo\\.adb:.*"} ""] + [join {"\\\[Switching to task 2 \"mit\"\\\].*" \ + ".*foo\\.t \\(.*\\).*foo\\.adb:.*"} ""] gdb_test "task apply 1 -q frame" ".*pck\\.break_me.*" diff --git a/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb b/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb index faffcf1c1b2..d5ddfe56474 100644 --- a/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb +++ b/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb @@ -29,4 +29,3 @@ begin Do_Nothing (R'Address); Do_Nothing (IA'Address); end Bar_O203_012; - diff --git a/gdb/testsuite/gdb.ada/rec_return.exp b/gdb/testsuite/gdb.ada/rec_return.exp index dd94441365c..3bba420583f 100644 --- a/gdb/testsuite/gdb.ada/rec_return.exp +++ b/gdb/testsuite/gdb.ada/rec_return.exp @@ -31,4 +31,4 @@ if {![runto "foo.adb:$bp_location"]} { } gdb_test "print bar" \ - "= \\(x => 42, s => \"ABCDEFGH\"\\)" + "= \\(x => 42, s => \"ABCDEFGH\"\\)" diff --git a/gdb/testsuite/gdb.ada/rec_return/foo.adb b/gdb/testsuite/gdb.ada/rec_return/foo.adb index df93dd57fd0..c404115605a 100644 --- a/gdb/testsuite/gdb.ada/rec_return/foo.adb +++ b/gdb/testsuite/gdb.ada/rec_return/foo.adb @@ -21,4 +21,3 @@ begin Q := Bar; -- STOP HERE Do_Nothing (Q'Address); end Foo; - diff --git a/gdb/testsuite/gdb.ada/rec_return/pck.adb b/gdb/testsuite/gdb.ada/rec_return/pck.adb index 1bfdb6c0bd8..675f46e25d6 100644 --- a/gdb/testsuite/gdb.ada/rec_return/pck.adb +++ b/gdb/testsuite/gdb.ada/rec_return/pck.adb @@ -24,4 +24,3 @@ package body Pck is null; end Do_Nothing; end Pck; - diff --git a/gdb/testsuite/gdb.ada/rec_return/pck.ads b/gdb/testsuite/gdb.ada/rec_return/pck.ads index e95fe2c2acd..880a172cd13 100644 --- a/gdb/testsuite/gdb.ada/rec_return/pck.ads +++ b/gdb/testsuite/gdb.ada/rec_return/pck.ads @@ -25,4 +25,3 @@ package Pck is procedure Do_Nothing (A : System.Address); end Pck; - diff --git a/gdb/testsuite/gdb.ada/ref_param.exp b/gdb/testsuite/gdb.ada/ref_param.exp index b9c0eb9009c..e3262988082 100644 --- a/gdb/testsuite/gdb.ada/ref_param.exp +++ b/gdb/testsuite/gdb.ada/ref_param.exp @@ -33,6 +33,5 @@ gdb_test_no_output "set print frame-arguments all" set expected_d "\\(one => 1, two => 2, three => 3, four => 4, five => 5, six => 6\\)" gdb_test "frame" \ - "#0\[ \t\]*pck\\.call_me \\(d=${expected_d}\\).*" \ - "frame argument value printed" - + "#0\[ \t\]*pck\\.call_me \\(d=${expected_d}\\).*" \ + "frame argument value printed" diff --git a/gdb/testsuite/gdb.ada/ref_tick_size.exp b/gdb/testsuite/gdb.ada/ref_tick_size.exp index 18b63eff4e6..c39c216b1c2 100644 --- a/gdb/testsuite/gdb.ada/ref_tick_size.exp +++ b/gdb/testsuite/gdb.ada/ref_tick_size.exp @@ -34,4 +34,4 @@ runto "p.adb:$bp_location" # the size of d1. gdb_test "print d1'size = d2'size" \ - "= true" + "= true" diff --git a/gdb/testsuite/gdb.ada/ref_tick_size/p.adb b/gdb/testsuite/gdb.ada/ref_tick_size/p.adb index 88b11925397..6cd4a07b8b3 100644 --- a/gdb/testsuite/gdb.ada/ref_tick_size/p.adb +++ b/gdb/testsuite/gdb.ada/ref_tick_size/p.adb @@ -26,4 +26,3 @@ begin Do_Nothing (D1'Address); -- START Do_Nothing (D2'Address); end P; - diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param.exp b/gdb/testsuite/gdb.ada/rename_subscript_param.exp index 73e58b40c1e..5e762f5f2ec 100644 --- a/gdb/testsuite/gdb.ada/rename_subscript_param.exp +++ b/gdb/testsuite/gdb.ada/rename_subscript_param.exp @@ -31,18 +31,18 @@ set bp_location [gdb_get_line_number "BREAK" ${testdir}/pkg.adb] runto "pkg.adb:$bp_location" gdb_test "print rename_subscript_param_b" \ - " = false" \ - "print rename_subscript_param_b before changing its value" + " = false" \ + "print rename_subscript_param_b before changing its value" set bp_location [gdb_get_line_number "Do_Nothing" ${testdir}/pkg.adb] gdb_test "break pkg.adb:$bp_location" \ - "Breakpoint \[0-9\]+ at.*: file .*pkg.adb, line \[0-9\]+." \ - "insert second breakpoint in pkg.adb" + "Breakpoint \[0-9\]+ at.*: file .*pkg.adb, line \[0-9\]+." \ + "insert second breakpoint in pkg.adb" gdb_test "cont" \ - "Breakpoint \[0-9\]+, pkg.flip \\(.*" \ - "Continuing to breakpoint on call to Do_Nothing" + "Breakpoint \[0-9\]+, pkg.flip \\(.*" \ + "Continuing to breakpoint on call to Do_Nothing" gdb_test "print rename_subscript_param_b" \ - " = true" \ - "print rename_subscript_param_b after changing its value" + " = true" \ + "print rename_subscript_param_b after changing its value" diff --git a/gdb/testsuite/gdb.ada/repeat_dyn.exp b/gdb/testsuite/gdb.ada/repeat_dyn.exp index fb1ecbbd743..a866e175714 100644 --- a/gdb/testsuite/gdb.ada/repeat_dyn.exp +++ b/gdb/testsuite/gdb.ada/repeat_dyn.exp @@ -29,4 +29,4 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo_oc22_002.adb] runto "foo_oc22_002.adb:$bp_location" gdb_test "print a1(1)@3" \ - " = \\(3, 5, 8\\)" + " = \\(3, 5, 8\\)" diff --git a/gdb/testsuite/gdb.ada/same_enum/pck.adb b/gdb/testsuite/gdb.ada/same_enum/pck.adb index fc67d2f6938..2bfbe8ce33e 100644 --- a/gdb/testsuite/gdb.ada/same_enum/pck.adb +++ b/gdb/testsuite/gdb.ada/same_enum/pck.adb @@ -19,4 +19,3 @@ package body Pck is null; end Do_Nothing; end Pck; - diff --git a/gdb/testsuite/gdb.ada/same_enum/pck.ads b/gdb/testsuite/gdb.ada/same_enum/pck.ads index efb475bfad0..eb0d51a7902 100644 --- a/gdb/testsuite/gdb.ada/same_enum/pck.ads +++ b/gdb/testsuite/gdb.ada/same_enum/pck.ads @@ -21,4 +21,3 @@ package Pck is procedure Do_Nothing (A : System.Address); end Pck; - diff --git a/gdb/testsuite/gdb.ada/scoped_watch.exp b/gdb/testsuite/gdb.ada/scoped_watch.exp index 17760f7c13b..03526a2e080 100644 --- a/gdb/testsuite/gdb.ada/scoped_watch.exp +++ b/gdb/testsuite/gdb.ada/scoped_watch.exp @@ -31,27 +31,27 @@ runto "pck.adb:$bp_location" # Insert a watchpoint on local variable "result" gdb_test "watch result" \ - ".*atchpoint \[0-9\]+: result" + ".*atchpoint \[0-9\]+: result" # Insert a breakpoint we'll reach after returning from the current # function. set bp_location [gdb_get_line_number "Do_Nothing" ${testdir}/foo_p708_025.adb] gdb_test "break foo_p708_025.adb:$bp_location" \ - "Breakpoint \[0-9\]+ at.*: file .*foo_p708_025.adb, line \[0-9\]+." + "Breakpoint \[0-9\]+ at.*: file .*foo_p708_025.adb, line \[0-9\]+." # This breakpoint will be there to stop us after we test what happens # during a continue (see below...) gdb_test "break pck.increment" \ - "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." + "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." # Continue until we reach our watchpoint. It isn't strictly necessary # for our purpose that the watchpoint actually triggers, but this shows # that the watchpoint exists and is active. gdb_test "cont" \ - ".*atchpoint \[0-9\]+: result.*Old value = 8.*New value = 64.*" \ - "continuing to watchpoint hit" + ".*atchpoint \[0-9\]+: result.*Old value = 8.*New value = 64.*" \ + "continuing to watchpoint hit" # Continue again. We should be stopped at the (internal) breakpoint # that we setup to delete the watchpoint as soon as the program leaves @@ -66,18 +66,18 @@ gdb_test \ # (on the call to Do_Nothing) we set earlier. gdb_test "cont" \ - "Breakpoint \[0-9\]+.*Do_Nothing.*" \ - "continuing to breakpoint on call to Do_Nothing" + "Breakpoint \[0-9\]+.*Do_Nothing.*" \ + "continuing to breakpoint on call to Do_Nothing" # Do a next, to verify that it works... gdb_test "next" \ - ".* Call_Me;" \ - "next to call to Call_Me" + ".* Call_Me;" \ + "next to call to Call_Me" # And finally, one more continue. gdb_test "cont" \ - "Breakpoint \[0-9\]+.*pck\\.increment.*" \ - "continuing to breakpoint in pck.increment" + "Breakpoint \[0-9\]+.*pck\\.increment.*" \ + "continuing to breakpoint in pck.increment" diff --git a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp index 76070e28031..fcba9d7064d 100644 --- a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp +++ b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp @@ -42,11 +42,11 @@ foreach_gnat_encoding scenario flags {all minimal} { gdb_breakpoint "update_small" gdb_test "continue" \ - "Breakpoint .*, pck\\.update_small \\(s=9\\) at .*pck.adb:.*" \ - "continue to update_small" + "Breakpoint .*, pck\\.update_small \\(s=9\\) at .*pck.adb:.*" \ + "continue to update_small" # And again for the second call. gdb_test "continue" \ - "Breakpoint .*, pck\\.update_small \\(s=15\\) at .*pck.adb:.*" \ - "continue to update_small for va.t" + "Breakpoint .*, pck\\.update_small \\(s=15\\) at .*pck.adb:.*" \ + "continue to update_small for va.t" } diff --git a/gdb/testsuite/gdb.ada/set_wstr.exp b/gdb/testsuite/gdb.ada/set_wstr.exp index bac83154acf..07c81ab63d3 100644 --- a/gdb/testsuite/gdb.ada/set_wstr.exp +++ b/gdb/testsuite/gdb.ada/set_wstr.exp @@ -33,38 +33,38 @@ if {![runto "a.adb:$bp_location"]} { # Verify that assigning to Nnn (a basic string) works... gdb_test "print nnn" \ - "= \"12345\"" \ - "print nnn before assignment" + "= \"12345\"" \ + "print nnn before assignment" gdb_test_no_output "set variable nnn := \"qcyom\"" gdb_test "print nnn" \ - "= \"qcyom\"" \ - "print nnn after assignment" + "= \"qcyom\"" \ + "print nnn after assignment" # Same with Www (a wide string)... gdb_test "print www" \ - "= \"12345\"" \ - "print www before assignment" + "= \"12345\"" \ + "print www before assignment" gdb_test_no_output "set variable www := \"zenrk\"" gdb_test "print www" \ - "= \"zenrk\"" \ - "print www after assignment" + "= \"zenrk\"" \ + "print www after assignment" # Same with Rws (a wide wide string)... gdb_test "print rws" \ - "= \"12345\"" \ - "print rws before assignment" + "= \"12345\"" \ + "print rws before assignment" gdb_test_no_output "set variable rws := \"ndhci\"" gdb_test "print rws" \ - "= \"ndhci\"" \ - "print rws after assignment" + "= \"ndhci\"" \ + "print rws after assignment" # Also, check that GDB doesn't get tricked if we assign to Www a # string twice the length of Www. The debugger should reject the @@ -72,7 +72,7 @@ gdb_test "print rws" \ # used to get tricked because the array size was the same). gdb_test "set variable www := \"1#2#3#4#5#\"" \ - "cannot assign arrays of different length" + "cannot assign arrays of different length" # However, reassigning an array of a different length should work when # the LHS is a convenience variable. diff --git a/gdb/testsuite/gdb.ada/small_reg_param.exp b/gdb/testsuite/gdb.ada/small_reg_param.exp index a5dce7d1d4c..119e561bd02 100644 --- a/gdb/testsuite/gdb.ada/small_reg_param.exp +++ b/gdb/testsuite/gdb.ada/small_reg_param.exp @@ -40,4 +40,3 @@ gdb_test "continue" \ # And just to make sure, we also verify that the parameter value # is correct when we print it manually. gdb_test "print w" " = 50" - diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/start.exp index 14f24903c6d..9138030aef0 100644 --- a/gdb/testsuite/gdb.ada/start.exp +++ b/gdb/testsuite/gdb.ada/start.exp @@ -36,5 +36,5 @@ if { [gdb_start_cmd] < 0 } { } gdb_test "" \ - "dummy \\(\\) at .*dummy.adb.*" \ - "start" + "dummy \\(\\) at .*dummy.adb.*" \ + "start" diff --git a/gdb/testsuite/gdb.ada/str_binop_equal.exp b/gdb/testsuite/gdb.ada/str_binop_equal.exp index 4de533cf362..85cf9cb0e41 100644 --- a/gdb/testsuite/gdb.ada/str_binop_equal.exp +++ b/gdb/testsuite/gdb.ada/str_binop_equal.exp @@ -29,13 +29,13 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo_p211_061.adb] runto "foo_p211_061.adb:$bp_location" gdb_test "print my_str = my_str" \ - " = true" + " = true" gdb_test "print my_str = \"ABCD\"" \ " = true" gdb_test "print my_str = \"EFGH\"" \ - " = false" + " = false" gdb_test "print my_str = \"AB\"" \ - " = false" + " = false" diff --git a/gdb/testsuite/gdb.ada/str_binop_equal/pck.adb b/gdb/testsuite/gdb.ada/str_binop_equal/pck.adb index 32b2b6e38c0..e275efe6009 100644 --- a/gdb/testsuite/gdb.ada/str_binop_equal/pck.adb +++ b/gdb/testsuite/gdb.ada/str_binop_equal/pck.adb @@ -19,4 +19,3 @@ package body Pck is null; end Do_Nothing; end pck; - diff --git a/gdb/testsuite/gdb.ada/str_ref_cmp.exp b/gdb/testsuite/gdb.ada/str_ref_cmp.exp index a3362bffaa7..b2bb976f16c 100644 --- a/gdb/testsuite/gdb.ada/str_ref_cmp.exp +++ b/gdb/testsuite/gdb.ada/str_ref_cmp.exp @@ -44,7 +44,7 @@ gdb_test_multiple {print "a" = "a"} $test { # Verify that we can compare a string slice with another string. gdb_test "print String_Var (1 .. 3) = \"Hel\"" \ - "= true" + "= true" gdb_test "print String_Var (1 .. 3) = \"hel\"" \ - "= false" + "= false" diff --git a/gdb/testsuite/gdb.ada/sym_print_name.exp b/gdb/testsuite/gdb.ada/sym_print_name.exp index 399fede8c29..9e4a38bb5df 100644 --- a/gdb/testsuite/gdb.ada/sym_print_name.exp +++ b/gdb/testsuite/gdb.ada/sym_print_name.exp @@ -38,16 +38,15 @@ set test_name "multiple matches for symbol integervar" gdb_test_multiple "print integervar" "$test_name" \ { -re "$menu" { - pass "$test_name" + pass "$test_name" } default { - fail "$test_name" + fail "$test_name" } } # Select the first choice from the multiple-choice menu above. gdb_test "1" \ - "= 48" \ - "select first choice from multiple-choice menu" - + "= 48" \ + "select first choice from multiple-choice menu" diff --git a/gdb/testsuite/gdb.ada/taft_type.exp b/gdb/testsuite/gdb.ada/taft_type.exp index 25d7d564b24..c07f5b144ea 100644 --- a/gdb/testsuite/gdb.ada/taft_type.exp +++ b/gdb/testsuite/gdb.ada/taft_type.exp @@ -31,4 +31,4 @@ if {![runto "p.adb:$bp_location"]} { } gdb_test "print w.e.all" \ - "= \\(month => 8, year => 1974\\)" + "= \\(month => 8, year => 1974\\)" diff --git a/gdb/testsuite/gdb.ada/taft_type/p.adb b/gdb/testsuite/gdb.ada/taft_type/p.adb index be354931a40..fc413470755 100644 --- a/gdb/testsuite/gdb.ada/taft_type/p.adb +++ b/gdb/testsuite/gdb.ada/taft_type/p.adb @@ -20,4 +20,3 @@ procedure P is begin W := Create; end P; -- START - diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp index ef714c6344e..20f1e334079 100644 --- a/gdb/testsuite/gdb.ada/tagged.exp +++ b/gdb/testsuite/gdb.ada/tagged.exp @@ -34,19 +34,19 @@ runto "foo.adb:$bp_location" # class-wide. gdb_test "ptype segm" \ - [multi_line "type = new pck\\.object with record" \ - " width: integer;" \ - "end record" ] + [multi_line "type = new pck\\.object with record" \ + " width: integer;" \ + "end record" ] gdb_test "print segm" \ - "= \\(position => 74, width => 8\\)" + "= \\(position => 74, width => 8\\)" # Now, test printing of an class-wide object. gdb_test "ptype obj" \ - [multi_line "type = new pck\\.object with record" \ - " width: integer;" \ - "end record" ] + [multi_line "type = new pck\\.object with record" \ + " width: integer;" \ + "end record" ] gdb_test "print obj" \ - "= \\(position => 74, width => 8\\)" + "= \\(position => 74, width => 8\\)" diff --git a/gdb/testsuite/gdb.ada/tagged/pck.adb b/gdb/testsuite/gdb.ada/tagged/pck.adb index 7b1933a9791..4c32dd51854 100644 --- a/gdb/testsuite/gdb.ada/tagged/pck.adb +++ b/gdb/testsuite/gdb.ada/tagged/pck.adb @@ -21,5 +21,3 @@ package body Pck is end Do_Nothing; end Pck; - - diff --git a/gdb/testsuite/gdb.ada/tagged/pck.ads b/gdb/testsuite/gdb.ada/tagged/pck.ads index 88095c08dd7..995919252a4 100644 --- a/gdb/testsuite/gdb.ada/tagged/pck.ads +++ b/gdb/testsuite/gdb.ada/tagged/pck.ads @@ -28,5 +28,3 @@ package Pck is procedure Do_Nothing (A : System.Address); end Pck; - - diff --git a/gdb/testsuite/gdb.ada/tagged_not_init.exp b/gdb/testsuite/gdb.ada/tagged_not_init.exp index ea653005bf7..61fbfa48449 100644 --- a/gdb/testsuite/gdb.ada/tagged_not_init.exp +++ b/gdb/testsuite/gdb.ada/tagged_not_init.exp @@ -29,4 +29,3 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb] runto "foo.adb:$bp_location" gdb_test "print obj" " = \\(x => -?$decimal\\)" - diff --git a/gdb/testsuite/gdb.ada/task_bp.exp b/gdb/testsuite/gdb.ada/task_bp.exp index 7e9102c5e76..de96082ba10 100644 --- a/gdb/testsuite/gdb.ada/task_bp.exp +++ b/gdb/testsuite/gdb.ada/task_bp.exp @@ -47,7 +47,7 @@ proc test_bp { loc msg } { } set all_linespecs { "pck.dummy_task" "dummy_task" - "pck.adb:pck.dummy_task" "pck.adb:dummy_task"} + "pck.adb:pck.dummy_task" "pck.adb:dummy_task"} # First, test the linespecs when the associated symtab hasn't been # expanded yet. diff --git a/gdb/testsuite/gdb.ada/task_switch_in_core.exp b/gdb/testsuite/gdb.ada/task_switch_in_core.exp index 59fbe11676d..cb04c749aca 100644 --- a/gdb/testsuite/gdb.ada/task_switch_in_core.exp +++ b/gdb/testsuite/gdb.ada/task_switch_in_core.exp @@ -56,14 +56,14 @@ if { $core_loaded == -1 } { # First, switch to task 1. gdb_test "task 1" \ - "crash\\.request_for_crash \\(\\) at .*crash\\.adb:$decimal.*" + "crash\\.request_for_crash \\(\\) at .*crash\\.adb:$decimal.*" gdb_test "info tasks" \ - [multi_line "\\s+ID\\s+TID\\s+P-ID\\s+Pri\\s+State\\s+Name" \ - "\\*\\s+1\\s+.*main_task" \ - "\\s+2.*my_t"] \ - "info tasks after switching to task 1" + [multi_line "\\s+ID\\s+TID\\s+P-ID\\s+Pri\\s+State\\s+Name" \ + "\\*\\s+1\\s+.*main_task" \ + "\\s+2.*my_t"] \ + "info tasks after switching to task 1" # Switch to task 2. Unlike in the case where we tested the switch to # task 1, don't check the location where the debugger says the program @@ -73,10 +73,10 @@ gdb_test "info tasks" \ # we will verify right after with an additional test that the current # task is now task 2. gdb_test "task 2" \ - "\\\[Switching to task 2 \"my_t\"\\\].*" + "\\\[Switching to task 2 \"my_t\"\\\].*" gdb_test "info tasks" \ - [multi_line "\\s+ID\\s+TID\\s+P-ID\\s+Pri\\s+State\\s+Name" \ - "\\s+1\\s+.*main_task" \ - "\\*\\s+2.*my_t"] \ - "info tasks after switching to task 2" + [multi_line "\\s+ID\\s+TID\\s+P-ID\\s+Pri\\s+State\\s+Name" \ + "\\s+1\\s+.*main_task" \ + "\\*\\s+2.*my_t"] \ + "info tasks after switching to task 2" diff --git a/gdb/testsuite/gdb.ada/tasks.exp b/gdb/testsuite/gdb.ada/tasks.exp index 4f6fc5201a8..e36edeaf83b 100644 --- a/gdb/testsuite/gdb.ada/tasks.exp +++ b/gdb/testsuite/gdb.ada/tasks.exp @@ -33,13 +33,13 @@ runto "foo.adb:$bp_location" # Make sure that all tasks appear in the "info tasks" listing, and # that the active task is the environment task. gdb_test "info tasks" \ - [join {" +ID +TID P-ID Pri State +Name" \ - "\\* +1 .* main_task" \ - " +2 .* task_list\\(1\\)" \ - " +3 .* task_list\\(2\\)" \ - " +4 .* task_list\\(3\\)"} \ - "\r\n"] \ - "info tasks before inserting breakpoint" + [join {" +ID +TID P-ID Pri State +Name" \ + "\\* +1 .* main_task" \ + " +2 .* task_list\\(1\\)" \ + " +3 .* task_list\\(2\\)" \ + " +4 .* task_list\\(3\\)"} \ + "\r\n"] \ + "info tasks before inserting breakpoint" # Confirm that the "info threads" output lines up with the tasks list. gdb_test "info threads" \ @@ -159,19 +159,19 @@ if {[allow_guile_tests]} { # task 3 will hit our breakpoint, and GDB is expected to stop at that # point. Also make sure that GDB reports the correct breakpoint number. gdb_test "continue" \ - ".*Breakpoint $bp_number, foo.break_me \\(\\).*" \ - "continue to breakpoint" + ".*Breakpoint $bp_number, foo.break_me \\(\\).*" \ + "continue to breakpoint" # Check that it is indeed task 3 that hit the breakpoint by checking # which is the active task. gdb_test "info tasks" \ - [join {" +ID +TID P-ID Pri State +Name" \ - " +1 .* main_task" \ - " +2 .* task_list\\(1\\)" \ - "\\* +3 .* task_list\\(2\\)" \ - " +4 .* task_list\\(3\\)"} \ - "\r\n"] \ - "info tasks after hitting breakpoint" + [join {" +ID +TID P-ID Pri State +Name" \ + " +1 .* main_task" \ + " +2 .* task_list\\(1\\)" \ + "\\* +3 .* task_list\\(2\\)" \ + " +4 .* task_list\\(3\\)"} \ + "\r\n"] \ + "info tasks after hitting breakpoint" # Now, resume the execution and make sure that GDB does not stop when # task 4 hits the breakpoint. Continuing thus results in our program diff --git a/gdb/testsuite/gdb.ada/tick_last_segv.exp b/gdb/testsuite/gdb.ada/tick_last_segv.exp index 5dba9b652c4..0ad2ef860eb 100644 --- a/gdb/testsuite/gdb.ada/tick_last_segv.exp +++ b/gdb/testsuite/gdb.ada/tick_last_segv.exp @@ -31,10 +31,9 @@ clean_restart ${testfile} # The actual value printed is of no interest in this testcase. gdb_test "print short_integer'first" \ - "= -\[0-9\]+" \ - "print short-integer'first" + "= -\[0-9\]+" \ + "print short-integer'first" gdb_test "print short_integer'last" \ - "= \[0-9\]+" \ - "print short-integer'last" - + "= \[0-9\]+" \ + "print short-integer'last" diff --git a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb index 7cc5dd94877..b94f40e9e6d 100644 --- a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb +++ b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb @@ -30,5 +30,3 @@ package body Pck is null; end Do_Nothing; end Pck; - - diff --git a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads index 7f0405e3f0a..7c00cb0e464 100644 --- a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads +++ b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads @@ -28,4 +28,3 @@ package Pck is procedure Do_Nothing (A : System.Address); end Pck; - diff --git a/gdb/testsuite/gdb.ada/type_coercion.exp b/gdb/testsuite/gdb.ada/type_coercion.exp index 11f289fbddc..201e4c045d4 100644 --- a/gdb/testsuite/gdb.ada/type_coercion.exp +++ b/gdb/testsuite/gdb.ada/type_coercion.exp @@ -29,19 +29,19 @@ set bp_location [gdb_get_line_number "START" ${testdir}/assign.adb] runto "assign.adb:$bp_location" gdb_test "p q" \ - "= \\(2, 3, 5, 7, 11\\)" "initial value of q" + "= \\(2, 3, 5, 7, 11\\)" "initial value of q" gdb_test_no_output "set \$addr := q'address" \ - "save q'address in convenience variable" + "save q'address in convenience variable" gdb_test "p {Integer} \$addr" \ - "= 2" \ - "print {Integer} \$addr" + "= 2" \ + "print {Integer} \$addr" # Now change the value at $addr using the same "{TYPE}" syntax. gdb_test_no_output "set {Integer} \$addr := 19" \ - "set {Integer} \$addr := 19" + "set {Integer} \$addr := 19" gdb_test "p q" \ - "= \\(19, 3, 5, 7, 11\\)" "modified value of q" + "= \\(19, 3, 5, 7, 11\\)" "modified value of q" diff --git a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb index 57b771e14d3..b0537cb43ca 100644 --- a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb +++ b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb @@ -48,4 +48,3 @@ begin Do_Nothing (My_Object'Address); -- STOP2 Do_Nothing (My_P_Object'Address); end Foo; - diff --git a/gdb/testsuite/gdb.ada/uninitialized_vars.exp b/gdb/testsuite/gdb.ada/uninitialized_vars.exp index 9c325ed3374..f01c7ca8382 100644 --- a/gdb/testsuite/gdb.ada/uninitialized_vars.exp +++ b/gdb/testsuite/gdb.ada/uninitialized_vars.exp @@ -35,4 +35,4 @@ runto "parse.adb:$bp_location" # Check that printing uninitialized variables does not crash the debugger. gdb_test "info locals" \ - ".*" + ".*" diff --git a/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb b/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb index c07c90cd954..7a815b6985c 100644 --- a/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb +++ b/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb @@ -22,4 +22,3 @@ begin Do_Nothing (My_Object'Address); -- STOP Do_Nothing (My_Small_Object'Address); end Foo_O115_002; - diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef.exp b/gdb/testsuite/gdb.ada/var_arr_typedef.exp index 680b9cce481..8b525833636 100644 --- a/gdb/testsuite/gdb.ada/var_arr_typedef.exp +++ b/gdb/testsuite/gdb.ada/var_arr_typedef.exp @@ -37,10 +37,10 @@ set vb "\\($rb, $rb, $ra, $ra\\)" set a "\\($va, $va, $vb, $vb\\)" gdb_test "print va" \ - " = $va" + " = $va" gdb_test "print vb" \ - " = $vb" + " = $vb" gdb_test "print a" \ - " = $a" + " = $a" diff --git a/gdb/testsuite/gdb.ada/vla.exp b/gdb/testsuite/gdb.ada/vla.exp index 144fbd6314a..dc418d864e7 100644 --- a/gdb/testsuite/gdb.ada/vla.exp +++ b/gdb/testsuite/gdb.ada/vla.exp @@ -29,10 +29,10 @@ set bp_location [gdb_get_line_number "Set breakpoint here" ${testdir}/vla.adb] runto "vla.adb:$bp_location" gdb_test "print r00" \ - "= \\(l1 => 0, l2 => 0, i1 => 1, a1 => \\(\\), i2 => 2, a2 => \\(\\), i3 => 3\\)" + "= \\(l1 => 0, l2 => 0, i1 => 1, a1 => \\(\\), i2 => 2, a2 => \\(\\), i3 => 3\\)" gdb_test "print r01" \ - "= \\(l1 => 0, l2 => 1, i1 => 1, a1 => \\(\\), i2 => 2, a2 => \\(20\\), i3 => 3\\)" + "= \\(l1 => 0, l2 => 1, i1 => 1, a1 => \\(\\), i2 => 2, a2 => \\(20\\), i3 => 3\\)" gdb_test "print r10" \ - "= \\(l1 => 1, l2 => 0, i1 => 1, a1 => \\(10\\), i2 => 2, a2 => \\(\\), i3 => 3\\)" + "= \\(l1 => 1, l2 => 0, i1 => 1, a1 => \\(10\\), i2 => 2, a2 => \\(\\), i3 => 3\\)" gdb_test "print r22" \ - "= \\(l1 => 2, l2 => 2, i1 => 1, a1 => \\(10, 10\\), i2 => 2, a2 => \\(20, 20\\), i3 => 3\\)" + "= \\(l1 => 2, l2 => 2, i1 => 1, a1 => \\(10, 10\\), i2 => 2, a2 => \\(20, 20\\), i3 => 3\\)" diff --git a/gdb/testsuite/gdb.ada/watch_arg.exp b/gdb/testsuite/gdb.ada/watch_arg.exp index b1b6adea15a..7927f8a9a4b 100644 --- a/gdb/testsuite/gdb.ada/watch_arg.exp +++ b/gdb/testsuite/gdb.ada/watch_arg.exp @@ -31,14 +31,14 @@ runto "watch.adb:$bp_location" # Insert a watchpoint on argument X gdb_test "watch x" \ - ".*atchpoint \[0-9\]+: x" \ - "set watchpoint on function argument X" + ".*atchpoint \[0-9\]+: x" \ + "set watchpoint on function argument X" # Then insert a breakpoint at the location we'd like to continue to... set bp_location [gdb_get_line_number "BREAK2" ${testdir}/watch.adb] gdb_test "break watch.adb:$bp_location" \ - "Breakpoint \[0-9\]+ at.*: file .*watch.adb, line \[0-9\]+." \ - "insert second breakpoint in watch.adb" + "Breakpoint \[0-9\]+ at.*: file .*watch.adb, line \[0-9\]+." \ + "insert second breakpoint in watch.adb" # Continue again. We should be stopped at the (internal) breakpoint # that we setup to delete the watchpoint as soon as the program leaves @@ -53,7 +53,5 @@ gdb_test \ # we inserted. gdb_test "cont" \ - "Breakpoint \[0-9\]+, watch \\(\\).*" \ - "continuing to second breakpoint" - - + "Breakpoint \[0-9\]+, watch \\(\\).*" \ + "continuing to second breakpoint" diff --git a/gdb/testsuite/gdb.ada/watch_arg/watch.adb b/gdb/testsuite/gdb.ada/watch_arg/watch.adb index fa0977619d0..f33f8c0d720 100644 --- a/gdb/testsuite/gdb.ada/watch_arg/watch.adb +++ b/gdb/testsuite/gdb.ada/watch_arg/watch.adb @@ -29,4 +29,3 @@ begin Foo (X); X := 2; -- BREAK2 end Watch; - diff --git a/gdb/testsuite/gdb.ada/watch_minus_l.exp b/gdb/testsuite/gdb.ada/watch_minus_l.exp index 08be8bfac0c..7cda58c1e6c 100644 --- a/gdb/testsuite/gdb.ada/watch_minus_l.exp +++ b/gdb/testsuite/gdb.ada/watch_minus_l.exp @@ -31,7 +31,7 @@ runto "foo_ra10_006.adb:$bp_location" # Insert a watchpoint on argument X gdb_test "watch -location pck.global_var" \ - ".*atchpoint \[0-9\]+: -location pck.global_var" + ".*atchpoint \[0-9\]+: -location pck.global_var" # Continue again. We should be stopped at the (internal) breakpoint # that we setup to delete the watchpoint as soon as the program leaves diff --git a/gdb/testsuite/gdb.ada/whatis_array_val.exp b/gdb/testsuite/gdb.ada/whatis_array_val.exp index 0fd48e6d25e..78ca14cfcfc 100644 --- a/gdb/testsuite/gdb.ada/whatis_array_val.exp +++ b/gdb/testsuite/gdb.ada/whatis_array_val.exp @@ -32,11 +32,10 @@ if {![runto "foo.adb:$bp_location"]} { # Accept "foo." prefix for older versions of GNAT. gdb_test "whatis full" \ - "type = (foo\\.)?full_table" + "type = (foo\\.)?full_table" gdb_test "print full" \ - " = \\(144, 233, 377, 610, 987\\)" + " = \\(144, 233, 377, 610, 987\\)" gdb_test "whatis $" \ - "type = (foo\\.)?full_table" - + "type = (foo\\.)?full_table" diff --git a/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb b/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb index 7315359a2c5..6a110c2b40d 100644 --- a/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb +++ b/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb @@ -22,4 +22,3 @@ procedure Foo is begin Do_Nothing (Full'Address); -- STOP end Foo; - diff --git a/gdb/testsuite/gdb.ada/win_fu_syms.exp b/gdb/testsuite/gdb.ada/win_fu_syms.exp index 8e4f2156cd8..837ea489335 100644 --- a/gdb/testsuite/gdb.ada/win_fu_syms.exp +++ b/gdb/testsuite/gdb.ada/win_fu_syms.exp @@ -28,11 +28,10 @@ clean_restart ${testfile} set loc [gdb_get_line_number "Integer" ${testdir}/foo.adb] gdb_test "info line foo.adb:$loc" \ - "Line $decimal of \".*foo\\.adb\" starts at address $hex <_ada_foo\\+$decimal> and ends at $hex <_ada_foo\\+$decimal>\\." \ - "info line on variable declaration" + "Line $decimal of \".*foo\\.adb\" starts at address $hex <_ada_foo\\+$decimal> and ends at $hex <_ada_foo\\+$decimal>\\." \ + "info line on variable declaration" set loc [gdb_get_line_number "Do_Nothing" ${testdir}/foo.adb] gdb_test "info line foo.adb:$loc" \ - "Line $decimal of \".*foo\\.adb\" starts at address $hex <_ada_foo\\+$decimal> and ends at $hex <_ada_foo\\+$decimal>\\." \ - "info line on Do_Nothing call" - + "Line $decimal of \".*foo\\.adb\" starts at address $hex <_ada_foo\\+$decimal> and ends at $hex <_ada_foo\\+$decimal>\\." \ + "info line on Do_Nothing call" diff --git a/gdb/testsuite/gdb.arch/aarch64-atomic-inst.c b/gdb/testsuite/gdb.arch/aarch64-atomic-inst.c index a9444b89fcc..7eb91ec3315 100644 --- a/gdb/testsuite/gdb.arch/aarch64-atomic-inst.c +++ b/gdb/testsuite/gdb.arch/aarch64-atomic-inst.c @@ -23,24 +23,24 @@ int main(void) /* Test that we can step over ldxr/stxr. This sequence should step from ldxr to the following __asm __volatile. */ __asm __volatile ("1: ldxr %0,%2\n" \ - " cmp %0,#1\n" \ - " b.eq out\n" \ - " add %0,%0,1\n" \ - " stxr %w1,%0,%2\n" \ - " cbnz %w1,1b" \ - : "=&r" (tmp), "=&r" (cond), "+Q" (dword) \ - : : "memory"); + " cmp %0,#1\n" \ + " b.eq out\n" \ + " add %0,%0,1\n" \ + " stxr %w1,%0,%2\n" \ + " cbnz %w1,1b" \ + : "=&r" (tmp), "=&r" (cond), "+Q" (dword) \ + : : "memory"); /* This sequence should take the conditional branch and step from ldxr to the return dword line. */ __asm __volatile ("1: ldxr %0,%2\n" \ - " cmp %0,#1\n" \ - " b.eq out\n" \ - " add %0,%0,1\n" \ - " stxr %w1,%0,%2\n" \ - " cbnz %w1,1b\n" \ - : "=&r" (tmp), "=&r" (cond), "+Q" (dword) \ - : : "memory"); + " cmp %0,#1\n" \ + " b.eq out\n" \ + " add %0,%0,1\n" \ + " stxr %w1,%0,%2\n" \ + " cbnz %w1,1b\n" \ + : "=&r" (tmp), "=&r" (cond), "+Q" (dword) \ + : : "memory"); dword = -1; __asm __volatile ("out:\n"); diff --git a/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c b/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c index 64f02005469..ef5e9d75143 100644 --- a/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c +++ b/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.c @@ -71,7 +71,7 @@ set_watchpoint (pid_t pid, volatile void *addr, unsigned len_mask) iov.iov_base = &dreg_state; iov.iov_len = (offsetof (struct user_hwdebug_state, dbg_regs) - + sizeof (dreg_state.dbg_regs[0])); + + sizeof (dreg_state.dbg_regs[0])); errno = 0; l = ptrace (PTRACE_SETREGSET, pid, NT_ARM_HW_WATCH, &iov); if (errno != 0) diff --git a/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.exp b/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.exp index 7777175d7dc..895e2f01515 100644 --- a/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.exp +++ b/gdb/testsuite/gdb.arch/aarch64-dbreg-contents.exp @@ -33,10 +33,10 @@ runto_main set test "continue to exit" gdb_test_multiple "continue" "$test" { -re "exited with code 01.*$gdb_prompt $" { - # For case that the PTRACE_SETREGSET call fails. - pass "$test" + # For case that the PTRACE_SETREGSET call fails. + pass "$test" } -re "exited normally.*$gdb_prompt $" { - pass "$test" + pass "$test" } } diff --git a/gdb/testsuite/gdb.arch/aarch64-fp.c b/gdb/testsuite/gdb.arch/aarch64-fp.c index 2bc990a9447..a6139defaa2 100644 --- a/gdb/testsuite/gdb.arch/aarch64-fp.c +++ b/gdb/testsuite/gdb.arch/aarch64-fp.c @@ -19,9 +19,9 @@ int main (void) { char buf0[] = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; char buf1[] = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f}; + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f}; long val; void *addr; @@ -41,4 +41,3 @@ main (void) return 1; } - diff --git a/gdb/testsuite/gdb.arch/alpha-step.c b/gdb/testsuite/gdb.arch/alpha-step.c index 363d4fc84b3..63b9a9875db 100644 --- a/gdb/testsuite/gdb.arch/alpha-step.c +++ b/gdb/testsuite/gdb.arch/alpha-step.c @@ -112,5 +112,3 @@ asm (" .text\n" "$ne_1:\n" " ret $31,($26),1\n" " .end ne\n"); - - diff --git a/gdb/testsuite/gdb.arch/alpha-step.exp b/gdb/testsuite/gdb.arch/alpha-step.exp index aea492e5206..1d3d6f7715c 100644 --- a/gdb/testsuite/gdb.arch/alpha-step.exp +++ b/gdb/testsuite/gdb.arch/alpha-step.exp @@ -33,62 +33,62 @@ proc test_stepi {function } { # of the previous tests, this makes sure that it doesn't affect # this series of tests. if {![runto_main]} { - return 0 + return 0 } # Insert a breakpoint on the FP branch instruction inside FUNCTION. # Since the function has been hand written, we know this instruction # is a "fb$function" located at FUNCTION+4. gdb_test "break *$function+4" \ - "Breakpoint .* at .*" \ - "breakpoint on fb$function instruction" + "Breakpoint .* at .*" \ + "breakpoint on fb$function instruction" gdb_test "continue" \ - "Breakpoint .*, 0x\[0-9a-fA-F\]+ in $function\(\).*" \ - "continue to fb$function instruction (first call)" + "Breakpoint .*, 0x\[0-9a-fA-F\]+ in $function\(\).*" \ + "continue to fb$function instruction (first call)" # Extra check to make sure we stopped on the FP branch instruction. gdb_test "x /i \$pc" \ - "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+fb$function.*" \ - "Check breakpoint on fb$function instruction (first call)" + "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+fb$function.*" \ + "Check breakpoint on fb$function instruction (first call)" # Step test, followed by the check that we landed on the expected # instruction (the testcase should be written in such a way that # the branch is taken on the first call to this function. gdb_test "stepi" \ - "0x\[0-9a-fA-F\]+.*" \ - "stepi on fb$function (first call)" + "0x\[0-9a-fA-F\]+.*" \ + "stepi on fb$function (first call)" gdb_test "x /i \$pc" \ - "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+ret.*" \ - "Check stepi over fb$function stopped on ret" + "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+ret.*" \ + "Check stepi over fb$function stopped on ret" # Continue again. FUNCTION should be called a second time, this time # with an argument such that the FP branch will not be taken. gdb_test "continue" \ - "Breakpoint .*, 0x\[0-9a-fA-F\]+ in $function\(\).*" \ - "continue to fb$function instruction (second call)" + "Breakpoint .*, 0x\[0-9a-fA-F\]+ in $function\(\).*" \ + "continue to fb$function instruction (second call)" # Extra check to make sure we stopped on the FP branch instruction. gdb_test "x /i \$pc" \ - "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+fb$function.*" \ - "Check breakpoint on fb$function instruction (second call)" + "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+fb$function.*" \ + "Check breakpoint on fb$function instruction (second call)" # Step test, branch should not be taken. gdb_test "stepi" \ - "0x\[0-9a-fA-F\]+.*" \ - "stepi on fb$function (branch not taken)" + "0x\[0-9a-fA-F\]+.*" \ + "stepi on fb$function (branch not taken)" # Extra check to verify that we landed on the instruction we expected. gdb_test "x /i \$pc" \ - "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+fneg.*" \ - "check stepi over fb$function stopped on fneg instruction" + "0x\[0-9a-fA-F\]+ <.*>:\[ \t\]+fneg.*" \ + "check stepi over fb$function stopped on fneg instruction" } @@ -98,4 +98,3 @@ test_stepi "lt" test_stepi "le" test_stepi "eq" test_stepi "ne" - diff --git a/gdb/testsuite/gdb.arch/altivec-abi.c b/gdb/testsuite/gdb.arch/altivec-abi.c index fb3b106b1d6..73c6750899c 100644 --- a/gdb/testsuite/gdb.arch/altivec-abi.c +++ b/gdb/testsuite/gdb.arch/altivec-abi.c @@ -48,18 +48,18 @@ array_of_vector_func (vector signed short *matrix) vector int vec_func (vector short vshort_f, /* goes in v2 */ - vector unsigned short vushort_f, /* goes in v3 */ - vector int vint_f, /* goes in v4 */ - vector unsigned int vuint_f, /* goes in v5 */ - vector char vchar_f, /* goes in v6 */ - vector unsigned char vuchar_f, /* goes in v7 */ - vector float vfloat_f, /* goes in v8 */ - vector short x_f, /* goes in v9 */ - vector int y_f, /* goes in v10 */ - vector char a_f, /* goes in v11 */ - vector float b_f, /* goes in v12 */ - vector float c_f, /* goes in v13 */ - vector int intv_on_stack_f) + vector unsigned short vushort_f, /* goes in v3 */ + vector int vint_f, /* goes in v4 */ + vector unsigned int vuint_f, /* goes in v5 */ + vector char vchar_f, /* goes in v6 */ + vector unsigned char vuchar_f, /* goes in v7 */ + vector float vfloat_f, /* goes in v8 */ + vector short x_f, /* goes in v9 */ + vector int y_f, /* goes in v10 */ + vector char a_f, /* goes in v11 */ + vector float b_f, /* goes in v12 */ + vector float c_f, /* goes in v13 */ + vector int intv_on_stack_f) { vector int vint_res; @@ -75,12 +75,12 @@ vec_func (vector short vshort_f, /* goes in v2 */ vuint_res = vec_add (vuint_f, ((vector unsigned int) {5,6,7,8})); vshort_res = vec_add (vshort_f, x_f); vushort_res = vec_add (vushort_f, - ((vector unsigned short) {1,2,3,4,5,6,7,8})); + ((vector unsigned short) {1,2,3,4,5,6,7,8})); vchar_res = vec_add (vchar_f, a_f); vfloat_res = vec_add (vfloat_f, b_f); vfloat_res = vec_add (c_f, ((vector float) {1.1,1.1,1.1,1.1})); vuchar_res = vec_add (vuchar_f, - ((vector unsigned char) {'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a'})); + ((vector unsigned char) {'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a'})); return vint_res; } @@ -120,22 +120,21 @@ main (void) vec_func(vshort,vushort,vint,vuint,vchar,vuchar,vfloat,x,y,a,b,c,intv_on_stack) #endif result = vec_func (vshort, /* goes in v2 */ - vushort, /* goes in v3 */ - vint, /* goes in v4 */ - vuint, /* goes in v5 */ - vchar, /* goes in v6 */ - vuchar, /* goes in v7 */ - vfloat, /* goes in v8 */ - x, /* goes in v9 */ - y, /* goes in v10 */ - a, /* goes in v11 */ - b, /* goes in v12 */ - c, /* goes in v13 */ - intv_on_stack); + vushort, /* goes in v3 */ + vint, /* goes in v4 */ + vuint, /* goes in v5 */ + vchar, /* goes in v6 */ + vuchar, /* goes in v7 */ + vfloat, /* goes in v8 */ + x, /* goes in v9 */ + y, /* goes in v10 */ + a, /* goes in v11 */ + b, /* goes in v12 */ + c, /* goes in v13 */ + intv_on_stack); struct_of_vector_func (vect_struct); array_of_vector_func (test4); return 0; } - diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp index dfe7e243a96..255cc268f22 100644 --- a/gdb/testsuite/gdb.arch/altivec-regs.exp +++ b/gdb/testsuite/gdb.arch/altivec-regs.exp @@ -59,9 +59,9 @@ gdb_test "set print frame-arguments all" # set all the registers integer portions to 1 for {set i 0} {$i < 32} {incr i 1} { - for {set j 0} {$j < 4} {incr j 1} { - gdb_test "set \$vr$i.v4_int32\[$j\] = 1" "" "set reg vr$i.v4si.f\[$j\]" - } + for {set j 0} {$j < 4} {incr j 1} { + gdb_test "set \$vr$i.v4_int32\[$j\] = 1" "" "set reg vr$i.v4si.f\[$j\]" + } } gdb_test "set \$vscr = 1" "" "" @@ -174,6 +174,3 @@ gdb_test "down" \ gdb_test "finish" \ "Run till exit from .0 vector_fun \\(a=.0x2020202, 0x2020202, 0x2020202, 0x2020202., b=.0x3030303, 0x3030303, 0x3030303, 0x3030303.\\) at.*altivec-regs.c.*in main \\(\\) at.*altivec-regs.c.*z = vector_fun \\(x, y\\);.*Value returned is.*= .0x5050505, 0x5050505, 0x5050505, 0x5050505." \ "finish returned correct value" - - - diff --git a/gdb/testsuite/gdb.arch/amd64-gs_base.exp b/gdb/testsuite/gdb.arch/amd64-gs_base.exp index a48cbec62d3..64d40300d20 100644 --- a/gdb/testsuite/gdb.arch/amd64-gs_base.exp +++ b/gdb/testsuite/gdb.arch/amd64-gs_base.exp @@ -36,8 +36,8 @@ gdb_test "print \$gs_base = 3" "= 3" "set gs_base" # set ws "\[\t \]+" set info_reg_out [multi_line "info register fs_base gs_base" \ - "fs_base${ws}0x2${ws}2"\ - "gs_base${ws}0x3${ws}3" ] + "fs_base${ws}0x2${ws}2"\ + "gs_base${ws}0x3${ws}3" ] gdb_test "info register fs_base gs_base" $info_reg_out\ "info registers fs_base and gs_base with value" diff --git a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp index e96b85b2354..054d4233cc6 100644 --- a/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp +++ b/gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp @@ -41,7 +41,7 @@ gdb_breakpoint "g" gdb_continue_to_breakpoint "first time in g" ".* v = 2;" gdb_test "return" { f \(\); /\* second \*/} "return" \ - {Make g return now\? \(y or n\) } "y" + {Make g return now\? \(y or n\) } "y" gdb_continue_to_breakpoint "second time in g" ".* v = 2;" diff --git a/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp b/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp index dc1149cc3df..609997f3ab4 100644 --- a/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp +++ b/gdb/testsuite/gdb.arch/arc-analyze-prologue.exp @@ -200,4 +200,3 @@ gdb_test "info frame 0" ".*Saved registers:$regs" \ set regs [saved_regs_to_str {fp blink} alloca_inner] gdb_test "info frame 1" ".*Saved registers:$regs" \ "saved registers in alloca_outer" - diff --git a/gdb/testsuite/gdb.arch/arc-decode-insn.exp b/gdb/testsuite/gdb.arch/arc-decode-insn.exp index 01b23ebec12..ad8bf6b5381 100644 --- a/gdb/testsuite/gdb.arch/arc-decode-insn.exp +++ b/gdb/testsuite/gdb.arch/arc-decode-insn.exp @@ -125,4 +125,3 @@ runto start_branch_tests foreach test $branch_test_list { test_branch_insn $test } - diff --git a/gdb/testsuite/gdb.arch/arm-disassembler-options.exp b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp index d20b2a84aa7..205b78b5973 100644 --- a/gdb/testsuite/gdb.arch/arm-disassembler-options.exp +++ b/gdb/testsuite/gdb.arch/arm-disassembler-options.exp @@ -50,4 +50,3 @@ gdb_test "set architecture $arch2" \ gdb_test "show disassembler-options" \ "The current disassembler options are '$option'.*" \ "show disassembler-options $option, modified architecture" - diff --git a/gdb/testsuite/gdb.arch/arm-disp-step.exp b/gdb/testsuite/gdb.arch/arm-disp-step.exp index a6214ef5a0f..145c1c202cb 100644 --- a/gdb/testsuite/gdb.arch/arm-disp-step.exp +++ b/gdb/testsuite/gdb.arch/arm-disp-step.exp @@ -67,10 +67,10 @@ proc test_ldr_literal {} { gdb_test_multiple "break *test_ldr_literal" "" { -re "Breakpoint.*at.* file .*$srcfile, line.*\r\n$gdb_prompt $" { - pass $gdb_test_name + pass $gdb_test_name } -re "No symbol.*\r\n$gdb_prompt $" { - return 0 + return 0 } } diff --git a/gdb/testsuite/gdb.arch/e500-abi.c b/gdb/testsuite/gdb.arch/e500-abi.c index 2f6b200fd84..b988cba0dd0 100644 --- a/gdb/testsuite/gdb.arch/e500-abi.c +++ b/gdb/testsuite/gdb.arch/e500-abi.c @@ -28,16 +28,16 @@ vector int m_vec_d = {0, 0}; vector int vec_func (vector unsigned int a_vec_f, - vector int b_vec_f, - vector float c_vec_f, - vector unsigned int d_vec_f, - vector int e_vec_f, - vector unsigned short f_vec_f, - vector short g_vec_f, - vector float h_vec_f, - vector float i_vec_f, - vector unsigned int l_vec_f, - vector int m_vec_f) + vector int b_vec_f, + vector float c_vec_f, + vector unsigned int d_vec_f, + vector int e_vec_f, + vector unsigned short f_vec_f, + vector short g_vec_f, + vector float h_vec_f, + vector float i_vec_f, + vector unsigned int l_vec_f, + vector int m_vec_f) { vector int n_vec; @@ -91,16 +91,16 @@ vec_func(a_vec,b_vec,c_vec,d_vec,e_vec,f_vec,g_vec,h_vec,i_vec,l_vec,m_vec) #endif res_vec = vec_func (a_vec, /* goes in r3 */ - b_vec, /* goes in r4 */ - c_vec, /* goes in r5 */ - d_vec, /* goes in r6 */ - e_vec, /* goes in r7 */ - f_vec, /* goes in r8 */ - g_vec, /* goes in r9 */ - h_vec, /* goes in r10 */ - i_vec, /* goes in stack */ - l_vec, /* goes in stack */ - m_vec); /* goes in stack */ + b_vec, /* goes in r4 */ + c_vec, /* goes in r5 */ + d_vec, /* goes in r6 */ + e_vec, /* goes in r7 */ + f_vec, /* goes in r8 */ + g_vec, /* goes in r9 */ + h_vec, /* goes in r10 */ + i_vec, /* goes in stack */ + l_vec, /* goes in stack */ + m_vec); /* goes in stack */ return 0; } diff --git a/gdb/testsuite/gdb.arch/e500-prologue.exp b/gdb/testsuite/gdb.arch/e500-prologue.exp index b468e71fadf..18795828c29 100644 --- a/gdb/testsuite/gdb.arch/e500-prologue.exp +++ b/gdb/testsuite/gdb.arch/e500-prologue.exp @@ -43,12 +43,12 @@ proc insert_breakpoint {function expected_location} { # Insert a breakpoint using the given function name, and extract # the breakpoint address for the output. gdb_test_multiple "break $function" "set breakpoint in $function" { - -re "Breakpoint 1 at ($hex).*$gdb_prompt $" { - set address $expect_out(1,string) - } - default { - fail "set breakpoint in $function" - } + -re "Breakpoint 1 at ($hex).*$gdb_prompt $" { + set address $expect_out(1,string) + } + default { + fail "set breakpoint in $function" + } } # If we managed to get the breakpoing address, then check that @@ -58,8 +58,8 @@ proc insert_breakpoint {function expected_location} { # the instruction). if {$address != ""} { gdb_test "x /i $address" \ - ".*<$function\\+$expected_location>.*" \ - "check $function breakpoint address" + ".*<$function\\+$expected_location>.*" \ + "check $function breakpoint address" } else { fail "unable to compute breakpoint address" } diff --git a/gdb/testsuite/gdb.arch/e500-regs.exp b/gdb/testsuite/gdb.arch/e500-regs.exp index fa10b4f6a1d..ae10b8e3d7a 100644 --- a/gdb/testsuite/gdb.arch/e500-regs.exp +++ b/gdb/testsuite/gdb.arch/e500-regs.exp @@ -46,9 +46,9 @@ if {![runto_main]} { # set all the registers integer portions to 1 for {set i 0} {$i < 32} {incr i 1} { - for {set j 0} {$j < 2} {incr j 1} { - gdb_test "set \$ev$i.v2_int32\[$j\] = 1" "" "set reg ev$i.v4si.f\[$j\]" - } + for {set j 0} {$j < 2} {incr j 1} { + gdb_test "set \$ev$i.v2_int32\[$j\] = 1" "" "set reg ev$i.v4si.f\[$j\]" + } } # Now execute some target code, so that GDB's register cache is flushed. @@ -68,7 +68,7 @@ set vector_register ".uint64 = 0x100000001, v2_float = .0x0, 0x0., v2_int32 = .0 } for {set i 0} {$i < 32} {incr i 1} { - gdb_test "info reg ev$i" "ev$i.*$vector_register" "info reg ev$i" + gdb_test "info reg ev$i" "ev$i.*$vector_register" "info reg ev$i" } # Test whether the GPRs are updated accordingly. (GPRs are just the lower @@ -77,7 +77,7 @@ for {set i 0} {$i < 32} {incr i 1} { set general_register "0x1\[ \t\]+1" for {set i 0} {$i < 32} {incr i 1} { - gdb_test "info reg r$i" "r$i.*$general_register" "info reg r$i" + gdb_test "info reg r$i" "r$i.*$general_register" "info reg r$i" } # Now redo the same tests, but using the print command. @@ -89,12 +89,12 @@ if {$endianness == "big"} { } for {set i 0} {$i < 32} {incr i 1} { - gdb_test "print \$ev$i" ".* = $decimal_vector" "print ev$i" + gdb_test "print \$ev$i" ".* = $decimal_vector" "print ev$i" } for {set i 0} {$i < 32} {incr i 1} { - set pattern$i ".*ev$i.*" - append pattern$i $vector_register + set pattern$i ".*ev$i.*" + append pattern$i $vector_register } send_gdb "info vector\n" @@ -195,6 +195,3 @@ gdb_test "down" \ gdb_test "finish" \ "Run till exit from .0 vector_fun \\(a=.2, 2., b=.3, 3.\\) at.*e500-regs.c.*main \\(\\) at.*e500-regs.c.*z = vector_fun \\(x, y\\);.*Value returned is.*= .2, 2." \ "finish returned correct value" - - - diff --git a/gdb/testsuite/gdb.arch/i386-avx.exp b/gdb/testsuite/gdb.arch/i386-avx.exp index 3a1d8e8607b..84f763f9eb4 100644 --- a/gdb/testsuite/gdb.arch/i386-avx.exp +++ b/gdb/testsuite/gdb.arch/i386-avx.exp @@ -49,8 +49,8 @@ if {![runto_main]} { } gdb_test "break [gdb_get_line_number "first breakpoint here"]" \ - "Breakpoint .* at .*i386-avx.c.*" \ - "set first breakpoint in main" + "Breakpoint .* at .*i386-avx.c.*" \ + "set first breakpoint in main" gdb_continue_to_breakpoint "continue to first breakpoint in main" if {[is_amd64_regs_target]} { @@ -61,11 +61,11 @@ if {[is_amd64_regs_target]} { for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print \$ymm$r.v8_float" \ - ".. = \\{$r, $r.125, $r.25, $r.375, $r.5, $r.625, $r.75, $r.875\\}.*" \ - "check float contents of %ymm$r" + ".. = \\{$r, $r.125, $r.25, $r.375, $r.5, $r.625, $r.75, $r.875\\}.*" \ + "check float contents of %ymm$r" gdb_test "print \$ymm$r.v32_int8" \ - ".. = \\{(-?\[0-9\]+, ){31}-?\[0-9\]+\\}.*" \ - "check int8 contents of %ymm$r" + ".. = \\{(-?\[0-9\]+, ){31}-?\[0-9\]+\\}.*" \ + "check int8 contents of %ymm$r" } for { set r 0 } { $r < $nr_regs } { incr r } { @@ -73,14 +73,14 @@ for { set r 0 } { $r < $nr_regs } { incr r } { } gdb_test "break [gdb_get_line_number "second breakpoint here"]" \ - "Breakpoint .* at .*i386-avx.c.*" \ - "set second breakpoint in main" + "Breakpoint .* at .*i386-avx.c.*" \ + "set second breakpoint in main" gdb_continue_to_breakpoint "continue to second breakpoint in main" for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print data\[$r\]" \ - ".. = \\{f = \\{[expr {$r + 10}], $r.125, $r.25, $r.375, $r.5, $r.625, $r.75, $r.875\\}\\}.*" \ - "check contents of data\[$r\]" + ".. = \\{f = \\{[expr {$r + 10}], $r.125, $r.25, $r.375, $r.5, $r.625, $r.75, $r.875\\}\\}.*" \ + "check contents of data\[$r\]" } # If testing with a remote protocol target, check that we can diff --git a/gdb/testsuite/gdb.arch/i386-avx512.exp b/gdb/testsuite/gdb.arch/i386-avx512.exp index 675a3c79801..8abf79c97c9 100644 --- a/gdb/testsuite/gdb.arch/i386-avx512.exp +++ b/gdb/testsuite/gdb.arch/i386-avx512.exp @@ -40,11 +40,11 @@ set supports_avx512 0 set test "probe AVX512 support" gdb_test_multiple "print have_avx512()" $test { -re ".. = 1\r\n$gdb_prompt $" { - pass $test - set supports_avx512 1 + pass $test + set supports_avx512 1 } -re ".. = 0\r\n$gdb_prompt $" { - pass $test + pass $test } } @@ -62,8 +62,8 @@ set nr_regs 8 for { set r 1 } { $r < $nr_regs } { incr r } { gdb_test "print/x \$k$r" \ - ".. = 0x[format %x $r]2[format %x $r]1" \ - "check contents of %k$r" + ".. = 0x[format %x $r]2[format %x $r]1" \ + "check contents of %k$r" } for { set r 1 } { $r < $nr_regs } { incr r } { @@ -80,8 +80,8 @@ set nr_regs 7 for { set r 0 } { $r < $nr_regs } { incr r } { set val [expr {$r + 1}] gdb_test "print/x k_data\[$r\]" \ - ".. = 0x$val$val$val$val" \ - "check contents of k_data\[$r\]" + ".. = 0x$val$val$val$val" \ + "check contents of k_data\[$r\]" } gdb_test "break [gdb_get_line_number "third breakpoint here"]" \ @@ -97,23 +97,23 @@ if {[is_amd64_regs_target]} { for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print \$zmm$r.v8_double" \ - ".. = \\{$r, $r.125, $r.25, $r.375, $r.5, $r.625, $r.75, $r.875\\}.*" \ - "check double contents of %zmm$r" + ".. = \\{$r, $r.125, $r.25, $r.375, $r.5, $r.625, $r.75, $r.875\\}.*" \ + "check double contents of %zmm$r" gdb_test "print \$zmm$r.v32_int16" \ - ".. = \\{(-?\[0-9\]+, ){31}-?\[0-9\]+\\}.*" \ - "check int16 contents of %zmm$r" + ".. = \\{(-?\[0-9\]+, ){31}-?\[0-9\]+\\}.*" \ + "check int16 contents of %zmm$r" gdb_test "print \$ymm$r.v4_double" \ - ".. = \\{$r, $r.125, $r.25, $r.375\\}.*" \ - "check float contents of %ymm$r" + ".. = \\{$r, $r.125, $r.25, $r.375\\}.*" \ + "check float contents of %ymm$r" gdb_test "print \$ymm$r.v16_int16" \ - ".. = \\{(-?\[0-9\]+, ){15}-?\[0-9\]+\\}.*" \ - "check int16 contents of %ymm$r" + ".. = \\{(-?\[0-9\]+, ){15}-?\[0-9\]+\\}.*" \ + "check int16 contents of %ymm$r" gdb_test "print \$xmm$r.v2_double" \ - ".. = \\{$r, $r.125\\}.*" \ - "check float contents of %xmm$r" + ".. = \\{$r, $r.125\\}.*" \ + "check float contents of %xmm$r" gdb_test "print \$xmm$r.v8_int16" \ - ".. = \\{(-?\[0-9\]+, ){7}-?\[0-9\]+\\}.*" \ - "check int16 contents of %xmm$r" + ".. = \\{(-?\[0-9\]+, ){7}-?\[0-9\]+\\}.*" \ + "check int16 contents of %xmm$r" } for { set r 0 } { $r < $nr_regs } { incr r } { @@ -134,8 +134,8 @@ gdb_continue_to_breakpoint "continue to fourth breakpoint in main" for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print zmm_data\[$r\]" \ - ".. = \\{f = \\{[expr {$r + 10}], [expr {$r + 10.125}], [expr {$r + 10.25}], [expr {$r + 10.375}], [expr {$r + 10.5}], [expr {$r + 10.625}], [expr {$r +10.75}], [expr {$r + 10.875}]\\}\\}.*" \ - "check contents of zmm_data\[$r\] after writing ZMM regs" + ".. = \\{f = \\{[expr {$r + 10}], [expr {$r + 10.125}], [expr {$r + 10.25}], [expr {$r + 10.375}], [expr {$r + 10.5}], [expr {$r + 10.625}], [expr {$r +10.75}], [expr {$r + 10.875}]\\}\\}.*" \ + "check contents of zmm_data\[$r\] after writing ZMM regs" } for { set r 0 } { $r < $nr_regs } { incr r } { @@ -152,8 +152,8 @@ gdb_continue_to_breakpoint "continue to fifth breakpoint in main" for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print zmm_data\[$r\]" \ - ".. = \\{f = \\{[expr {$r + 20}], [expr {$r + 20.125}], [expr {$r + 20.25}], [expr {$r + 20.375}], [expr {$r + 10.5}], [expr {$r + 10.625}], [expr {$r + 10.75}], [expr {$r + 10.875}]\\}\\}.*" \ - "check contents of zmm_data\[$r\] after writing YMM regs" + ".. = \\{f = \\{[expr {$r + 20}], [expr {$r + 20.125}], [expr {$r + 20.25}], [expr {$r + 20.375}], [expr {$r + 10.5}], [expr {$r + 10.625}], [expr {$r + 10.75}], [expr {$r + 10.875}]\\}\\}.*" \ + "check contents of zmm_data\[$r\] after writing YMM regs" } for { set r 0 } { $r < $nr_regs } { incr r } { @@ -168,8 +168,8 @@ gdb_continue_to_breakpoint "continue to sixth breakpoint in main" for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print zmm_data\[$r\]" \ - ".. = \\{f = \\{[expr {$r + 30}], [expr {$r + 30.125}], [expr {$r + 20.25}], [expr {$r + 20.375}], [expr {$r + 10.5}], [expr {$r + 10.625}], [expr {$r + 10.75}], [expr {$r + 10.875}]\\}\\}.*" \ - "check contents of zmm_data\[$r\] after writing XMM regs" + ".. = \\{f = \\{[expr {$r + 30}], [expr {$r + 30.125}], [expr {$r + 20.25}], [expr {$r + 20.375}], [expr {$r + 10.5}], [expr {$r + 10.625}], [expr {$r + 10.75}], [expr {$r + 10.875}]\\}\\}.*" \ + "check contents of zmm_data\[$r\] after writing XMM regs" } gdb_test "break [gdb_get_line_number "seventh breakpoint here"]" \ diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi-asm.S b/gdb/testsuite/gdb.arch/i386-gnu-cfi-asm.S index 0d66be4bfdd..68ec8b16801 100644 --- a/gdb/testsuite/gdb.arch/i386-gnu-cfi-asm.S +++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi-asm.S @@ -23,10 +23,10 @@ using the following source file: - void *gate (void *(*gate) (void *data), void *data) - { - return 1 + (*gate) (data); - } + void *gate (void *(*gate) (void *data), void *data) + { + return 1 + (*gate) (data); + } Changes are marked as `CHANGE' below. */ diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp index c446faec777..d2bc488a815 100644 --- a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp +++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp @@ -74,8 +74,8 @@ if { $gate_n == "" } { # We see there the original CFI-stored filename `gate.c'. gdb_test "frame $gate_n" \ - "gate \\(\[^()\]*\\) at .*gate.c.*" \ - "shift up to the modified frame" + "gate \\(\[^()\]*\\) at .*gate.c.*" \ + "shift up to the modified frame" gdb_test_multiple "info frame" "existence of the CFI inserted register" { -re "Stack level $gate_n, frame at (0x\[0-9a-f\]+):.*Saved registers:.* ecx at (0x\[0-9a-f\]+),.*" { diff --git a/gdb/testsuite/gdb.arch/i386-pkru.c b/gdb/testsuite/gdb.arch/i386-pkru.c index e2dae9860a3..0d972fdb606 100644 --- a/gdb/testsuite/gdb.arch/i386-pkru.c +++ b/gdb/testsuite/gdb.arch/i386-pkru.c @@ -34,8 +34,8 @@ rdpkru (void) unsigned int pkru; asm volatile (".byte 0x0f,0x01,0xee\n\t" - : "=a" (eax), "=d" (edx) - : "c" (ecx)); + : "=a" (eax), "=d" (edx) + : "c" (ecx)); pkru = eax; return pkru; } @@ -48,7 +48,7 @@ wrpkru (unsigned int pkru) unsigned int edx = 0; asm volatile (".byte 0x0f,0x01,0xef\n\t" - : : "a" (eax), "c" (ecx), "d" (edx)); + : : "a" (eax), "c" (ecx), "d" (edx)); } unsigned int NOINLINE diff --git a/gdb/testsuite/gdb.arch/i386-pkru.exp b/gdb/testsuite/gdb.arch/i386-pkru.exp index 6355c43e528..ad312285fb5 100644 --- a/gdb/testsuite/gdb.arch/i386-pkru.exp +++ b/gdb/testsuite/gdb.arch/i386-pkru.exp @@ -42,11 +42,11 @@ set supports_pkru 0 set test "probe PKRU support" gdb_test_multiple "print have_pkru()" $test { -re ".. = 1\r\n$gdb_prompt $" { - pass $test - set supports_pkru 1 + pass $test + set supports_pkru 1 } -re ".. = 0\r\n$gdb_prompt $" { - pass $test + pass $test } } diff --git a/gdb/testsuite/gdb.arch/i386-prologue.c b/gdb/testsuite/gdb.arch/i386-prologue.c index a340259978b..cc9c9b9fa42 100644 --- a/gdb/testsuite/gdb.arch/i386-prologue.c +++ b/gdb/testsuite/gdb.arch/i386-prologue.c @@ -166,4 +166,3 @@ asm(".text\n" " popl %ebp\n" " leal -4(%eax), %esp\n" " ret\n"); - diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp index bfab6d1c167..d34f4250c8d 100644 --- a/gdb/testsuite/gdb.arch/i386-prologue.exp +++ b/gdb/testsuite/gdb.arch/i386-prologue.exp @@ -216,6 +216,6 @@ gdb_test_multiple "break jump_at_beginning" \ "check jump_at_beginning prologue end" } default { - fail "set breakpoint in jump_at_beginning" + fail "set breakpoint in jump_at_beginning" } } diff --git a/gdb/testsuite/gdb.arch/i386-sse.c b/gdb/testsuite/gdb.arch/i386-sse.c index dfedf12b097..2faabfc4862 100644 --- a/gdb/testsuite/gdb.arch/i386-sse.c +++ b/gdb/testsuite/gdb.arch/i386-sse.c @@ -78,57 +78,57 @@ main (int argc, char **argv) if (have_sse ()) { asm ("movaps 0(%0), %%xmm0\n\t" - "movaps 16(%0), %%xmm1\n\t" - "movaps 32(%0), %%xmm2\n\t" - "movaps 48(%0), %%xmm3\n\t" - "movaps 64(%0), %%xmm4\n\t" - "movaps 80(%0), %%xmm5\n\t" - "movaps 96(%0), %%xmm6\n\t" - "movaps 112(%0), %%xmm7\n\t" - : /* no output operands */ - : "r" (data) - : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"); + "movaps 16(%0), %%xmm1\n\t" + "movaps 32(%0), %%xmm2\n\t" + "movaps 48(%0), %%xmm3\n\t" + "movaps 64(%0), %%xmm4\n\t" + "movaps 80(%0), %%xmm5\n\t" + "movaps 96(%0), %%xmm6\n\t" + "movaps 112(%0), %%xmm7\n\t" + : /* no output operands */ + : "r" (data) + : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"); #ifdef __x86_64__ asm ("movaps 128(%0), %%xmm8\n\t" - "movaps 144(%0), %%xmm9\n\t" - "movaps 160(%0), %%xmm10\n\t" - "movaps 176(%0), %%xmm11\n\t" - "movaps 192(%0), %%xmm12\n\t" - "movaps 208(%0), %%xmm13\n\t" - "movaps 224(%0), %%xmm14\n\t" - "movaps 240(%0), %%xmm15\n\t" - : /* no output operands */ - : "r" (data) - : "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"); + "movaps 144(%0), %%xmm9\n\t" + "movaps 160(%0), %%xmm10\n\t" + "movaps 176(%0), %%xmm11\n\t" + "movaps 192(%0), %%xmm12\n\t" + "movaps 208(%0), %%xmm13\n\t" + "movaps 224(%0), %%xmm14\n\t" + "movaps 240(%0), %%xmm15\n\t" + : /* no output operands */ + : "r" (data) + : "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"); #endif asm ("nop"); /* first breakpoint here */ asm ( - "movaps %%xmm0, 0(%0)\n\t" - "movaps %%xmm1, 16(%0)\n\t" - "movaps %%xmm2, 32(%0)\n\t" - "movaps %%xmm3, 48(%0)\n\t" - "movaps %%xmm4, 64(%0)\n\t" - "movaps %%xmm5, 80(%0)\n\t" - "movaps %%xmm6, 96(%0)\n\t" - "movaps %%xmm7, 112(%0)\n\t" - : /* no output operands */ - : "r" (data) - : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"); + "movaps %%xmm0, 0(%0)\n\t" + "movaps %%xmm1, 16(%0)\n\t" + "movaps %%xmm2, 32(%0)\n\t" + "movaps %%xmm3, 48(%0)\n\t" + "movaps %%xmm4, 64(%0)\n\t" + "movaps %%xmm5, 80(%0)\n\t" + "movaps %%xmm6, 96(%0)\n\t" + "movaps %%xmm7, 112(%0)\n\t" + : /* no output operands */ + : "r" (data) + : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"); #ifdef __x86_64__ asm ( - "movaps %%xmm8, 128(%0)\n\t" - "movaps %%xmm9, 144(%0)\n\t" - "movaps %%xmm10, 160(%0)\n\t" - "movaps %%xmm11, 176(%0)\n\t" - "movaps %%xmm12, 192(%0)\n\t" - "movaps %%xmm13, 208(%0)\n\t" - "movaps %%xmm14, 224(%0)\n\t" - "movaps %%xmm15, 240(%0)\n\t" - : /* no output operands */ - : "r" (data) - : "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"); + "movaps %%xmm8, 128(%0)\n\t" + "movaps %%xmm9, 144(%0)\n\t" + "movaps %%xmm10, 160(%0)\n\t" + "movaps %%xmm11, 176(%0)\n\t" + "movaps %%xmm12, 192(%0)\n\t" + "movaps %%xmm13, 208(%0)\n\t" + "movaps %%xmm14, 224(%0)\n\t" + "movaps %%xmm15, 240(%0)\n\t" + : /* no output operands */ + : "r" (data) + : "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"); #endif puts ("Bye!"); /* second breakpoint here */ diff --git a/gdb/testsuite/gdb.arch/i386-sse.exp b/gdb/testsuite/gdb.arch/i386-sse.exp index ee22b62de61..74f82e4776e 100644 --- a/gdb/testsuite/gdb.arch/i386-sse.exp +++ b/gdb/testsuite/gdb.arch/i386-sse.exp @@ -49,23 +49,23 @@ if {![runto_main]} { send_gdb "print have_sse ()\r" gdb_expect { -re ".. = 1\r\n$gdb_prompt " { - pass "check whether processor supports SSE" + pass "check whether processor supports SSE" } -re ".. = 0\r\n$gdb_prompt " { - verbose "processor does not support SSE; skipping SSE tests" - return + verbose "processor does not support SSE; skipping SSE tests" + return } -re ".*$gdb_prompt $" { - fail "check whether processor supports SSE" + fail "check whether processor supports SSE" } timeout { - fail "check whether processor supports SSE (timeout)" + fail "check whether processor supports SSE (timeout)" } } gdb_test "break [gdb_get_line_number "first breakpoint here"]" \ - "Breakpoint .* at .*i386-sse.c.*" \ - "set first breakpoint in main" + "Breakpoint .* at .*i386-sse.c.*" \ + "set first breakpoint in main" gdb_continue_to_breakpoint "continue to first breakpoint in main" if {[is_amd64_regs_target]} { @@ -76,11 +76,11 @@ if {[is_amd64_regs_target]} { for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print \$xmm$r.v4_float" \ - ".. = \\{$r, $r.25, $r.5, $r.75\\}.*" \ - "check float contents of %xmm$r" + ".. = \\{$r, $r.25, $r.5, $r.75\\}.*" \ + "check float contents of %xmm$r" gdb_test "print \$xmm$r.v16_int8" \ - ".. = \\{(-?\[0-9\]+, ){15}-?\[0-9\]+\\}.*" \ - "check int8 contents of %xmm$r" + ".. = \\{(-?\[0-9\]+, ){15}-?\[0-9\]+\\}.*" \ + "check int8 contents of %xmm$r" } for { set r 0 } { $r < $nr_regs } { incr r } { @@ -88,12 +88,12 @@ for { set r 0 } { $r < $nr_regs } { incr r } { } gdb_test "break [gdb_get_line_number "second breakpoint here"]" \ - "Breakpoint .* at .*i386-sse.c.*" \ - "set second breakpoint in main" + "Breakpoint .* at .*i386-sse.c.*" \ + "set second breakpoint in main" gdb_continue_to_breakpoint "continue to second breakpoint in main" for { set r 0 } { $r < $nr_regs } { incr r } { gdb_test "print data\[$r\]" \ - ".. = \\{f = \\{[expr {$r + 10}], $r.25, $r.5, $r.75\\}\\}.*" \ - "check contents of data\[$r\]" + ".. = \\{f = \\{[expr {$r + 10}], $r.25, $r.5, $r.75\\}\\}.*" \ + "check contents of data\[$r\]" } diff --git a/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp b/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp index ed617fc1384..23ceaecd5e2 100644 --- a/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp +++ b/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp @@ -41,7 +41,7 @@ set match "\nDump of assembler code for function main:\r\n(.*)End of assembler d set test "disassembly without breakpoints" gdb_test_multiple "disass main" $test { -re $match { - set orig $expect_out(1,string) + set orig $expect_out(1,string) pass $test } } @@ -64,7 +64,7 @@ gdb_test "b *($bpt2address + 2)" "Can't insert breakpoint for non-existing slot set test "disassembly with breakpoints" gdb_test_multiple "disass main" $test { -re $match { - set got $expect_out(1,string) + set got $expect_out(1,string) if {[string equal -nocase $orig $got]} { pass $test } else { diff --git a/gdb/testsuite/gdb.arch/insn-reloc.c b/gdb/testsuite/gdb.arch/insn-reloc.c index 32adcb5a488..bd60c4c97e6 100644 --- a/gdb/testsuite/gdb.arch/insn-reloc.c +++ b/gdb/testsuite/gdb.arch/insn-reloc.c @@ -529,12 +529,12 @@ can_relocate_br (void) int ok = 0; asm goto (" adr x0, %l0\n" - "set_point12:\n" - " br x0\n" - : - : - : "x0" - : madejump); + "set_point12:\n" + " br x0\n" + : + : + : "x0" + : madejump); fail (); return; diff --git a/gdb/testsuite/gdb.arch/mips-fpregset-core.c b/gdb/testsuite/gdb.arch/mips-fpregset-core.c index 09d39f057da..8a6a74165c2 100644 --- a/gdb/testsuite/gdb.arch/mips-fpregset-core.c +++ b/gdb/testsuite/gdb.arch/mips-fpregset-core.c @@ -25,8 +25,8 @@ main (void) mips-fpregset-core.f: In function 'main': mips-fpregset-core.f:66:3: error: more than 30 operands in 'asm' - asm ( - ^~~ + asm ( + ^~~ and still have complete 32 FGR coverage with FP64 ABIs. Using a complex type breaks o32 GCC though, so use plain `double' with diff --git a/gdb/testsuite/gdb.arch/mips-fpregset-core.exp b/gdb/testsuite/gdb.arch/mips-fpregset-core.exp index d67cef2f590..575d7f6e104 100644 --- a/gdb/testsuite/gdb.arch/mips-fpregset-core.exp +++ b/gdb/testsuite/gdb.arch/mips-fpregset-core.exp @@ -88,15 +88,15 @@ runto break_here gdb_test_multiple "show mipsfpu" "check for MIPS floating-point coprocessor" { -re "The MIPS floating-point coprocessor\ .*\(absent\|unknown\).*$gdb_prompt $" { - unsupported "no MIPS floating-point coprocessor in the processor" - return + unsupported "no MIPS floating-point coprocessor in the processor" + return } -re "The MIPS floating-point coprocessor .*$gdb_prompt $" { - verbose "MIPS floating-point coprocessor check successful." + verbose "MIPS floating-point coprocessor check successful." } default { - fail - return + fail + return } } diff --git a/gdb/testsuite/gdb.arch/pa-nullify.exp b/gdb/testsuite/gdb.arch/pa-nullify.exp index cb8eeeb7278..eedd802456e 100644 --- a/gdb/testsuite/gdb.arch/pa-nullify.exp +++ b/gdb/testsuite/gdb.arch/pa-nullify.exp @@ -26,8 +26,8 @@ switch -glob -- [istarget] { set testfile "pa64-nullify" } "*" { - unsupported "Skipping hppa nullification tests." - return + unsupported "Skipping hppa nullification tests." + return } } diff --git a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp index 9d88c788908..5c230d41a53 100644 --- a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp +++ b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp @@ -111,4 +111,3 @@ if {$check_r9 - 0x1000000 != $check_r6 + 0xc} { gdb_test "info break" gdb_test "info register r3 r4 r5 r6 r7 r8 r9" gdb_test "disas main" - diff --git a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp index 4e6ee78b9fb..b8c045c228f 100644 --- a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp +++ b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp @@ -44,12 +44,12 @@ proc insert_breakpoint {function expected_location} { # Insert a breakpoint using the given function name, and extract # the breakpoint address for the output. gdb_test_multiple "break $function" "set breakpoint in $function" { - -re "Breakpoint .* at ($hex).*$gdb_prompt $" { - set address $expect_out(1,string) - } - default { - fail "set breakpoint in $function" - } + -re "Breakpoint .* at ($hex).*$gdb_prompt $" { + set address $expect_out(1,string) + } + default { + fail "set breakpoint in $function" + } } # If we managed to get the breakpoing address, then check that @@ -59,8 +59,8 @@ proc insert_breakpoint {function expected_location} { # the instruction). if {$address != ""} { gdb_test "x /i $address" \ - ".*<$function\\+$expected_location>.*" \ - "check $function breakpoint address" + ".*<$function\\+$expected_location>.*" \ + "check $function breakpoint address" } else { fail "unable to compute breakpoint address" } @@ -72,4 +72,3 @@ insert_breakpoint "stack_check_probe_1" 16 insert_breakpoint "stack_check_probe_2" 40 insert_breakpoint "stack_check_probe_loop_1" 68 insert_breakpoint "stack_check_probe_loop_2" 60 - diff --git a/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp index 4d57c8777b7..b2d8d94f554 100644 --- a/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp +++ b/gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp @@ -50,4 +50,3 @@ gdb_test "set architecture $arch2" \ gdb_test "show disassembler-options" \ "The current disassembler options are '$option'.*" \ "show disassembler-options $option after set arch $arch2" - diff --git a/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp b/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp index 456833e662a..f6773fdf40e 100644 --- a/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp +++ b/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp @@ -323,4 +323,3 @@ with_test_prefix "after transaction failure" { test_register_match "vs$i.uint128" "cvs$i" 1 } } - diff --git a/gdb/testsuite/gdb.arch/powerpc-lnia.exp b/gdb/testsuite/gdb.arch/powerpc-lnia.exp index c317465c9ea..71f0235aff6 100644 --- a/gdb/testsuite/gdb.arch/powerpc-lnia.exp +++ b/gdb/testsuite/gdb.arch/powerpc-lnia.exp @@ -107,4 +107,3 @@ gdb_test "disas main" # Let the inferior store all vector registers in a buffer, then dump # the buffer and check it. - diff --git a/gdb/testsuite/gdb.arch/powerpc-plxv-nonrel.exp b/gdb/testsuite/gdb.arch/powerpc-plxv-nonrel.exp index ef6e1ff3947..5e055138740 100644 --- a/gdb/testsuite/gdb.arch/powerpc-plxv-nonrel.exp +++ b/gdb/testsuite/gdb.arch/powerpc-plxv-nonrel.exp @@ -125,4 +125,3 @@ if {$check_vs7 != $vs7_expected} { gdb_test "info break" gdb_test "info register vs4 vs5 vs6 vs7 " gdb_test "disas main #2" - diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp index 4682cb9453b..f1c137603b7 100644 --- a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp +++ b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp @@ -34,5 +34,5 @@ if {![runto bar]} { } gdb_test "bt" \ - "#0\[ \t\]*$hex in bar.*\r\n#1\[ \t\]*$hex in foo.*\r\n#2\[ \t\]*$hex in main.*" \ - "Backtrace to the main frame" + "#0\[ \t\]*$hex in bar.*\r\n#1\[ \t\]*$hex in foo.*\r\n#2\[ \t\]*$hex in main.*" \ + "Backtrace to the main frame" diff --git a/gdb/testsuite/gdb.arch/powerpc-trap.exp b/gdb/testsuite/gdb.arch/powerpc-trap.exp index 04d76f50378..fb9e743d9b6 100644 --- a/gdb/testsuite/gdb.arch/powerpc-trap.exp +++ b/gdb/testsuite/gdb.arch/powerpc-trap.exp @@ -58,7 +58,7 @@ while {$keep_going} { incr count if {$count < $expected_traps} { - set keep_going 1 + set keep_going 1 } } } diff --git a/gdb/testsuite/gdb.arch/powerpc64-prologue.exp b/gdb/testsuite/gdb.arch/powerpc64-prologue.exp index a5401a39969..da1058464e4 100644 --- a/gdb/testsuite/gdb.arch/powerpc64-prologue.exp +++ b/gdb/testsuite/gdb.arch/powerpc64-prologue.exp @@ -75,4 +75,3 @@ gdb_test "backtrace 10" \ gdb_test "info frame" \ ".*Saved registers:.*r30 at.*pc at.*lr at.*" \ "saved registers in optimized" - diff --git a/gdb/testsuite/gdb.arch/ppc-longdouble.exp b/gdb/testsuite/gdb.arch/ppc-longdouble.exp index 739e36f2a2e..f5d8743fec9 100644 --- a/gdb/testsuite/gdb.arch/ppc-longdouble.exp +++ b/gdb/testsuite/gdb.arch/ppc-longdouble.exp @@ -25,13 +25,13 @@ proc do_test { name {opts {}} } { # We get this warning even with the nowarnings option ... regsub -all "(^|\n)\[^\n\]*using \[^\n\]* extended precision long double" $lines "" lines if {$lines != ""} { - return + return } clean_restart ${::testfile}.${name} if {![runto_main]} { - return + return } # Run to the breakpoint at return. @@ -52,4 +52,3 @@ proc do_test { name {opts {}} } { do_test default { -mfloat128 } do_test ieee128 { -mfloat128 -mabi=ieeelongdouble } do_test ibm128 { -mfloat128 -mabi=ibmlongdouble } - diff --git a/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.c b/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.c index 0f19080507c..216020a752c 100644 --- a/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.c +++ b/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.c @@ -33,7 +33,7 @@ main (int argc, char *argv[], char *envp[], auxv_t auxv[]) for (i = 0; auxv[i].a_type != AT_NULL; i++) if (auxv[i].a_type == AT_HWCAP2) { if (!(auxv[i].a_un.a_val & PPC_FEATURE2_ARCH_2_07)) - return 1; + return 1; break; } diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.c b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.c index 20af5418324..90f54fb932c 100644 --- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.c +++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.c @@ -27,4 +27,3 @@ main () { return foo (); } - diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp index 219feafd8f8..1a7f6007264 100644 --- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp +++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-ld-lw.exp @@ -33,9 +33,9 @@ gdb_breakpoint "bar" gdb_continue_to_breakpoint "bar" gdb_test "bt" \ [multi_line \ - "#0\[ \t\]*$hex in bar \\\(\\\)" \ - "#1\[ \t\]*$hex in foo \\\(\\\)" \ - "#2\[ \t\]*$hex in main \\\(\\\)"] \ + "#0\[ \t\]*$hex in bar \\\(\\\)" \ + "#1\[ \t\]*$hex in foo \\\(\\\)" \ + "#2\[ \t\]*$hex in main \\\(\\\)"] \ "Backtrace to the main frame" gdb_test "finish" "foo \\\(\\\)" "finish bar" gdb_test "finish" "main \\\(\\\)" "finish foo" diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.c b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.c index dd8b67696d2..2299ba0b123 100644 --- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.c +++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.c @@ -26,4 +26,3 @@ main () { return foo (); } - diff --git a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp index aa749728945..15d25efe5e5 100644 --- a/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp +++ b/gdb/testsuite/gdb.arch/riscv64-unwind-prologue-with-mv.exp @@ -33,9 +33,9 @@ gdb_breakpoint "bar" gdb_continue_to_breakpoint "bar" gdb_test "bt" \ [multi_line \ - "#0\[ \t\]*$hex in bar \\\(\\\)" \ - "#1\[ \t\]*$hex in foo \\\(\\\)" \ - "#2\[ \t\]*$hex in main \\\(\\\)"] \ + "#0\[ \t\]*$hex in bar \\\(\\\)" \ + "#1\[ \t\]*$hex in foo \\\(\\\)" \ + "#2\[ \t\]*$hex in main \\\(\\\)"] \ "Backtrace to the main frame" gdb_test "finish" "foo \\\(\\\)" "finish bar" gdb_test "finish" "main \\\(\\\)" "finish foo" diff --git a/gdb/testsuite/gdb.arch/sparc64-adi.c b/gdb/testsuite/gdb.arch/sparc64-adi.c index 44051167778..3c3a195fa1f 100644 --- a/gdb/testsuite/gdb.arch/sparc64-adi.c +++ b/gdb/testsuite/gdb.arch/sparc64-adi.c @@ -95,7 +95,7 @@ int main () if (fd < 0) exit(1); char *maddr = (char *)mmap (NULL, MAPSIZE, PROT_READ|PROT_WRITE, - MAP_PRIVATE, fd, 0); + MAP_PRIVATE, fd, 0); if (maddr == (char *)-1) exit(1); /* Enable ADI. */ diff --git a/gdb/testsuite/gdb.arch/sparc64-adi.exp b/gdb/testsuite/gdb.arch/sparc64-adi.exp index 40a8eab1456..874d8378295 100644 --- a/gdb/testsuite/gdb.arch/sparc64-adi.exp +++ b/gdb/testsuite/gdb.arch/sparc64-adi.exp @@ -23,7 +23,7 @@ require {istarget "sparc64*-*-linux*"} standard_testfile if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ - [list debug libs=-ladi]] } { + [list debug libs=-ladi]] } { return -1 } @@ -32,8 +32,8 @@ if {![runto_main]} { } gdb_test "break [gdb_get_line_number "line breakpoint here"]" \ - "Breakpoint .* at .*${srcfile}.*" \ - "set line breakpoint in main" + "Breakpoint .* at .*${srcfile}.*" \ + "set line breakpoint in main" gdb_continue_to_breakpoint "continue to line breakpoint in main" ########################################## @@ -41,9 +41,9 @@ set newadi "7" gdb_test "adi x shmaddr" "${hex}00:\t0" "examine ADI" gdb_test_no_output "adi a/100 shmaddr=${newadi}" "assign ADI" gdb_test "adi x/100 shmaddr" "${hex}00:\t${newadi} ${newadi}" \ - "examine new ADI" + "examine new ADI" gdb_test_no_output "adi a/100 shmaddr=0x0" "reset ADI" gdb_test "continue" \ - [multi_line "Program received signal SIGSEGV, Segmentation fault.*" \ - "ADI precise mismatch while accessing address $hex.*" ] \ + [multi_line "Program received signal SIGSEGV, Segmentation fault.*" \ + "ADI precise mismatch while accessing address $hex.*" ] \ "continue to sigsegv" diff --git a/gdb/testsuite/gdb.arch/sparc64-regs.exp b/gdb/testsuite/gdb.arch/sparc64-regs.exp index f5b73092694..9106b908b69 100644 --- a/gdb/testsuite/gdb.arch/sparc64-regs.exp +++ b/gdb/testsuite/gdb.arch/sparc64-regs.exp @@ -37,8 +37,8 @@ gdb_test "si" "wr .*" "single step to the first %ccr test" proc test_ccr {exp_value exp_text {exp_insn "wr .*"}} { gdb_test "info register ccr" \ - "ccr $exp_value .*$exp_text.*" \ - "check %ccr register value equal to $exp_text" + "ccr $exp_value .*$exp_text.*" \ + "check %ccr register value equal to $exp_text" gdb_test "si" "$exp_insn" "single step to a next %ccr test after $exp_text" } @@ -85,8 +85,8 @@ gdb_test "continue" "Continuing.*" proc test_fsr {exp_value exp_text} { gdb_test "info register fsr" \ - "fsr $exp_value .*$exp_text.*" \ - "check %fsr register value equal to $exp_text" + "fsr $exp_value .*$exp_text.*" \ + "check %fsr register value equal to $exp_text" gdb_test "si" "stx .*" "single step to a next %fsr test (I.) after $exp_text" gdb_test "si" "ldx .*" "single step to a next %fsr test (II.) after $exp_text" diff --git a/gdb/testsuite/gdb.arch/thumb-singlestep.exp b/gdb/testsuite/gdb.arch/thumb-singlestep.exp index 88fe49b4612..ffe5440972b 100644 --- a/gdb/testsuite/gdb.arch/thumb-singlestep.exp +++ b/gdb/testsuite/gdb.arch/thumb-singlestep.exp @@ -33,4 +33,3 @@ if {![runto_main]} { # pass instruction "push". gdb_test "si" "blx foo.*" "single step" gdb_test "si" "foo \\(\\) at .*${srcfile}.*mov r0,#42.*" "step into foo" - diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp index a6ecbfdd67c..ec352a9de44 100644 --- a/gdb/testsuite/gdb.arch/vsx-regs.exp +++ b/gdb/testsuite/gdb.arch/vsx-regs.exp @@ -105,9 +105,9 @@ for {set i 0} {$i < 32} {incr i 1} { # 2: Set VS0~VS31 registers and check if it reflects on F0~F31. for {set i 0} {$i < 32} {incr i 1} { - for {set j 0} {$j < 4} {incr j 1} { - gdb_test_no_output "set \$vs$i.v4_int32\[$j\] = 0xdeadbeef" - } + for {set j 0} {$j < 4} {incr j 1} { + gdb_test_no_output "set \$vs$i.v4_int32\[$j\] = 0xdeadbeef" + } } for {set i 0} {$i < 32} {incr i 1} { @@ -122,9 +122,9 @@ for {set i 0} {$i < 32} {incr i 1} { # 1: Set VR0~VR31 registers and check if it reflects on VS32~VS63. for {set i 0} {$i < 32} {incr i 1} { - for {set j 0} {$j < 4} {incr j 1} { - gdb_test_no_output "set \$vr$i.v4_int32\[$j\] = 1" - } + for {set j 0} {$j < 4} {incr j 1} { + gdb_test_no_output "set \$vr$i.v4_int32\[$j\] = 1" + } } for {set i 32} {$i < 64} {incr i 1} { @@ -132,9 +132,9 @@ for {set i 32} {$i < 64} {incr i 1} { } # 2: Set VS32~VS63 registers and check if it reflects on VR0~VR31. for {set i 32} {$i < 64} {incr i 1} { - for {set j 0} {$j < 4} {incr j 1} { - gdb_test_no_output "set \$vs$i.v4_int32\[$j\] = 1" - } + for {set j 0} {$j < 4} {incr j 1} { + gdb_test_no_output "set \$vs$i.v4_int32\[$j\] = 1" + } } for {set i 0} {$i < 32} {incr i 1} { @@ -164,9 +164,9 @@ for {set i 0} {$i < 32} {incr i 1} { # 2: Set VR0~VR31 registers and check if it reflects on F32~F63. for {set i 0} {$i < 32} {incr i 1} { - for {set j 0} {$j < 4} {incr j 1} { - gdb_test_no_output "set \$vr$i.v4_int32\[$j\] = 0xdeadbeef" - } + for {set j 0} {$j < 4} {incr j 1} { + gdb_test_no_output "set \$vr$i.v4_int32\[$j\] = 0xdeadbeef" + } } for {set i 32} {$i < 64} {incr i 1} { diff --git a/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp b/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp index 76c38ff2a79..b91c14c45ef 100644 --- a/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp +++ b/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp @@ -75,6 +75,3 @@ if {$endianness == "big"} { gdb_test "p/f \$vs1" "$vector_field" gdb_exit - - - diff --git a/gdb/testsuite/gdb.asm/aarch64.inc b/gdb/testsuite/gdb.asm/aarch64.inc index 0144cdca9db..4bd86dbf606 100644 --- a/gdb/testsuite/gdb.asm/aarch64.inc +++ b/gdb/testsuite/gdb.asm/aarch64.inc @@ -31,4 +31,3 @@ .macro gdbasm_startup mov x0, sp .endm - diff --git a/gdb/testsuite/gdb.asm/arm.inc b/gdb/testsuite/gdb.asm/arm.inc index 65502277bfd..0f49a7b1655 100644 --- a/gdb/testsuite/gdb.asm/arm.inc +++ b/gdb/testsuite/gdb.asm/arm.inc @@ -32,4 +32,3 @@ mov fp, #0 mov r7, #0 .endm - diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index eb96c19e063..79f8dbd2643 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -31,53 +31,53 @@ set obj_include -I[host_standard_output_file {}] switch -glob -- [istarget] { "alpha*-*-*" { - set asm-arch alpha + set asm-arch alpha # ??? Won't work with ecoff systems like Tru64, but then we also # don't have any other -g flag that creates mdebug output. - set asm-flags "-no-mdebug -I${srcdir}/${subdir} $obj_include" + set asm-flags "-no-mdebug -I${srcdir}/${subdir} $obj_include" set debug-flags "-gdwarf-2" } "arm*-*-*" { - set asm-arch arm + set asm-arch arm } "aarch64*-*-*" { set asm-arch aarch64 } "bfin-*-*" { - set asm-arch bfin + set asm-arch bfin } "frv-*-*" { set asm-arch frv } "s390-*-*" { - set asm-arch s390 + set asm-arch s390 } "s390x-*-*" { - set asm-arch s390x + set asm-arch s390x } "x86_64-*-*" { - set asm-arch x86_64 + set asm-arch x86_64 set debug-flags "-gdwarf-2" } "i\[3456\]86-*-*" { - set asm-arch i386 + set asm-arch i386 } "lm32-*" { - set asm-arch lm32 + set asm-arch lm32 } "m32r*-linux*" { - set asm-arch m32r-linux + set asm-arch m32r-linux } "m32c-*-*" { - set asm-arch m32c + set asm-arch m32c } "m32r*-*" { - set asm-arch m32r - append link-flags "--whole-archive -lgloss --no-whole-archive" + set asm-arch m32r + append link-flags "--whole-archive -lgloss --no-whole-archive" } "m6811-*-*" { - set asm-arch m68hc11 - set asm-flags "-mshort-double -m68hc11 --no-warn -I${srcdir}/${subdir} $obj_include" + set asm-arch m68hc11 + set asm-flags "-mshort-double -m68hc11 --no-warn -I${srcdir}/${subdir} $obj_include" set debug-flags "-gdwarf-2" # This asm test is specific and uses the linker directly. # We must not use the target board linker script defined for other @@ -87,8 +87,8 @@ switch -glob -- [istarget] { unset_board_info "ldscript" } "m6812-*-*" { - set asm-arch m68hc11 - set asm-flags "-mshort-double -m68hc12 --no-warn -I${srcdir}/${subdir} $obj_include" + set asm-arch m68hc11 + set asm-flags "-mshort-double -m68hc12 --no-warn -I${srcdir}/${subdir} $obj_include" set debug-flags "-gdwarf-2" # This asm test is specific and uses the linker directly. # We must not use the target board linker script defined for other @@ -98,65 +98,65 @@ switch -glob -- [istarget] { set_board_info ldscript "" } "mips*-*" { - set asm-arch mips + set asm-arch mips } "powerpc64le-*" { - set asm-arch powerpc64le - set asm-flags "-a64 -I${srcdir}/${subdir} $obj_include" - append link-flags " -m elf64lppc" + set asm-arch powerpc64le + set asm-flags "-a64 -I${srcdir}/${subdir} $obj_include" + append link-flags " -m elf64lppc" } "powerpc*-*" { - if { [is_lp64_target] } { - set asm-arch powerpc64 - set asm-flags "-a64 -I${srcdir}/${subdir} $obj_include" - append link-flags " -m elf64ppc" - } else { - set asm-arch powerpc - set asm-flags "-a32 -I${srcdir}/${subdir} $obj_include" - append link-flags " -m elf32ppc" - } + if { [is_lp64_target] } { + set asm-arch powerpc64 + set asm-flags "-a64 -I${srcdir}/${subdir} $obj_include" + append link-flags " -m elf64ppc" + } else { + set asm-arch powerpc + set asm-flags "-a32 -I${srcdir}/${subdir} $obj_include" + append link-flags " -m elf32ppc" + } } "sh*-*-*" { - set asm-arch sh + set asm-arch sh set debug-flags "-gdwarf-2" } "sparc-*-*" { - set asm-arch sparc + set asm-arch sparc } "sparc64-*-*" { - set asm-arch sparc64 - set asm-flags "-xarch=v9 -I${srcdir}/${subdir} $obj_include" + set asm-arch sparc64 + set asm-flags "-xarch=v9 -I${srcdir}/${subdir} $obj_include" set debug-flags "-gdwarf-2" } "xstormy16-*-*" { - set asm-arch xstormy16 + set asm-arch xstormy16 set debug-flags "-gdwarf-2" } "v850-*-*" { - set asm-arch v850 - set gdb_wrapper_initialized 1 + set asm-arch v850 + set gdb_wrapper_initialized 1 } "m68k-*-*" { - set asm-arch m68k + set asm-arch m68k } "ia64-*-*" { - set asm-arch ia64 + set asm-arch ia64 set debug-flags "-gdwarf-2" } "iq2000-*-*" { - set asm-arch iq2000 + set asm-arch iq2000 } "hppa*-linux-*" { - set asm-arch pa + set asm-arch pa set debug-flags "-gdwarf-2" } "hppa-*-openbsd*" { - set asm-arch pa + set asm-arch pa set debug-flags "-gdwarf-2" } "h83*-*" { set asm-arch h8300 - set debug-flags "-gdwarf-2" + set debug-flags "-gdwarf-2" } } @@ -317,17 +317,17 @@ gdb_test_multiple "info target" "info target" { set entry_symbol "" gdb_test_multiple "info symbol 0x$entry_point" "info symbol" { -re "info symbol 0x$entry_point\[\r\n\]+(\[^\r\n\]*) in section .*$gdb_prompt $" { - # We match the echoed `info symbol' command here, to help us - # reliably identify the beginning of the start symbol in the - # command's output. You might think we could just use '^' to - # start matching at the beginning of the line, but - # unfortunately, in Expect, '^' matches the beginning of the - # input that hasn't been matched by any expect clause yet. If - # every expect clause consumes a complete line, along with its - # terminating CR/LF, this is equivalent to the beginning of a - # line. But expect clauses that end with `.*' will consume as - # much as happened to arrive from the TTY --- exactly where - # they leave you depends on inter-process timing. :( + # We match the echoed `info symbol' command here, to help us + # reliably identify the beginning of the start symbol in the + # command's output. You might think we could just use '^' to + # start matching at the beginning of the line, but + # unfortunately, in Expect, '^' matches the beginning of the + # input that hasn't been matched by any expect clause yet. If + # every expect clause consumes a complete line, along with its + # terminating CR/LF, this is equivalent to the beginning of a + # line. But expect clauses that end with `.*' will consume as + # much as happened to arrive from the TTY --- exactly where + # they leave you depends on inter-process timing. :( set entry_symbol $expect_out(1,string) pass "info symbol" } @@ -377,11 +377,11 @@ gdb_test "info source" \ # again as well as the statement after. gdb_test_multiple "finish" "finish from foo3" { -re "Run till exit from.*\[\r\n\]$line_call_foo3\[ \t\]+gdbasm_call foo3.*$gdb_prompt $" { - pass "finish from foo3" - gdb_test "s" ".*" "s after finish" + pass "finish from foo3" + gdb_test "s" ".*" "s after finish" } -re "Run till exit from.*\[\r\n\]$line_call_foo3_again\[ \t\]+gdbasm_call foo3.*$gdb_prompt $" { - pass "finish from foo3" + pass "finish from foo3" } } @@ -398,22 +398,22 @@ set seen_asmsrc_1 0 set seen_asmsrc_2 0 gdb_test_multiple "info sources" "info sources" { -re "^\[^,\]*asmsrc1.s(, |\[\r\n\]+)" { - set seen_asmsrc_1 1 - exp_continue + set seen_asmsrc_1 1 + exp_continue } -re "^\[^,\]*asmsrc2.s(, |\[\r\n\]+)" { - set seen_asmsrc_2 1 - exp_continue + set seen_asmsrc_2 1 + exp_continue } -re ", " { - exp_continue + exp_continue } -re "$gdb_prompt $" { - if {$seen_asmsrc_1 && $seen_asmsrc_2} { - pass "info sources" - } else { - fail "info sources" - } + if {$seen_asmsrc_1 && $seen_asmsrc_2} { + pass "info sources" + } else { + fail "info sources" + } } } @@ -430,15 +430,15 @@ gdb_test "next" "$line_foo2_leave\[ \t\]+gdbasm_leave" "next over foo3" # line again or the statement after, depending on the architecture. gdb_test_multiple "return" "return from foo2" { -re "Make (foo2|selected stack frame) return now\\? .y or n. " { - send_gdb "y\n" - exp_continue + send_gdb "y\n" + exp_continue } -re "\#0.*main .*$line_call_foo2\[ \t\]+gdbasm_call foo2.*$gdb_prompt $" { - pass "return from foo2" - gdb_test "s" ".*" "s after return" + pass "return from foo2" + gdb_test "s" ".*" "s after return" } -re "\#0.*main .*$line_main_exit\[ \t\]+gdbasm_exit0.*$gdb_prompt $" { - pass "return from foo2" + pass "return from foo2" } } diff --git a/gdb/testsuite/gdb.asm/iq2000.inc b/gdb/testsuite/gdb.asm/iq2000.inc index f421ea0080a..426f83e9f64 100644 --- a/gdb/testsuite/gdb.asm/iq2000.inc +++ b/gdb/testsuite/gdb.asm/iq2000.inc @@ -38,4 +38,3 @@ andi %0, %0, 0 addiu %29, %0, 0xffc .endm - diff --git a/gdb/testsuite/gdb.asm/m32c.inc b/gdb/testsuite/gdb.asm/m32c.inc index 7925e77539c..6f734bb02b5 100644 --- a/gdb/testsuite/gdb.asm/m32c.inc +++ b/gdb/testsuite/gdb.asm/m32c.inc @@ -22,12 +22,11 @@ comment "exit (0)" .macro gdbasm_exit0 mov.w #0, r1 - mov.b #1, r0l + mov.b #1, r0l ste.b r0l,0xe0000 .endm comment "crt0 startup" .macro gdbasm_startup - ldc #0xfc00, sp + ldc #0xfc00, sp .endm - diff --git a/gdb/testsuite/gdb.asm/openbsd.inc b/gdb/testsuite/gdb.asm/openbsd.inc index 39690917c11..7c58637d252 100644 --- a/gdb/testsuite/gdb.asm/openbsd.inc +++ b/gdb/testsuite/gdb.asm/openbsd.inc @@ -1,6 +1,6 @@ comment "openbsd .note" - .section ".note.openbsd.ident", "a" + .section ".note.openbsd.ident", "a" .p2align 2 .long 8 diff --git a/gdb/testsuite/gdb.asm/pa64.inc b/gdb/testsuite/gdb.asm/pa64.inc index a8aafcd472c..41dd2bc7815 100644 --- a/gdb/testsuite/gdb.asm/pa64.inc +++ b/gdb/testsuite/gdb.asm/pa64.inc @@ -43,4 +43,3 @@ \name: .long \value .endm - diff --git a/gdb/testsuite/gdb.asm/s390.inc b/gdb/testsuite/gdb.asm/s390.inc index 16f1a7cc4d0..5c6f66236c4 100644 --- a/gdb/testsuite/gdb.asm/s390.inc +++ b/gdb/testsuite/gdb.asm/s390.inc @@ -8,7 +8,7 @@ # Reserve space for the standard stack frame: # back chain, and space for the callee to save its registers. ahi %r15,-104 - + # Zero this frame's back chain pointer. xc 0(4,%r15),0(%r15) .endm diff --git a/gdb/testsuite/gdb.asm/s390x.inc b/gdb/testsuite/gdb.asm/s390x.inc index 1fe3dec6fdf..abecf4f0dff 100644 --- a/gdb/testsuite/gdb.asm/s390x.inc +++ b/gdb/testsuite/gdb.asm/s390x.inc @@ -8,7 +8,7 @@ # Reserve space for the standard stack frame: # back chain, and space for the callee to save its registers. aghi %r15,-168 - + # Zero this frame's back chain pointer. xc 0(8,%r15),0(%r15) .endm diff --git a/gdb/testsuite/gdb.asm/sparc.inc b/gdb/testsuite/gdb.asm/sparc.inc index 916a9e0e794..3c23dd50386 100644 --- a/gdb/testsuite/gdb.asm/sparc.inc +++ b/gdb/testsuite/gdb.asm/sparc.inc @@ -31,4 +31,3 @@ .macro gdbasm_startup clr %fp .endm - diff --git a/gdb/testsuite/gdb.asm/sparc64.inc b/gdb/testsuite/gdb.asm/sparc64.inc index fb2253e0c39..b4631506877 100644 --- a/gdb/testsuite/gdb.asm/sparc64.inc +++ b/gdb/testsuite/gdb.asm/sparc64.inc @@ -31,4 +31,3 @@ .macro gdbasm_startup clr %fp .endm - diff --git a/gdb/testsuite/gdb.asm/v850.inc b/gdb/testsuite/gdb.asm/v850.inc index 87977919f0c..93a85e5b0b1 100644 --- a/gdb/testsuite/gdb.asm/v850.inc +++ b/gdb/testsuite/gdb.asm/v850.inc @@ -38,4 +38,3 @@ ori 65535, r0, r21 movhi 32, r0, sp .endm - diff --git a/gdb/testsuite/gdb.asm/xstormy16.inc b/gdb/testsuite/gdb.asm/xstormy16.inc index 7aea1b9678d..7caa35a3a06 100644 --- a/gdb/testsuite/gdb.asm/xstormy16.inc +++ b/gdb/testsuite/gdb.asm/xstormy16.inc @@ -31,4 +31,3 @@ .macro gdbasm_startup mov r15,#8 .endm - diff --git a/gdb/testsuite/gdb.base/advance.c b/gdb/testsuite/gdb.base/advance.c index d6b22d71f41..55e181dafb0 100644 --- a/gdb/testsuite/gdb.base/advance.c +++ b/gdb/testsuite/gdb.base/advance.c @@ -49,4 +49,3 @@ main () result = bar (b + foo (c)); return 0; /* advance malformed */ } - diff --git a/gdb/testsuite/gdb.base/advance.exp b/gdb/testsuite/gdb.base/advance.exp index 2051e9fb55c..3239b66346a 100644 --- a/gdb/testsuite/gdb.base/advance.exp +++ b/gdb/testsuite/gdb.base/advance.exp @@ -75,4 +75,3 @@ gdb_test "advance foo" \ gdb_test "advance" \ "Argument required \\(a location\\)."\ "advance with no argument" - diff --git a/gdb/testsuite/gdb.base/all-bin.exp b/gdb/testsuite/gdb.base/all-bin.exp index d910965f7e9..ac2e4984e4d 100644 --- a/gdb/testsuite/gdb.base/all-bin.exp +++ b/gdb/testsuite/gdb.base/all-bin.exp @@ -166,8 +166,3 @@ gdb_test "print v_int && v_float" " = $true" "print value of v_int&&v_float" gdb_test "print v_int && v_double" " = $false" \ "print value of v_int&&v_double" - - - - - diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c index 5f77a2f033c..b7cf98eeceb 100644 --- a/gdb/testsuite/gdb.base/annota1.c +++ b/gdb/testsuite/gdb.base/annota1.c @@ -31,4 +31,3 @@ main (void) return 0; /* after loop */ } - diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index 0da5a09930a..56708c94d75 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -434,8 +434,8 @@ set y_or_n [string_to_regexp "(y or n)"] send_gdb "run\n" gdb_expect { -re "pre-query.*already.*$y_or_n.*query\r\n" { - send_gdb "y\n" - gdb_expect { + send_gdb "y\n" + gdb_expect { -re ".*post-query.*$gdb_prompt$" \ { pass "re-run" } -re ".*$gdb_prompt$" { fail "re-run" } diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c index 5f77a2f033c..b7cf98eeceb 100644 --- a/gdb/testsuite/gdb.base/annota3.c +++ b/gdb/testsuite/gdb.base/annota3.c @@ -31,4 +31,3 @@ main (void) return 0; /* after loop */ } - diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp index 9d94be90aff..62f1d4365a4 100644 --- a/gdb/testsuite/gdb.base/annota3.exp +++ b/gdb/testsuite/gdb.base/annota3.exp @@ -78,7 +78,7 @@ gdb_test_multiple "if 1" "start if construct" { gdb_test_multiple "end" "end if construct" { -re "^end\r\n\r\n\032\032post-commands\r\n$gdb_prompt$" { - pass "end if construct" + pass "end if construct" } } @@ -264,8 +264,8 @@ if {![is_remote host]} { send_gdb "run\n" gdb_expect { -re "pre-query.*already.*\\(y or n\\).*query\r\n" { - send_gdb "y\n" - gdb_expect { + send_gdb "y\n" + gdb_expect { -re ".*post-query.*$gdb_prompt$" \ { pass "re-run" } -re ".*$gdb_prompt$" { fail "re-run" } diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp index 757ce9231b2..cd862d8b1cd 100644 --- a/gdb/testsuite/gdb.base/arrayidx.exp +++ b/gdb/testsuite/gdb.base/arrayidx.exp @@ -34,27 +34,25 @@ if {![runto_main]} { # First, print the array without the indexes gdb_test_no_output "set print array-indexes off" \ - "set print array-indexes to off" + "set print array-indexes to off" gdb_test "show print array-indexes" \ - "Printing of array indexes is off\\." \ - "show print array-indexes is off" + "Printing of array indexes is off\\." \ + "show print array-indexes is off" gdb_test "print array" \ - "\\{1, 2, 3, 4\\}" \ - "print array with array-indexes off" + "\\{1, 2, 3, 4\\}" \ + "print array with array-indexes off" # Second, print the same array with the indexes gdb_test_no_output "set print array-indexes on" \ - "set print array-indexes to on" + "set print array-indexes to on" gdb_test "show print array-indexes" \ - "Printing of array indexes is on\\." \ - "show print array-indexes is on" + "Printing of array indexes is on\\." \ + "show print array-indexes is on" gdb_test "print array" \ - "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \ - "print array with array-indexes on" - - + "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \ + "print array with array-indexes on" diff --git a/gdb/testsuite/gdb.base/async.exp b/gdb/testsuite/gdb.base/async.exp index 2f3ee9f809e..5ce8f5097f7 100644 --- a/gdb/testsuite/gdb.base/async.exp +++ b/gdb/testsuite/gdb.base/async.exp @@ -48,7 +48,7 @@ proc test_background {command before_prompt after_prompt {message ""}} { global gdb_prompt if {$message eq ""} { - set message $command + set message $command } send_gdb "$command\n" diff --git a/gdb/testsuite/gdb.base/attach2.c b/gdb/testsuite/gdb.base/attach2.c index d070d933b08..2da48881269 100644 --- a/gdb/testsuite/gdb.base/attach2.c +++ b/gdb/testsuite/gdb.base/attach2.c @@ -18,7 +18,7 @@ int main () /* Cannot sleep a very long time, as attach.exp assumes the process will exit before the standard GDB timeout. */ sleep( 10 ); /* System call causes register fetch to fail */ - /* This is a known HPUX "feature" */ + /* This is a known HPUX "feature" */ while (! should_exit) { local_i++; diff --git a/gdb/testsuite/gdb.base/attach3.c b/gdb/testsuite/gdb.base/attach3.c index 09a6d886df9..0882e43d1f3 100644 --- a/gdb/testsuite/gdb.base/attach3.c +++ b/gdb/testsuite/gdb.base/attach3.c @@ -16,7 +16,7 @@ int main () int local_i = 0; sleep( 60 ); /* System call causes register fetch to fail */ - /* This is a known HPUX "feature" */ + /* This is a known HPUX "feature" */ while (! should_exit) { local_i++; diff --git a/gdb/testsuite/gdb.base/auto-connect-native-target.c b/gdb/testsuite/gdb.base/auto-connect-native-target.c index 926ccf1ceb3..23048cb6458 100644 --- a/gdb/testsuite/gdb.base/auto-connect-native-target.c +++ b/gdb/testsuite/gdb.base/auto-connect-native-target.c @@ -20,4 +20,3 @@ main () { return 0; } - diff --git a/gdb/testsuite/gdb.base/average.c b/gdb/testsuite/gdb.base/average.c index 1a8086bd269..b99dcf49629 100644 --- a/gdb/testsuite/gdb.base/average.c +++ b/gdb/testsuite/gdb.base/average.c @@ -11,12 +11,12 @@ static int my_list[num] = {3,4,2,0,2,1,8,3,6,7}; void print_average(int *list, int low, int high) { - int total = 0, num_elements = 0, average = 0; - total = sum(list, low, high); - num_elements = high - low; /* note this is an off-by-one bug */ + int total = 0, num_elements = 0, average = 0; + total = sum(list, low, high); + num_elements = high - low; /* note this is an off-by-one bug */ - average = total / num_elements; - printf("%10.d\n", average); + average = total / num_elements; + printf("%10.d\n", average); } int main(void) diff --git a/gdb/testsuite/gdb.base/bfd-errors.exp b/gdb/testsuite/gdb.base/bfd-errors.exp index f29824791c3..2e3847820e9 100644 --- a/gdb/testsuite/gdb.base/bfd-errors.exp +++ b/gdb/testsuite/gdb.base/bfd-errors.exp @@ -152,7 +152,7 @@ clean_restart # Count number of distinct BFD error messages via 'bfd_error_count' # array while using add-symbol-file to "load" the shared library. gdb_test_multiple "add-symbol-file -readnow $binfile_lib" \ - "load library with add-symbol-file" { + "load library with add-symbol-file" { -re "add symbol table from file.*\(y or n\)" { send_gdb "y\n" answer exp_continue diff --git a/gdb/testsuite/gdb.base/bitfields2.exp b/gdb/testsuite/gdb.base/bitfields2.exp index 124f9c29107..b1a42a67b5e 100644 --- a/gdb/testsuite/gdb.base/bitfields2.exp +++ b/gdb/testsuite/gdb.base/bitfields2.exp @@ -161,7 +161,7 @@ proc bitfield_signedness {} { set test "most negative signed bitfield values" if {$has_signed_bitfields} { - gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -16384, s2 = -4294967296, s3 = -32768.*" $test + gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -16384, s2 = -4294967296, s3 = -32768.*" $test } else { unsupported $test } @@ -244,4 +244,3 @@ bitfield_containment bitfield_unsignedness bitfield_signedness bitfield_set - diff --git a/gdb/testsuite/gdb.base/bitops.exp b/gdb/testsuite/gdb.base/bitops.exp index 0bf6b20f30c..cabde14e32d 100644 --- a/gdb/testsuite/gdb.base/bitops.exp +++ b/gdb/testsuite/gdb.base/bitops.exp @@ -106,4 +106,3 @@ gdb_test "print 0 || 1 && 0 | 0 ^ 0 == 8" ".\[0-9\]* = 0" \ gdb_test "print 0 == 8 > 128 >> 1 + 2 * 2" ".\[0-9\]* = 0" \ "print value of 0 == 8 > 128 >> 1 + 2 * 2" - diff --git a/gdb/testsuite/gdb.base/bp-permanent.exp b/gdb/testsuite/gdb.base/bp-permanent.exp index df511269643..71b711d1707 100644 --- a/gdb/testsuite/gdb.base/bp-permanent.exp +++ b/gdb/testsuite/gdb.base/bp-permanent.exp @@ -132,11 +132,11 @@ proc test {always_inserted sw_watchpoint} { set test "permanent breakpoint causes random signal" gdb_test_multiple "continue" $test { -re "exited normally.*$gdb_prompt $" { - unsupported "failed to stop at permanent breakpoint" + unsupported "failed to stop at permanent breakpoint" return } -re "received signal SIGTRAP.*$gdb_prompt $" { - pass $test + pass $test } } diff --git a/gdb/testsuite/gdb.base/break-fun-addr.exp b/gdb/testsuite/gdb.base/break-fun-addr.exp index ba6e32e9df7..8f833de37ff 100644 --- a/gdb/testsuite/gdb.base/break-fun-addr.exp +++ b/gdb/testsuite/gdb.base/break-fun-addr.exp @@ -50,12 +50,12 @@ gdb_load $binfile1 with_test_prefix "${testfile1}" { gdb_test "break *main" \ - "Breakpoint.*at.* file .*$srcfile1, line .*" \ + "Breakpoint.*at.* file .*$srcfile1, line .*" \ gdb_run_cmd gdb_test "" \ - "Breakpoint.* main \\(\\) at .*$srcfile1:.*" \ - "run to breakpoint at *main" + "Breakpoint.* main \\(\\) at .*$srcfile1:.*" \ + "run to breakpoint at *main" # Verify also that we stopped at the start of the function... gdb_test "p \$pc == main" " = 1" @@ -78,8 +78,8 @@ with_test_prefix "${testfile2}" { gdb_run_cmd gdb_test "" \ - "Breakpoint.* main \\(\\) at .*$srcfile2:.*" \ - "run to breakpoint at *main" + "Breakpoint.* main \\(\\) at .*$srcfile2:.*" \ + "run to breakpoint at *main" gdb_test "p \$pc == main" " = 1" } diff --git a/gdb/testsuite/gdb.base/break-inline.c b/gdb/testsuite/gdb.base/break-inline.c index 43e97f58c05..65885baf292 100644 --- a/gdb/testsuite/gdb.base/break-inline.c +++ b/gdb/testsuite/gdb.base/break-inline.c @@ -29,4 +29,3 @@ main (int argc, char *argv[]) foo (); return g; } - diff --git a/gdb/testsuite/gdb.base/break-inline.exp b/gdb/testsuite/gdb.base/break-inline.exp index 5793c4ebf16..63e9f91d6f7 100644 --- a/gdb/testsuite/gdb.base/break-inline.exp +++ b/gdb/testsuite/gdb.base/break-inline.exp @@ -24,4 +24,3 @@ gdb_test "" "Temporary breakpoint.*foo\\(\\).*" # Now test 'break' with no arguments. gdb_test "break" "Breakpoint.*" - diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp index f06c15f23be..f5b6633d902 100644 --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -112,7 +112,7 @@ proc strip_debug {dest} { fail $test return 0 } else { - pass $test + pass $test return 1 } } diff --git a/gdb/testsuite/gdb.base/breakpoint-shadow.exp b/gdb/testsuite/gdb.base/breakpoint-shadow.exp index 8e74ec24cec..6e018f35c6e 100644 --- a/gdb/testsuite/gdb.base/breakpoint-shadow.exp +++ b/gdb/testsuite/gdb.base/breakpoint-shadow.exp @@ -34,7 +34,7 @@ set match "\nDump of assembler code for function main:\r\n(.*)End of assembler d set test "disassembly without breakpoints" gdb_test_multiple "disass main" $test { -re $match { - set orig $expect_out(1,string) + set orig $expect_out(1,string) pass $test } } diff --git a/gdb/testsuite/gdb.base/c-linkage-name.exp b/gdb/testsuite/gdb.base/c-linkage-name.exp index a3735409296..aaf2b086331 100644 --- a/gdb/testsuite/gdb.base/c-linkage-name.exp +++ b/gdb/testsuite/gdb.base/c-linkage-name.exp @@ -55,7 +55,7 @@ if { $readnow } { # of the founction also provided by the same using. gdb_test "break do_something_other_cu" \ - "Breakpoint $decimal at $hex: file .*$srcfile2, line $decimal\\." + "Breakpoint $decimal at $hex: file .*$srcfile2, line $decimal\\." # Verify that partial symtab expansion has taken place for # c-linkage-name-2.c. @@ -70,5 +70,5 @@ gdb_test "maint flush symbol-cache" # symtab expansion. gdb_test "print symada__cS" \ - " = {a = 100829103}" \ - "print symada__cS after partial symtab expansion" + " = {a = 100829103}" \ + "print symada__cS after partial symtab expansion" diff --git a/gdb/testsuite/gdb.base/call-ar-st.c b/gdb/testsuite/gdb.base/call-ar-st.c index c8992b11b0f..3df35b3dacf 100644 --- a/gdb/testsuite/gdb.base/call-ar-st.c +++ b/gdb/testsuite/gdb.base/call-ar-st.c @@ -300,7 +300,7 @@ void compute_with_small_structs (int seed) int index; for (index = 0; index < 4; index++) { - array[index].value = index*seed; + array[index].value = index*seed; array[index].head = (index+1)*seed; } @@ -481,10 +481,10 @@ void init_small_structs ( { init_bit_flags(flags, (unsigned)1, (unsigned)0, (unsigned)1, - (unsigned)0, (unsigned)1, (unsigned)0 ); + (unsigned)0, (unsigned)1, (unsigned)0 ); init_bit_flags_combo(flags_combo, (unsigned)1, (unsigned)0, 'y', (unsigned)1, (unsigned)0, 'n', - (unsigned)1, (unsigned)0 ); + (unsigned)1, (unsigned)0 ); init_three_chars(three_char, 'a', 'b', 'c'); init_five_chars(five_char, 'l', 'm', 'n', 'o', 'p'); init_int_char_combo(int_char_combo, 123, 'z'); @@ -840,9 +840,9 @@ void sum_array_print ( for (index = 0; index < 10; index++) { - sum = seed + linked_list1.values[index] + linked_list2.values[index] + + sum = seed + linked_list1.values[index] + linked_list2.values[index] + linked_list3.values[index] + linked_list4.values[index]; - printf("%10d%10d\n", index, sum); + printf("%10d%10d\n", index, sum); } } @@ -1058,8 +1058,3 @@ int main () { return 0; } - - - - - diff --git a/gdb/testsuite/gdb.base/call-rt-st.c b/gdb/testsuite/gdb.base/call-rt-st.c index 82bac3d5469..7b686ea9f72 100644 --- a/gdb/testsuite/gdb.base/call-rt-st.c +++ b/gdb/testsuite/gdb.base/call-rt-st.c @@ -628,18 +628,3 @@ int main () { return 0; /* -finish1- */ } - - - - - - - - - - - - - - - diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp index 4ce686b6759..e71b7c2f7ee 100644 --- a/gdb/testsuite/gdb.base/call-rt-st.exp +++ b/gdb/testsuite/gdb.base/call-rt-st.exp @@ -98,10 +98,10 @@ proc print_struct_call { expr inf_result gdb_result } { exp_continue } } - -re "Function return value unknown.\[\r\n\]+$gdb_prompt $" { - unsupported "$command" + -re "Function return value unknown.\[\r\n\]+$gdb_prompt $" { + unsupported "$command" return - } + } } verbose -log "inferior_matched=$inferior_matched, gdb_matched=$gdb_matched" @@ -122,14 +122,14 @@ if {![gdb_skip_stdio_test "print print_one_large_struct(...)"]} { } if {$allow_float_test && \ - ![gdb_skip_stdio_test "print print_one_double(*d1)"] } { + ![gdb_skip_stdio_test "print print_one_double(*d1)"] } { print_struct_call "print_one_double(*d1)" \ ".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+" \ ".\[0-9\]+ = \\{double1 = 1\\.111\[0-9\]*\\}" } if {$allow_float_test && \ - ![gdb_skip_stdio_test "print print_two_floats(*f3)"] } { + ![gdb_skip_stdio_test "print print_two_floats(*f3)"] } { print_struct_call "print_two_floats(*f3)" \ ".*Contents of two_floats_t:\[ \r\n\]+-2\\.345000\[ \t]+1\\.000000\[ \r\n\]+" \ ".\[0-9\]+ = \\{float1 = -2\\.34500003, float2 = 1\\}" diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp index ff4e7ac92d8..5f7cfe00c03 100644 --- a/gdb/testsuite/gdb.base/call-sc.exp +++ b/gdb/testsuite/gdb.base/call-sc.exp @@ -228,18 +228,18 @@ proc test_scalar_returns { } { set test "return foo; synchronize pc to main() for '${testfile}'" for {set loop_count 0} {$loop_count < 2} {incr loop_count} { gdb_test_multiple "backtrace 1" $test { - -re "#0.*main \\(\\).*${gdb_prompt} $" { - pass $test - set loop_count 2 - } - -re "#0.*fun \\(\\).*${gdb_prompt} $" { - if {$loop_count < 1} { - gdb_test "finish" ".*" "" - } else { - fail $test - set loop_count 2 - } - } + -re "#0.*main \\(\\).*${gdb_prompt} $" { + pass $test + set loop_count 2 + } + -re "#0.*fun \\(\\).*${gdb_prompt} $" { + if {$loop_count < 1} { + gdb_test "finish" ".*" "" + } else { + fail $test + set loop_count 2 + } + } } } diff --git a/gdb/testsuite/gdb.base/call-strs.c b/gdb/testsuite/gdb.base/call-strs.c index 3a82ddaa584..e086835fba1 100644 --- a/gdb/testsuite/gdb.base/call-strs.c +++ b/gdb/testsuite/gdb.base/call-strs.c @@ -57,4 +57,3 @@ int main() str_func1("abcd"); return 0; } - diff --git a/gdb/testsuite/gdb.base/call-strs.exp b/gdb/testsuite/gdb.base/call-strs.exp index 02eecb699ac..fd24094e9a0 100644 --- a/gdb/testsuite/gdb.base/call-strs.exp +++ b/gdb/testsuite/gdb.base/call-strs.exp @@ -139,4 +139,3 @@ if {![gdb_skip_stdio_test "call str_func(s,s,s,s,s,s,s,s)"]} { gdb_exit set timeout $prev_timeout - diff --git a/gdb/testsuite/gdb.base/callfuncs.c b/gdb/testsuite/gdb.base/callfuncs.c index f3cf79638a6..c69472e399a 100644 --- a/gdb/testsuite/gdb.base/callfuncs.c +++ b/gdb/testsuite/gdb.base/callfuncs.c @@ -609,7 +609,7 @@ int (*func_arg2) PARAMS ((int)); #endif { return ((*func_arg1) (5,5) == (*func_val1) (5,5) - && (*func_arg2) (6) == (*func_val2) (6)); + && (*func_arg2) (6) == (*func_val2) (6)); } #ifdef PROTOTYPES diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index d7640aba4f3..3097c3ae6a5 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -244,7 +244,7 @@ proc do_function_calls {prototypes} { } gdb_test "p t_structs_a(struct_val1)" "= (.unsigned char .. )?<.*buf.*> \"foo\"" \ - "call inferior func with struct - returns char *" + "call inferior func with struct - returns char *" # Restore default value. gdb_test_no_output "set unwind-on-signal off" diff --git a/gdb/testsuite/gdb.base/catch-signal-fork.c b/gdb/testsuite/gdb.base/catch-signal-fork.c index 62ec6c0edbd..2d365d8817a 100644 --- a/gdb/testsuite/gdb.base/catch-signal-fork.c +++ b/gdb/testsuite/gdb.base/catch-signal-fork.c @@ -57,4 +57,3 @@ main () raise (SIGHUP); /* third HUP */ } - diff --git a/gdb/testsuite/gdb.base/catch-signal.c b/gdb/testsuite/gdb.base/catch-signal.c index 6aeb873643f..6eb0d8734fa 100644 --- a/gdb/testsuite/gdb.base/catch-signal.c +++ b/gdb/testsuite/gdb.base/catch-signal.c @@ -47,4 +47,3 @@ main () return 0; } - diff --git a/gdb/testsuite/gdb.base/catch-signal.exp b/gdb/testsuite/gdb.base/catch-signal.exp index 4ddecd6da4e..665058d60d9 100644 --- a/gdb/testsuite/gdb.base/catch-signal.exp +++ b/gdb/testsuite/gdb.base/catch-signal.exp @@ -137,10 +137,10 @@ foreach {arg desc} {"" "standard signals" \ "1st line of save breakpoints for '$arg'" # Check the second line. gdb_assert {[string match "break main" [lindex $data 1]]} \ - "2nd line of save breakpoints for '$arg'" + "2nd line of save breakpoints for '$arg'" # Check the trailing newline. gdb_assert {[string match "" [lindex $data 2]]} \ - "Trailing newline of save breakpoints for '$arg'" + "Trailing newline of save breakpoints for '$arg'" incr i } diff --git a/gdb/testsuite/gdb.base/charset.c b/gdb/testsuite/gdb.base/charset.c index c51326434fa..9b99431d613 100644 --- a/gdb/testsuite/gdb.base/charset.c +++ b/gdb/testsuite/gdb.base/charset.c @@ -142,30 +142,30 @@ int main () /* Initialize ascii_string. */ init_string (ascii_string, - 120, - 7, 8, 12, - 10, 13, 9, - 11, 120, 17); + 120, + 7, 8, 12, + 10, 13, 9, + 11, 120, 17); fill_run (ascii_string, 7, 26, 65); fill_run (ascii_string, 33, 26, 97); fill_run (ascii_string, 59, 10, 48); /* Initialize iso_8859_1_string. */ init_string (iso_8859_1_string, - 120, - 7, 8, 12, - 10, 13, 9, - 11, 162, 17); + 120, + 7, 8, 12, + 10, 13, 9, + 11, 162, 17); fill_run (iso_8859_1_string, 7, 26, 65); fill_run (iso_8859_1_string, 33, 26, 97); fill_run (iso_8859_1_string, 59, 10, 48); /* Initialize ebcdic_us_string. */ init_string (ebcdic_us_string, - 167, - 47, 22, 12, - 37, 13, 5, - 11, 74, 17); + 167, + 47, 22, 12, + 37, 13, 5, + 11, 74, 17); /* In EBCDIC, the upper-case letters are broken into three separate runs. */ fill_run (ebcdic_us_string, 7, 9, 193); fill_run (ebcdic_us_string, 16, 9, 209); @@ -179,10 +179,10 @@ int main () /* Initialize ibm1047_string. */ init_string (ibm1047_string, - 167, - 47, 22, 12, - 37, 13, 5, - 11, 74, 17); + 167, + 47, 22, 12, + 37, 13, 5, + 11, 74, 17); /* In IBM1047, the upper-case letters are broken into three separate runs. */ fill_run (ibm1047_string, 7, 9, 193); fill_run (ibm1047_string, 16, 9, 209); diff --git a/gdb/testsuite/gdb.base/charset.exp b/gdb/testsuite/gdb.base/charset.exp index 80fbf4adfc2..e2b543e8c7f 100644 --- a/gdb/testsuite/gdb.base/charset.exp +++ b/gdb/testsuite/gdb.base/charset.exp @@ -33,28 +33,28 @@ proc parse_show_charset_output {testname} { global gdb_prompt gdb_expect { - -re "The host character set is \"(.*)\"\\.\[\r\n\]+The target character set is \"(.*)\"\\.\[\r\n\]+The target wide character set is \"(.*)\"\\.\[\r\n\]+$gdb_prompt $" { - set host_charset $expect_out(1,string) - set target_charset $expect_out(2,string) + -re "The host character set is \"(.*)\"\\.\[\r\n\]+The target character set is \"(.*)\"\\.\[\r\n\]+The target wide character set is \"(.*)\"\\.\[\r\n\]+$gdb_prompt $" { + set host_charset $expect_out(1,string) + set target_charset $expect_out(2,string) set retlist [list $host_charset $target_charset] - pass $testname - } - -re "The host character set is \"(.*)\"\\.\[\r\n\]+$gdb_prompt $" { - set host_charset $expect_out(1,string) + pass $testname + } + -re "The host character set is \"(.*)\"\\.\[\r\n\]+$gdb_prompt $" { + set host_charset $expect_out(1,string) set retlist [list $host_charset] - pass $testname - } - -re "The target character set is \"(.*)\"\\.\[\r\n\]+$gdb_prompt $" { - set target_charset $expect_out(1,string) + pass $testname + } + -re "The target character set is \"(.*)\"\\.\[\r\n\]+$gdb_prompt $" { + set target_charset $expect_out(1,string) set retlist [list $target_charset] - pass $testname - } - -re ".*$gdb_prompt $" { - fail $testname - } - timeout { - fail "$testname (timeout)" - } + pass $testname + } + -re ".*$gdb_prompt $" { + fail $testname + } + timeout { + fail "$testname (timeout)" + } } return $retlist @@ -104,13 +104,13 @@ gdb_test_multiple $cmd "try malformed `set charset'" { # Try using `set host-charset' on an invalid character set. gdb_test "set host-charset my_grandma_bonnie" \ - "Undefined item: \"my_grandma_bonnie\"." \ - "try `set host-charset' with invalid charset" + "Undefined item: \"my_grandma_bonnie\"." \ + "try `set host-charset' with invalid charset" # Try using `set target-charset' on an invalid character set. gdb_test "set target-charset my_grandma_bonnie" \ - "Undefined item: \"my_grandma_bonnie\"." \ - "try `set target-charset' with invalid charset" + "Undefined item: \"my_grandma_bonnie\"." \ + "try `set target-charset' with invalid charset" # A Tcl array mapping the names of all the character sets we've seen # to "1" if the character set can be used as a host character set, or @@ -189,140 +189,140 @@ set charset_subset {ASCII ISO-8859-1 EBCDIC-US IBM1047} foreach_with_prefix host_charset $charset_subset { if {[valid_host_charset $host_charset]} { - set testname "try `set host-charset $host_charset'" - send_gdb "set host-charset $host_charset\n" - gdb_expect { - -re "GDB doesn't know of any character set named.*\[\r\n]+${gdb_prompt} $" { - # How did it get into `charsets' then? - fail "$testname (didn't recognize name)" - } - -re "GDB can't use `.*' as its host character set\\.\[\r\n]+${gdb_prompt} $" { - # Well, then why does its `charsets' entry say it can? - fail $testname - } - -re "${gdb_prompt} $" { - pass $testname - } - timeout { - fail "$testname (timeout)" - } - } - - # Check that the command actually had its intended effect: - # $host_charset should now be the host character set. - send_gdb "show charset\n" - set result [parse_show_charset_output "parse `show charset' after `set host-charset $host_charset'"] - if {! [string compare [lindex $result 0] $host_charset]} { - pass "check effect of `set host-charset $host_charset'" - } else { - fail "check effect of `set host-charset $host_charset'" - } - - # Now try setting every possible target character set, - # given that host charset. - foreach target_charset $charset_subset { + set testname "try `set host-charset $host_charset'" + send_gdb "set host-charset $host_charset\n" + gdb_expect { + -re "GDB doesn't know of any character set named.*\[\r\n]+${gdb_prompt} $" { + # How did it get into `charsets' then? + fail "$testname (didn't recognize name)" + } + -re "GDB can't use `.*' as its host character set\\.\[\r\n]+${gdb_prompt} $" { + # Well, then why does its `charsets' entry say it can? + fail $testname + } + -re "${gdb_prompt} $" { + pass $testname + } + timeout { + fail "$testname (timeout)" + } + } + + # Check that the command actually had its intended effect: + # $host_charset should now be the host character set. + send_gdb "show charset\n" + set result [parse_show_charset_output "parse `show charset' after `set host-charset $host_charset'"] + if {! [string compare [lindex $result 0] $host_charset]} { + pass "check effect of `set host-charset $host_charset'" + } else { + fail "check effect of `set host-charset $host_charset'" + } + + # Now try setting every possible target character set, + # given that host charset. + foreach target_charset $charset_subset { if {![valid_target_charset $target_charset]} { continue } - set testname "try `set target-charset $target_charset'" - send_gdb "set target-charset $target_charset\n" - gdb_expect { - -re "GDB doesn't know of any character set named.*\[\r\n]+${gdb_prompt} $" { - fail "$testname (didn't recognize name)" - } - -re "GDB can't convert from the .* character set to .*\\.\[\r\n\]+${gdb_prompt} $" { - # This is a serious problem. GDB should be able to convert - # between any arbitrary pair of character sets. - fail "$testname (can't convert)" - } - -re "${gdb_prompt} $" { - pass $testname - } - timeout { - fail "$testname (timeout)" - } - } - - # Check that the command actually had its intended effect: - # $target_charset should now be the target charset. - send_gdb "show charset\n" - set result [parse_show_charset_output "parse `show charset' after `set target-charset $target_charset'"] - if {! [string compare $result [list $host_charset $target_charset]]} { - pass "check effect of `set target-charset $target_charset'" - } else { - fail "check effect of `set target-charset $target_charset'" - } - - # Test handling of characters in the host charset which - # can't be translated into the target charset. \xA2 is - # `cent' in ISO-8859-1, which has no equivalent in ASCII. - # - # On some systems, the pseudo-tty through which we - # communicate with GDB insists on stripping the high bit - # from input characters, meaning that `cent' turns into - # `"'. Since ISO-8859-1 and ASCII are identical in the - # lower 128 characters, it's tough to see how we can test - # this behavior on such systems, so we just xfail it. + set testname "try `set target-charset $target_charset'" + send_gdb "set target-charset $target_charset\n" + gdb_expect { + -re "GDB doesn't know of any character set named.*\[\r\n]+${gdb_prompt} $" { + fail "$testname (didn't recognize name)" + } + -re "GDB can't convert from the .* character set to .*\\.\[\r\n\]+${gdb_prompt} $" { + # This is a serious problem. GDB should be able to convert + # between any arbitrary pair of character sets. + fail "$testname (can't convert)" + } + -re "${gdb_prompt} $" { + pass $testname + } + timeout { + fail "$testname (timeout)" + } + } + + # Check that the command actually had its intended effect: + # $target_charset should now be the target charset. + send_gdb "show charset\n" + set result [parse_show_charset_output "parse `show charset' after `set target-charset $target_charset'"] + if {! [string compare $result [list $host_charset $target_charset]]} { + pass "check effect of `set target-charset $target_charset'" + } else { + fail "check effect of `set target-charset $target_charset'" + } + + # Test handling of characters in the host charset which + # can't be translated into the target charset. \xA2 is + # `cent' in ISO-8859-1, which has no equivalent in ASCII. + # + # On some systems, the pseudo-tty through which we + # communicate with GDB insists on stripping the high bit + # from input characters, meaning that `cent' turns into + # `"'. Since ISO-8859-1 and ASCII are identical in the + # lower 128 characters, it's tough to see how we can test + # this behavior on such systems, so we just xfail it. # # Note: the \x16 (Control-V) is an escape to allow \xA2 to # get past readline. - if {! [string compare $host_charset iso-8859-1] && ! [string compare $target_charset ascii]} { - - set testname "untranslatable character in character literal" - send_gdb "print '\x16\xA2'\n" - gdb_expect { - -re "There is no character corresponding to .* in the target character set .*\\.\[\r\n\]+$gdb_prompt $" { - pass $testname - } - -re " = 34 '\"'\[\r\n\]+$gdb_prompt $" { - xfail "$testname (DejaGNU's pseudo-tty strips eighth bit)" - } - -re "$gdb_prompt $" { - fail $testname - } - timeout { - fail "$testname (timeout)" - } - } - - set testname "untranslatable character in string literal" - # If the PTTY zeros bit seven, then this turns into - # print """ - # which gets us a syntax error. We don't care. - send_gdb "print \"\x16\xA2\"\n" - gdb_expect { - -re "There is no character corresponding to .* in the target character set .*\\.\[\r\n\]+$gdb_prompt $" { - pass $testname - } - -re "Unterminated string in expression.\[\r\n\]+$gdb_prompt $" { - xfail "$testname (DejaGNU's pseudo-tty strips eighth bit)" - } - -re "$gdb_prompt $" { - fail $testname - } - timeout { - fail "$testname (timeout)" - } - } - - set testname "untranslatable characters in backslash escape" - send_gdb "print '\\\x16\xA2'\n" - gdb_expect { - -re "The escape sequence .* is equivalent to plain .*, which has no equivalent\[\r\n\]+in the .* character set\\.\[\r\n\]+$gdb_prompt $" { - pass $testname - } - -re " = 34 '\"'\[\r\n\]+$gdb_prompt $" { - xfail "$testname (DejaGNU's pseudo-tty strips eighth bit)" - } - -re "$gdb_prompt $" { - fail $testname - } - timeout { - fail "$testname (timeout)" - } - } - } - } + if {! [string compare $host_charset iso-8859-1] && ! [string compare $target_charset ascii]} { + + set testname "untranslatable character in character literal" + send_gdb "print '\x16\xA2'\n" + gdb_expect { + -re "There is no character corresponding to .* in the target character set .*\\.\[\r\n\]+$gdb_prompt $" { + pass $testname + } + -re " = 34 '\"'\[\r\n\]+$gdb_prompt $" { + xfail "$testname (DejaGNU's pseudo-tty strips eighth bit)" + } + -re "$gdb_prompt $" { + fail $testname + } + timeout { + fail "$testname (timeout)" + } + } + + set testname "untranslatable character in string literal" + # If the PTTY zeros bit seven, then this turns into + # print """ + # which gets us a syntax error. We don't care. + send_gdb "print \"\x16\xA2\"\n" + gdb_expect { + -re "There is no character corresponding to .* in the target character set .*\\.\[\r\n\]+$gdb_prompt $" { + pass $testname + } + -re "Unterminated string in expression.\[\r\n\]+$gdb_prompt $" { + xfail "$testname (DejaGNU's pseudo-tty strips eighth bit)" + } + -re "$gdb_prompt $" { + fail $testname + } + timeout { + fail "$testname (timeout)" + } + } + + set testname "untranslatable characters in backslash escape" + send_gdb "print '\\\x16\xA2'\n" + gdb_expect { + -re "The escape sequence .* is equivalent to plain .*, which has no equivalent\[\r\n\]+in the .* character set\\.\[\r\n\]+$gdb_prompt $" { + pass $testname + } + -re " = 34 '\"'\[\r\n\]+$gdb_prompt $" { + xfail "$testname (DejaGNU's pseudo-tty strips eighth bit)" + } + -re "$gdb_prompt $" { + fail $testname + } + timeout { + fail "$testname (timeout)" + } + } + } + } } } @@ -332,8 +332,8 @@ foreach_with_prefix host_charset $charset_subset { # test program to the point at which the strings have been # initialized. gdb_test "break ${srcfile}:[gdb_get_line_number "all strings initialized"]" \ - ".*Breakpoint.* at .*" \ - "set breakpoint after all strings have been initialized" + ".*Breakpoint.* at .*" \ + "set breakpoint after all strings have been initialized" gdb_run_cmd gdb_test "" "Breakpoint.*all strings initialized.*" "run until all strings have been initialized" @@ -368,15 +368,15 @@ foreach target_charset $charset_subset { # gdb_test that requires us to use gdb_expect here. send_gdb "print $L'\\0'\n" gdb_expect { - -re "\\\$${decimal} = 0 $L'\\\\000'\[\r\n\]+$gdb_prompt $" { - pass "print the null character in ${target_charset}" - } - -re "$gdb_prompt $" { - fail "print the null character in ${target_charset}" - } - timeout { - fail "print the null character in ${target_charset} (timeout)" - } + -re "\\\$${decimal} = 0 $L'\\\\000'\[\r\n\]+$gdb_prompt $" { + pass "print the null character in ${target_charset}" + } + -re "$gdb_prompt $" { + fail "print the null character in ${target_charset}" + } + timeout { + fail "print the null character in ${target_charset} (timeout)" + } } # Compute the name of the variable in the test program that holds @@ -403,101 +403,101 @@ foreach target_charset $charset_subset { send_gdb "print $var_name\n" # ${escapes}${uppercase}${lowercase}${digits}${octal}${octal} gdb_expect { - -re ".* = $L\"(\\\\a|x)(\\\\b|x)(\\\\f|x)(\\\\n|x)(\\\\r|x)(\\\\t|x)(\\\\v|x)${uppercase}${lowercase}${digits}(${octal_escape}|x)+\"\[\r\n\]+$gdb_prompt $" { - pass "print string in $target_charset" - } - -re "$gdb_prompt $" { - fail "print string in $target_charset" - } - timeout { - fail "print string in $target_charset (timeout)" - } + -re ".* = $L\"(\\\\a|x)(\\\\b|x)(\\\\f|x)(\\\\n|x)(\\\\r|x)(\\\\t|x)(\\\\v|x)${uppercase}${lowercase}${digits}(${octal_escape}|x)+\"\[\r\n\]+$gdb_prompt $" { + pass "print string in $target_charset" + } + -re "$gdb_prompt $" { + fail "print string in $target_charset" + } + timeout { + fail "print string in $target_charset (timeout)" + } } # Try entering a character literal, and see if it comes back unchanged. gdb_test "print $L'A'" \ - " = \[0-9-\]+ $L'A'" \ - "parse character literal in ${target_charset}" + " = \[0-9-\]+ $L'A'" \ + "parse character literal in ${target_charset}" # Check that the character literal was encoded correctly. gdb_test "print /d $L'A' == $var_name\[7\]" \ - " = 1" \ - "check value of parsed character literal in ${target_charset}" + " = 1" \ + "check value of parsed character literal in ${target_charset}" # Try entering a string literal, and see if it comes back unchanged. gdb_test "print $L\"abcdefABCDEF012345\"" \ - " = $L\"abcdefABCDEF012345\"" \ - "parse string literal in ${target_charset}" + " = $L\"abcdefABCDEF012345\"" \ + "parse string literal in ${target_charset}" # Check that the string literal was encoded correctly. gdb_test "print /d $L\"q\"\[0\] == $var_name\[49\]" \ - " = 1" \ - "check value of parsed string literal in ${target_charset}" + " = 1" \ + "check value of parsed string literal in ${target_charset}" # Test handling of characters in the target charset which # can't be translated into the host charset. if {! [string compare $target_charset iso-8859-1]} { - gdb_test "print iso_8859_1_string\[69\]" \ - " = \[0-9-\]+ '\\\\242'" \ - "print character with no equivalent in host character set" - gdb_test "print iso_8859_1_string + 70" \ - " = ${hex} \"\\\\242.*\"" \ - "print string with no equivalent in host character set" + gdb_test "print iso_8859_1_string\[69\]" \ + " = \[0-9-\]+ '\\\\242'" \ + "print character with no equivalent in host character set" + gdb_test "print iso_8859_1_string + 70" \ + " = ${hex} \"\\\\242.*\"" \ + "print string with no equivalent in host character set" } # Make sure that we don't apply the ISO-8859-1 `print_literally' # function to ASCII. if {! [string compare $target_charset ascii]} { - gdb_test "print iso_8859_1_string\[69\]" \ - " = \[0-9-\]+ '\\\\242'" \ - "print ASCII unprintable character" - gdb_test "print iso_8859_1_string + 70" \ - " = ${hex} \"\\\\242.*\"" \ - "print ASCII unprintable string" + gdb_test "print iso_8859_1_string\[69\]" \ + " = \[0-9-\]+ '\\\\242'" \ + "print ASCII unprintable character" + gdb_test "print iso_8859_1_string + 70" \ + " = ${hex} \"\\\\242.*\"" \ + "print ASCII unprintable string" } # Try printing characters with backslash escape equivalents. set escapees {a b f n r t v} for {set i 0} {$i < [llength $escapees]} {incr i} { - set escape [lindex $escapees $i] - send_gdb "print $var_name\[$i\]\n" - set have_escape 1 - gdb_expect { - -re "= \[0-9-\]+ $L'\\\\${escape}'\[\r\n\]+$gdb_prompt $" { - pass "try printing '\\${escape}' in ${target_charset}" - } - -re "= \[0-9-\]+ 'x'\[\r\n\]+$gdb_prompt $" { - xfail "try printing '\\${escape}' in ${target_charset} (no such escape)" - set have_escape 0 - } - -re "$gdb_prompt $" { - fail "try printing '\\${escape}' in ${target_charset}" - } - timeout { - fail "try printing '\\${escape}' in ${target_charset} (timeout)" - } - } - - if {$have_escape} { - - # Try parsing a backslash escape in a character literal. - gdb_test "print /d $L'\\${escape}' == $var_name\[$i\]" \ - " = 1" \ - "check value of '\\${escape}' in ${target_charset}" - - # Try parsing a backslash escape in a string literal. - gdb_test "print /d $L\"\\${escape}\"\[0\] == $var_name\[$i\]" \ - " = 1" \ - "check value of \"\\${escape}\" in ${target_charset}" - } + set escape [lindex $escapees $i] + send_gdb "print $var_name\[$i\]\n" + set have_escape 1 + gdb_expect { + -re "= \[0-9-\]+ $L'\\\\${escape}'\[\r\n\]+$gdb_prompt $" { + pass "try printing '\\${escape}' in ${target_charset}" + } + -re "= \[0-9-\]+ 'x'\[\r\n\]+$gdb_prompt $" { + xfail "try printing '\\${escape}' in ${target_charset} (no such escape)" + set have_escape 0 + } + -re "$gdb_prompt $" { + fail "try printing '\\${escape}' in ${target_charset}" + } + timeout { + fail "try printing '\\${escape}' in ${target_charset} (timeout)" + } + } + + if {$have_escape} { + + # Try parsing a backslash escape in a character literal. + gdb_test "print /d $L'\\${escape}' == $var_name\[$i\]" \ + " = 1" \ + "check value of '\\${escape}' in ${target_charset}" + + # Try parsing a backslash escape in a string literal. + gdb_test "print /d $L\"\\${escape}\"\[0\] == $var_name\[$i\]" \ + " = 1" \ + "check value of \"\\${escape}\" in ${target_charset}" + } } # Try printing a character escape that doesn't exist. We should # get the unescaped character, in the target character set. gdb_test "print $L'\\q'" " = \[0-9-\]+ $L'q'" \ - "print escape that doesn't exist in $target_charset" + "print escape that doesn't exist in $target_charset" gdb_test "print /d $L'\\q' == $var_name\[49\]" " = 1" \ - "check value of escape that doesn't exist in $target_charset" + "check value of escape that doesn't exist in $target_charset" } # Reset the target charset. diff --git a/gdb/testsuite/gdb.base/chng-syms.c b/gdb/testsuite/gdb.base/chng-syms.c index 8811de91493..f08294cedbe 100644 --- a/gdb/testsuite/gdb.base/chng-syms.c +++ b/gdb/testsuite/gdb.base/chng-syms.c @@ -19,4 +19,3 @@ int main () stop_here (); exit (0); } - diff --git a/gdb/testsuite/gdb.base/clear_non_user_bp.exp b/gdb/testsuite/gdb.base/clear_non_user_bp.exp index c016d07bc4d..a39304f7b15 100644 --- a/gdb/testsuite/gdb.base/clear_non_user_bp.exp +++ b/gdb/testsuite/gdb.base/clear_non_user_bp.exp @@ -69,4 +69,3 @@ gdb_test "clear *$bp_addr" \ gdb_test "maint info break $bp_num" \ "$bp_num.*$bp_addr.*" \ "maint info breakpoint \$bp_num after clear" - diff --git a/gdb/testsuite/gdb.base/code-expr.exp b/gdb/testsuite/gdb.base/code-expr.exp index 38f238cd1f5..4b34e32752d 100644 --- a/gdb/testsuite/gdb.base/code-expr.exp +++ b/gdb/testsuite/gdb.base/code-expr.exp @@ -375,4 +375,3 @@ gdb_test "whatis (union t_union @code * @code) &v_union" \ # # Function pointers TODO # - diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index c21be235491..047dab30994 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -580,10 +580,10 @@ proc_with_prefix watchpoint_command_test {} { set wp_id -1 gdb_test_multiple "watch local_var" "watch local_var" { - -re "\[Ww\]atchpoint (\[0-9\]*): local_var.*$gdb_prompt $" { - set wp_id $expect_out(1,string) - pass "watch local_var" - } + -re "\[Ww\]atchpoint (\[0-9\]*): local_var.*$gdb_prompt $" { + set wp_id $expect_out(1,string) + pass "watch local_var" + } } if {$wp_id == -1} {return} @@ -672,7 +672,7 @@ proc_with_prefix test_command_prompt_position {} { proc_with_prefix deprecated_command_test {} { gdb_test "maintenance deprecate blah" "Can't find command.*" \ - "tried to deprecate non-existing command" + "tried to deprecate non-existing command" gdb_test_no_output "maintenance deprecate p \"new_p\"" "maintenance deprecate p \"new_p\" /1/" gdb_test "p 5" \ @@ -750,31 +750,31 @@ proc_with_prefix bp_deleted_in_command_test {} { # Create a breakpoint, and associate a command-list to it, with # one command that deletes this breakpoint. gdb_test "break factorial" \ - "Breakpoint \[0-9\]+ at .*: file .*run.c, line \[0-9\]+\." + "Breakpoint \[0-9\]+ at .*: file .*run.c, line \[0-9\]+\." gdb_test_multiple "commands" "begin commands" { -re "Type commands for breakpoint.*>$" { - pass "begin commands" + pass "begin commands" } } gdb_test_multiple "silent" "add silent command" { - -re ">$" { + -re ">$" { pass "add silent command" } } gdb_test_multiple "clear factorial" "add clear command" { - -re ">$" { + -re ">$" { pass "add clear command" } } gdb_test_multiple "printf \"factorial command-list executed\\n\"" \ "add printf command" { - -re ">$" { + -re ">$" { pass "add printf command" } } gdb_test_multiple "cont" "add cont command" { - -re ">$" { + -re ">$" { pass "add cont command" } } diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 59a6c57140b..67906f1a7c4 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -210,7 +210,7 @@ gdb_test_multiple "" "$test" { -re "Default output radix for printing of values is 10\\..*$gdb_prompt $" { pass "$test" } - } + } } } @@ -223,7 +223,7 @@ gdb_test_multiple "" "$test" { -re "The history is empty\\..*$gdb_prompt $" { pass "$test" } - } + } } } @@ -514,12 +514,12 @@ set test "complete 'p no_var_named_this-arg'" send_gdb "p no_var_named_this-arg\t" gdb_test_multiple "" "$test" { -re "^p no_var_named_this-arg\\\x07$" { - send_gdb "\n" + send_gdb "\n" gdb_test_multiple "" "$test" { - -re "No symbol \"no_var_named_this\" in current context\\..*$gdb_prompt $" { + -re "No symbol \"no_var_named_this\" in current context\\..*$gdb_prompt $" { pass "$test" - } - } + } + } } } @@ -556,7 +556,7 @@ gdb_test_multiple "" "$test" { } } } - } + } } } @@ -680,8 +680,8 @@ with_cwd $srcdir { # regexp operator. We use string_to_regexp for this purpose. gdb_test "cd ${fullsrcdir}" \ - "Working directory [string_to_regexp ${fullsrcdir}].*" \ - "cd to \${srcdir}" + "Working directory [string_to_regexp ${fullsrcdir}].*" \ + "cd to \${srcdir}" # GDB used to fail adding / on directories, on the first try only. diff --git a/gdb/testsuite/gdb.base/comprdebug.exp b/gdb/testsuite/gdb.base/comprdebug.exp index d8859c58e32..18f53cf5e1c 100644 --- a/gdb/testsuite/gdb.base/comprdebug.exp +++ b/gdb/testsuite/gdb.base/comprdebug.exp @@ -41,4 +41,3 @@ if {[gdb_file_cmd $ofile] == 0} { } else { fail $testname } - diff --git a/gdb/testsuite/gdb.base/cond-expr.exp b/gdb/testsuite/gdb.base/cond-expr.exp index 31c2545b9b7..c231f4c7333 100644 --- a/gdb/testsuite/gdb.base/cond-expr.exp +++ b/gdb/testsuite/gdb.base/cond-expr.exp @@ -67,14 +67,3 @@ gdb_test "print (x ? y : z)" "\[0-9\]* = 3" \ gdb_test "whatis (0 ? 3 : 4)" "type = int" \ "print whatis of cond expr" - - - - - - - - - - - diff --git a/gdb/testsuite/gdb.base/consecutive.exp b/gdb/testsuite/gdb.base/consecutive.exp index fa58a8f02fb..007c6a5982e 100644 --- a/gdb/testsuite/gdb.base/consecutive.exp +++ b/gdb/testsuite/gdb.base/consecutive.exp @@ -72,4 +72,3 @@ gdb_test_multiple "step" "stopped at bp, 2nd instr" { } } } - diff --git a/gdb/testsuite/gdb.base/coredump-filter.exp b/gdb/testsuite/gdb.base/coredump-filter.exp index 8a0652f6bda..008c1f9009b 100644 --- a/gdb/testsuite/gdb.base/coredump-filter.exp +++ b/gdb/testsuite/gdb.base/coredump-filter.exp @@ -39,7 +39,7 @@ proc do_save_core { filter_flag core dump_excluded } { # Enable dumping of excluded mappings (i.e. VM_DONTDUMP). if { $dump_excluded == 1 } { - gdb_test_no_output "set dump-excluded-mappings on" + gdb_test_no_output "set dump-excluded-mappings on" } # Generate a corefile. @@ -47,7 +47,7 @@ proc do_save_core { filter_flag core dump_excluded } { # Restore original status. if { $dump_excluded == 1 } { - gdb_test_no_output "set dump-excluded-mappings off" + gdb_test_no_output "set dump-excluded-mappings off" } } @@ -62,13 +62,13 @@ proc do_load_and_test_core { core var working_var working_value dump_excluded } # Access the memory the addresses point to. if { $dump_excluded == 0 } { - gdb_test "print/x *(char *) $coredump_var_addr($var)" "\(\\\$$decimal = \)?" \ + gdb_test "print/x *(char *) $coredump_var_addr($var)" "\(\\\$$decimal = \)?" \ "printing $var when core is loaded (should not work)" - gdb_test "print/x *(char *) $coredump_var_addr($working_var)" " = $working_value.*" \ + gdb_test "print/x *(char *) $coredump_var_addr($working_var)" " = $working_value.*" \ "print/x *$working_var ( = $working_value)" } else { - # Check if VM_DONTDUMP mappings are present in the core file. - gdb_test "print/x *(char *) $coredump_var_addr($var)" " = $working_value.*" \ + # Check if VM_DONTDUMP mappings are present in the core file. + gdb_test "print/x *(char *) $coredump_var_addr($var)" " = $working_value.*" \ "print/x *$var ( = $working_value)" } } diff --git a/gdb/testsuite/gdb.base/coremaker.c b/gdb/testsuite/gdb.base/coremaker.c index b73e659b4a6..220d2abf481 100644 --- a/gdb/testsuite/gdb.base/coremaker.c +++ b/gdb/testsuite/gdb.base/coremaker.c @@ -118,7 +118,7 @@ mmapdata () /* Create yet another region which is allocated, but not written to. */ buf3 = mmap (NULL, MAPSIZE, PROT_READ | PROT_WRITE, - MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); + MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); if (buf3 == (char *) -1) { perror ("mmap failed"); diff --git a/gdb/testsuite/gdb.base/coremaker2.c b/gdb/testsuite/gdb.base/coremaker2.c index ca5f26b4fbe..8a15e6a50e1 100644 --- a/gdb/testsuite/gdb.base/coremaker2.c +++ b/gdb/testsuite/gdb.base/coremaker2.c @@ -117,7 +117,7 @@ main (int argc, char **argv) } mbuf_ro = mmap ((void *) addr, pagesize, PROT_READ, - MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0); + MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0); if (mbuf_ro == MAP_FAILED) { @@ -141,7 +141,7 @@ main (int argc, char **argv) } mbuf_rw = mmap ((void *) addr, pagesize, PROT_READ, - MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0); + MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0); if (mbuf_rw == MAP_FAILED) { diff --git a/gdb/testsuite/gdb.base/ctf-ptype.exp b/gdb/testsuite/gdb.base/ctf-ptype.exp index 1aaa48c9c00..8baefdc005e 100644 --- a/gdb/testsuite/gdb.base/ctf-ptype.exp +++ b/gdb/testsuite/gdb.base/ctf-ptype.exp @@ -204,8 +204,8 @@ gdb_test "ptype nested_su.inner_union_instance" "type = union inner_union \{.*\[ # correctly printed (at nesting level 1 and 2). gdb_test "ptype the_highest" \ - "type = struct highest \{.*\[\r\n\] *int a;.*\[\r\n\] *struct \{.*\[\r\n\] *int b;.*\[\r\n\] *struct \{\.\.\.\} anonymous_level_2;.*\[\r\n\] *\} anonymous_level_1;.*\[\r\n\]}.*" \ - "ptype the_highest" + "type = struct highest \{.*\[\r\n\] *int a;.*\[\r\n\] *struct \{.*\[\r\n\] *int b;.*\[\r\n\] *struct \{\.\.\.\} anonymous_level_2;.*\[\r\n\] *\} anonymous_level_1;.*\[\r\n\]}.*" \ + "ptype the_highest" # Print the type descrption for one of the fields of variable the_highest. # The purpose is to verify that the type of a field that was printed above @@ -213,8 +213,8 @@ gdb_test "ptype the_highest" \ # nesting level is now one level less). gdb_test "ptype the_highest.anonymous_level_1" \ - "type = struct \{.*\[\r\n\] *int b;.*\[\r\n\] *struct \{.*\[\r\n\] *int c;.*\[\r\n\] *\} anonymous_level_2;.*\[\r\n\]}.*" \ - "ptype the_highest.anonymous_level_1" + "type = struct \{.*\[\r\n\] *int b;.*\[\r\n\] *struct \{.*\[\r\n\] *int c;.*\[\r\n\] *\} anonymous_level_2;.*\[\r\n\]}.*" \ + "ptype the_highest.anonymous_level_1" # Print the type of the identifier ID, and check the response: # - Expect to see PROTOTYPED as the type. PROTOTYPED is not a regular @@ -241,37 +241,37 @@ proc ptype_maybe_prototyped { id prototyped plain { overprototyped "NO-MATCH" } } gdb_test_multiple "ptype $id" "ptype $id" { - -re "type = $prototyped\[\r\n\]+$gdb_prompt $" { - pass "ptype $id" - } - -re "type = $plain\[\r\n\]+$gdb_prompt $" { - if {$gcc_compiled} { setup_xfail_format "stabs" } - fail "ptype $id (compiler doesn't emit prototyped types)" - } - -re "type = $overprototyped\[\r\n\]+$gdb_prompt $" { - if { [test_compiler_info "armcc-*"] } { + -re "type = $prototyped\[\r\n\]+$gdb_prompt $" { + pass "ptype $id" + } + -re "type = $plain\[\r\n\]+$gdb_prompt $" { + if {$gcc_compiled} { setup_xfail_format "stabs" } + fail "ptype $id (compiler doesn't emit prototyped types)" + } + -re "type = $overprototyped\[\r\n\]+$gdb_prompt $" { + if { [test_compiler_info "armcc-*"] } { setup_xfail "*-*-*" } - fail "ptype $id (compiler doesn't emit unprototyped types)" - } + fail "ptype $id (compiler doesn't emit unprototyped types)" + } } } ptype_maybe_prototyped "func_type" "int (*)(int (*)(int, float), float)" \ - "int (*)()" + "int (*)()" ptype_maybe_prototyped "old_fptr" "double (*)()" "double (*)()" \ - "double (*)(void)" + "double (*)(void)" ptype_maybe_prototyped "new_fptr" "double (*)()" "double (*)()" ptype_maybe_prototyped "fptr" "int (*)(int, float)" "int (*)()" ptype_maybe_prototyped "fptr2" "int *(*)(int (*)(int, float), float)" \ - "int *(*)()" + "int *(*)()" ptype_maybe_prototyped "xptr" "int (*)(int (*)(), int (*)(), int)" \ - "int (*)()" \ - "int (*)(int (*)(void), int (*)(void), int)" + "int (*)()" \ + "int (*)(int (*)(void), int (*)(void), int)" ptype_maybe_prototyped "ffptr" "int (*(*)(char))(short int)" \ - "int (*(*)())()" + "int (*(*)())()" ptype_maybe_prototyped "fffptr" "int (*(*(*)(char))(short int))(long int)" \ - "int (*(*(*)())())()" + "int (*(*(*)())())()" # Test printing type of string constants and array constants, but # requires a running process. These call malloc, and can take a long diff --git a/gdb/testsuite/gdb.base/ctxobj-m.c b/gdb/testsuite/gdb.base/ctxobj-m.c index 10475e10f59..a883875a62c 100644 --- a/gdb/testsuite/gdb.base/ctxobj-m.c +++ b/gdb/testsuite/gdb.base/ctxobj-m.c @@ -34,4 +34,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.base/ctxobj.exp b/gdb/testsuite/gdb.base/ctxobj.exp index 4a50ab6359b..545465d2e69 100644 --- a/gdb/testsuite/gdb.base/ctxobj.exp +++ b/gdb/testsuite/gdb.base/ctxobj.exp @@ -26,17 +26,17 @@ set executable ctxobj-m # in that SO while the variable's associated symtab has not been created # yet. set libsrc [list "${srcdir}/${subdir}/ctxobj-v.c" \ - "${srcdir}/${subdir}/ctxobj-f.c"] + "${srcdir}/${subdir}/ctxobj-f.c"] set libobj1 [standard_output_file libctxobj1.so] set libobj2 [standard_output_file libctxobj2.so] set libobj1_opts { debug - additional_flags=-DVERSION=104 - additional_flags=-DGET_VERSION=get_version_1 } + additional_flags=-DVERSION=104 + additional_flags=-DGET_VERSION=get_version_1 } set libobj2_opts { debug - additional_flags=-DVERSION=203 - additional_flags=-DGET_VERSION=get_version_2 } + additional_flags=-DVERSION=203 + additional_flags=-DGET_VERSION=get_version_2 } if { [gdb_compile_shlib $libsrc $libobj1 $libobj1_opts ] != "" } { return -1 @@ -45,9 +45,9 @@ if { [gdb_compile_shlib $libsrc $libobj2 $libobj2_opts ] != "" } { return -1 } if { [gdb_compile "${srcdir}/${subdir}/${executable}.c" \ - [standard_output_file ${executable}] \ - executable \ - [list debug shlib=${libobj1} shlib=${libobj2}]] + [standard_output_file ${executable}] \ + executable \ + [list debug shlib=${libobj1} shlib=${libobj2}]] != ""} { return -1 } @@ -62,8 +62,8 @@ if {![runto_main]} { set bp_location [gdb_get_line_number "STOP" "ctxobj-f.c"] gdb_test "break ctxobj-f.c:$bp_location" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \ - "break in get_version functions" + "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \ + "break in get_version functions" global expect_out set test "continue to get_version_1" @@ -98,12 +98,12 @@ gdb_test "printf \"%d.%d\\n\", \$_hit_bpnum, \$_hit_locno" "$bpno" \ # seen by the program itself. gdb_test "print this_version_num == v" \ - " = 1" \ - "print libctxobj1's this_version_num from partial symtab" + " = 1" \ + "print libctxobj1's this_version_num from partial symtab" gdb_test "print this_version_num == v" \ - " = 1" \ - "print libctxobj1's this_version_num from symtab" + " = 1" \ + "print libctxobj1's this_version_num from symtab" # Do the same, but from get_version_2. set test "continue to get_version_2" @@ -118,9 +118,9 @@ gdb_test "printf \"%d.%d\\n\", \$_hit_bpnum, \$_hit_locno" "$bpno" \ "$test \$_hit_bpnum.\$_hit_locno is $bpno" gdb_test "print this_version_num == v" \ - " = 1" \ - "print libctxobj2's this_version_num from partial symtab" + " = 1" \ + "print libctxobj2's this_version_num from partial symtab" gdb_test "print this_version_num == v" \ - " = 1" \ - "print libctxobj2's this_version_num from symtab" + " = 1" \ + "print libctxobj2's this_version_num from symtab" diff --git a/gdb/testsuite/gdb.base/dcache-line-read-error.c b/gdb/testsuite/gdb.base/dcache-line-read-error.c index d47b9d64583..25f9026d42f 100644 --- a/gdb/testsuite/gdb.base/dcache-line-read-error.c +++ b/gdb/testsuite/gdb.base/dcache-line-read-error.c @@ -55,18 +55,18 @@ main (void) '---'---'---'---'---'---. | | | | <- line alignment ^^^^^^^ ^^^^^^^ - | | - + line1 + line2 + | | + + line1 + line2 Or: .---.---.---.---.---.---. | U | M | U | U | M | U | '---'---'---'---'---'---. - | | | <- line alignment - ^^^^^^^ ^^^^^^^ - | | - line1 + + line2 + | | | <- line alignment + ^^^^^^^ ^^^^^^^ + | | + line1 + + line2 Note we really want to test that dcache behaves correctly when reading a cache line fails. We're just using unmapped memory as diff --git a/gdb/testsuite/gdb.base/define-prefix.exp b/gdb/testsuite/gdb.base/define-prefix.exp index 91f22112ed7..818d7fac571 100644 --- a/gdb/testsuite/gdb.base/define-prefix.exp +++ b/gdb/testsuite/gdb.base/define-prefix.exp @@ -161,4 +161,3 @@ gdb_test "define-prefix something-not-existing something-else" \ gdb_test "define-prefix abc-prefix something-not-existing something-else" \ "Undefined abc-prefix command: \"something-not-existing\".*" - diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp index 7dd600687c8..10a0644a2e5 100644 --- a/gdb/testsuite/gdb.base/define.exp +++ b/gdb/testsuite/gdb.base/define.exp @@ -71,21 +71,21 @@ gdb_test "define nextwhere" \ send_gdb "define nextwhere\n" gdb_expect { -re "Redefine command \"nextwhere\".*y or n. $"\ - {send_gdb "y\n" - gdb_expect { - -re "Type commands for definition of \"nextwhere\".\r\nEnd with a line saying just \"end\".\r\n>$"\ - {send_gdb "bt\nnext\nend\n" - gdb_expect { - -re "$gdb_prompt $"\ - {pass "redefine user command: nextwhere"} - timeout {fail "(timeout) redefine user command: nextwhere"} - } - } - timeout {fail "(timeout) redefine user command: nextwhere"} - } - } + {send_gdb "y\n" + gdb_expect { + -re "Type commands for definition of \"nextwhere\".\r\nEnd with a line saying just \"end\".\r\n>$"\ + {send_gdb "bt\nnext\nend\n" + gdb_expect { + -re "$gdb_prompt $"\ + {pass "redefine user command: nextwhere"} + timeout {fail "(timeout) redefine user command: nextwhere"} + } + } + timeout {fail "(timeout) redefine user command: nextwhere"} + } + } -re "$gdb_prompt $"\ - {fail "redefine user command: nextwhere"} + {fail "redefine user command: nextwhere"} timeout {fail "(timeout) redefine user command: nextwhere"} } @@ -165,10 +165,10 @@ gdb_test_multiple "define ifnospace" "define user command: ifnospace" \ -re "Type commands for definition of \"ifnospace\".\r\nEnd with a line saying just \"end\".\r\n>$" \ { gdb_test_multiple "if(3<4)\nprint \"hi there\\n\"\nend\nend" "send body of ifnospace" \ - { - -re "$gdb_prompt $"\ - {pass "define user command: ifnospace"} - } + { + -re "$gdb_prompt $"\ + {pass "define user command: ifnospace"} + } } } @@ -214,10 +214,10 @@ gdb_test_multiple "define whilenospace" "define user command: whilenospace" \ -re "Type commands for definition of \"whilenospace\".\r\nEnd with a line saying just \"end\".\r\n>$" \ { gdb_test_multiple "set \$i=1\nwhile(\$i<2)\nset \$i=2\nprint \"hi there\\n\"\nend\nend" "send body of whilenospace" \ - { - -re "$gdb_prompt $" \ - {pass "define user command: whilenospace"} - } + { + -re "$gdb_prompt $" \ + {pass "define user command: whilenospace"} + } } } @@ -259,23 +259,23 @@ gdb_test "define hook-bar" \ send_gdb "define hook-bar\n" gdb_expect { -re "warning: Your new `hook-bar' command does not hook any existing command.\r\nProceed.*y or n. $"\ - {send_gdb "y\n" - gdb_expect { - -re "Type commands for definition of \"hook-bar\".\r\nEnd with a line saying just \"end\".\r\n>$"\ - {send_gdb "nextwhere\nend\n" - gdb_expect { - -re "$gdb_prompt $"\ - {pass "define hook undefined command: bar"} - timeout {fail "(timeout) define hook undefined command: bar"} - } - } - -re "$gdb_prompt $"\ - {fail "define hook undefined command: bar"} - timeout {fail "(timeout) define hook undefined command: bar"} - } - } + {send_gdb "y\n" + gdb_expect { + -re "Type commands for definition of \"hook-bar\".\r\nEnd with a line saying just \"end\".\r\n>$"\ + {send_gdb "nextwhere\nend\n" + gdb_expect { + -re "$gdb_prompt $"\ + {pass "define hook undefined command: bar"} + timeout {fail "(timeout) define hook undefined command: bar"} + } + } + -re "$gdb_prompt $"\ + {fail "define hook undefined command: bar"} + timeout {fail "(timeout) define hook undefined command: bar"} + } + } -re "$gdb_prompt $"\ - {fail "define hook undefined command: bar"} + {fail "define hook undefined command: bar"} timeout {fail "(timeout) define hook undefined command: bar"} } diff --git a/gdb/testsuite/gdb.base/del.exp b/gdb/testsuite/gdb.base/del.exp index 441e677e24c..90a1656b800 100644 --- a/gdb/testsuite/gdb.base/del.exp +++ b/gdb/testsuite/gdb.base/del.exp @@ -32,26 +32,26 @@ proc test_delete_alias { alias } { # First of all, remove all previous breakpoints if there were any, # and then verify that we do not have any breakpoint lying around. gdb_test_no_output "delete" \ - "remove all breakpoints" + "remove all breakpoints" gdb_test "info break" \ "No breakpoints, watchpoints, tracepoints, or catchpoints." \ - "info break after clearing breakpoints" + "info break after clearing breakpoints" # Now, insert a breakpoint at an easy location, and then remove it # using $alias. We verified that the removal worked by checking # the list of breakpoints. gdb_test "break -q main" \ - "Breakpoint.*at.* file .*$srcfile, line.*" \ - "breakpoint insertion" + "Breakpoint.*at.* file .*$srcfile, line.*" \ + "breakpoint insertion" gdb_test_no_output "$alias \$bpnum" \ - "Remove last breakpoint" + "Remove last breakpoint" gdb_test "info break" \ "No breakpoints, watchpoints, tracepoints, or catchpoints." \ - "info break after removing break on main" + "info break after removing break on main" } # Test various shortcut forms of the "delete" command. diff --git a/gdb/testsuite/gdb.base/dfp-exprs.exp b/gdb/testsuite/gdb.base/dfp-exprs.exp index 0a20cadb998..adeddfb5520 100644 --- a/gdb/testsuite/gdb.base/dfp-exprs.exp +++ b/gdb/testsuite/gdb.base/dfp-exprs.exp @@ -126,7 +126,7 @@ proc test_dfp_arithmetic_expressions {} { set dsuffix {"dd" "df" "dl"} foreach l $dsuffix { - foreach r $dsuffix { + foreach r $dsuffix { gdb_test "p 1.2${l} == 1.2${r}" " = 1" gdb_test "p 1.2${l} == 1.3${r}" " = 0" diff --git a/gdb/testsuite/gdb.base/dfp-test.c b/gdb/testsuite/gdb.base/dfp-test.c index aeb1f6b4282..7084ddd7bc7 100644 --- a/gdb/testsuite/gdb.base/dfp-test.c +++ b/gdb/testsuite/gdb.base/dfp-test.c @@ -121,21 +121,21 @@ struct decstruct static _Decimal32 arg0_32 (_Decimal32 arg0, _Decimal32 arg1, _Decimal32 arg2, - _Decimal32 arg3, _Decimal32 arg4, _Decimal32 arg5) + _Decimal32 arg3, _Decimal32 arg4, _Decimal32 arg5) { return arg0; } static _Decimal64 arg0_64 (_Decimal64 arg0, _Decimal64 arg1, _Decimal64 arg2, - _Decimal64 arg3, _Decimal64 arg4, _Decimal64 arg5) + _Decimal64 arg3, _Decimal64 arg4, _Decimal64 arg5) { return arg0; } static _Decimal128 arg0_128 (_Decimal128 arg0, _Decimal128 arg1, _Decimal128 arg2, - _Decimal128 arg3, _Decimal128 arg4, _Decimal128 arg5) + _Decimal128 arg3, _Decimal128 arg4, _Decimal128 arg5) { return arg0; } diff --git a/gdb/testsuite/gdb.base/disasm-end-cu.exp b/gdb/testsuite/gdb.base/disasm-end-cu.exp index 34f25bea6e6..d23876a8a45 100644 --- a/gdb/testsuite/gdb.base/disasm-end-cu.exp +++ b/gdb/testsuite/gdb.base/disasm-end-cu.exp @@ -35,15 +35,15 @@ if {$main_addr == 0 || $dummy_3_addr == 0 || $dummy_3_addr <= $main_addr} { gdb_test_multiple "disassemble /m ${main_addr},${dummy_3_addr}" "disassemble address range with source" { -re "Dump of assembler code from ${main_addr} to ${dummy_3_addr}:\r\nEnd of assembler dump\." { - fail "no output from the disassemble command" + fail "no output from the disassemble command" } -re "Line number 0 out of range;.* has $decimal lines\." { - fail "the disassemble command failed" + fail "the disassemble command failed" } -re "Dump of assembler code from ${main_addr} to ${dummy_3_addr}:\r\n.*main.*End of assembler dump\." { - pass "disassemble command returned some output" + pass "disassemble command returned some output" } -re ".*$gdb_prompt $" { - fail "unexpected output from disassemble command" + fail "unexpected output from disassemble command" } } diff --git a/gdb/testsuite/gdb.base/display.c b/gdb/testsuite/gdb.base/display.c index c711048ca41..c62d250d9cf 100644 --- a/gdb/testsuite/gdb.base/display.c +++ b/gdb/testsuite/gdb.base/display.c @@ -17,11 +17,11 @@ int do_loops() int *p_i = &i; for( i = 0; i < LOOP; i++ ) { /* set breakpoint 1 here */ - for( j = 0; j < LOOP; j++ ) { - for( k = 0; k < LOOP; k++ ) { - sum++; f++; force_mem (&k); - } - } + for( j = 0; j < LOOP; j++ ) { + for( k = 0; k < LOOP; k++ ) { + sum++; f++; force_mem (&k); + } + } } return i; /* set breakpoint 2 here */ } @@ -39,12 +39,12 @@ int do_vars() /* Need some code here to set breaks on. */ for( j = 0; j < LOOP; j++ ) { - if( p_c[j] == c ) { /* set breakpoint 3 here */ - j++; - } - else { - i++; - } + if( p_c[j] == c ) { /* set breakpoint 3 here */ + j++; + } + else { + i++; + } } return *p_i; diff --git a/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp b/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp index f3bdfb054d9..683d33e6cc7 100644 --- a/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp +++ b/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp @@ -65,7 +65,7 @@ proc get_info_shared {} { set ns $expect_out(3,string) set name $expect_out(4,string) - lappend libs [list $from $to $ns $name] + lappend libs [list $from $to $ns $name] exp_continue } diff --git a/gdb/testsuite/gdb.base/dmsym.exp b/gdb/testsuite/gdb.base/dmsym.exp index 3506ca733e5..ceef7242c0b 100644 --- a/gdb/testsuite/gdb.base/dmsym.exp +++ b/gdb/testsuite/gdb.base/dmsym.exp @@ -24,8 +24,8 @@ set testfile dmsym_main set dmsym_o [standard_output_file dmsym.o] if {[gdb_compile "${srcdir}/${subdir}/dmsym.c" \ - $dmsym_o \ - object {}] != ""} { + $dmsym_o \ + object {}] != ""} { untested "failed to compile object file" return -1 } @@ -51,13 +51,13 @@ set addr "0x\[0-9a-zA-Z\]+" # should not be used for breakpoint purposes. gdb_test "break test_minsym" \ - "Breakpoint $num at $addr.: file .*dmsym_main\\.c, line $num\\." + "Breakpoint $num at $addr.: file .*dmsym_main\\.c, line $num\\." # However, verify that the `info line' command, on the other hand, # finds both locations. gdb_test "info line test_minsym" \ - "Line $num of \".*dmsym_main\\.c\" .*\r\nNo line number information available for address $addr " + "Line $num of \".*dmsym_main\\.c\" .*\r\nNo line number information available for address $addr " # Now, run the program until we get past the call to test_minsym. # Except when using hardware breakpoints, inferior behavior is going @@ -68,11 +68,11 @@ gdb_breakpoint dmsym_main.c:[gdb_get_line_number "BREAK" dmsym_main.c] gdb_run_cmd gdb_test "" \ - "Breakpoint $num, test_minsym \\(\\) at.*" \ - "run until breakpoint at BREAK" + "Breakpoint $num, test_minsym \\(\\) at.*" \ + "run until breakpoint at BREAK" gdb_test "continue" \ - "Breakpoint $num, main \\(\\) at.*" + "Breakpoint $num, main \\(\\) at.*" gdb_test "print val" \ - " = 124" + " = 124" diff --git a/gdb/testsuite/gdb.base/dmsym_main.c b/gdb/testsuite/gdb.base/dmsym_main.c index 34235996e62..f2f67c05b51 100644 --- a/gdb/testsuite/gdb.base/dmsym_main.c +++ b/gdb/testsuite/gdb.base/dmsym_main.c @@ -32,5 +32,3 @@ main (void) return 1; return 0; } - - diff --git a/gdb/testsuite/gdb.base/dprintf-pending.exp b/gdb/testsuite/gdb.base/dprintf-pending.exp index f28e9696ccb..8bb705dfe4f 100644 --- a/gdb/testsuite/gdb.base/dprintf-pending.exp +++ b/gdb/testsuite/gdb.base/dprintf-pending.exp @@ -48,7 +48,7 @@ with_test_prefix "without symbols" { "y" gdb_test "info break" \ - "Num Type\[ \]+Disp Enb Address\[ \]+What.* + "Num Type\[ \]+Disp Enb Address\[ \]+What.* \[0-9\]+\[\t \]+dprintf.*keep y.*PENDING.*pendfunc1.*" \ "single pending dprintf info" diff --git a/gdb/testsuite/gdb.base/dtrace-probe.exp b/gdb/testsuite/gdb.base/dtrace-probe.exp index a91e31fd873..8a73378328f 100644 --- a/gdb/testsuite/gdb.base/dtrace-probe.exp +++ b/gdb/testsuite/gdb.base/dtrace-probe.exp @@ -23,24 +23,24 @@ proc dtrace_test {} { standard_testfile if {[dtrace_build_usdt_test_program] == -1} { - untested "failed to compile" - return -1 + untested "failed to compile" + return -1 } clean_restart gdb_load $binfile if {![runto_main]} { - return -1 + return -1 } gdb_test "print \$_probe_argc" "No probe at PC $hex" \ - "check argument not at probe point" + "check argument not at probe point" # Test the 'info probes' command. gdb_test "info probes dtrace" \ - "test *progress-counter *$hex +no.*test *two-locations *$hex +always.*test *two-locations *$hex +always.*" \ - "info probes dtrace" + "test *progress-counter *$hex +no.*test *two-locations *$hex +always.*test *two-locations *$hex +always.*" \ + "info probes dtrace" # Disabling the probe test:two-locations shall have no effect, # since no is-enabled probes are defined for it in the object @@ -85,17 +85,17 @@ proc dtrace_test {} { # Test probe arguments. gdb_test "print \$_probe_argc" " = 2" \ - "print \$_probe_argc for probe progress-counter" + "print \$_probe_argc for probe progress-counter" gdb_test "print \$_probe_arg0" \ - " = $hex \"application\"" \ - "print \$_probe_arg0 for probe progress-counter" + " = $hex \"application\"" \ + "print \$_probe_arg0 for probe progress-counter" gdb_test "print \$_probe_arg1" " = 1" \ - "print \$_probe_arg1 for probe progress-counter" + "print \$_probe_arg1 for probe progress-counter" # Set a breakpoint with multiple probe locations. gdb_test "break -pdtrace test:two-locations" \ - "Breakpoint \[0-9\]+ at $hex.*2 locations.*" \ - "set multi-location probe breakpoint (probe two-locations)" + "Breakpoint \[0-9\]+ at $hex.*2 locations.*" \ + "set multi-location probe breakpoint (probe two-locations)" return 0 } diff --git a/gdb/testsuite/gdb.base/empty_exe.exp b/gdb/testsuite/gdb.base/empty_exe.exp index bc6bd397ff3..dedf902b028 100644 --- a/gdb/testsuite/gdb.base/empty_exe.exp +++ b/gdb/testsuite/gdb.base/empty_exe.exp @@ -19,7 +19,7 @@ gdb_start # Make sure that the "file" command rejects an empty filename, # rather than crash. gdb_test "file ''" \ - ": No such file or directory\\." + ": No such file or directory\\." # And to make extra sure that GDB is still alive, do a quick # sanity check. diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp index 92815a74281..ca762fc0a7e 100644 --- a/gdb/testsuite/gdb.base/ena-dis-br.exp +++ b/gdb/testsuite/gdb.base/ena-dis-br.exp @@ -410,10 +410,10 @@ proc test_ena_dis_br { what } { # Now $b1.1 and $b2.1 should be enabled(disabled). gdb_test_multiple "info break" "$test1" { -re "(${b1})(\[^\n\r\]*)( n.*)(${b2})(\[^\n\r\]*)( n.*)$gdb_prompt $" { - $p1 "$test1" + $p1 "$test1" } -re ".*$gdb_prompt $" { - $p2 "$test1" + $p2 "$test1" } } @@ -448,11 +448,11 @@ proc test_ena_dis_br { what } { # $b4.1 should be enabled(disabled). gdb_test_multiple "info break" "$test1" { - -re "(${b4})(\[^\n\r\]*)( n.*)$gdb_prompt $" { - $p1 "$test1" + -re "(${b4})(\[^\n\r\]*)( n.*)$gdb_prompt $" { + $p1 "$test1" } -re ".*$gdb_prompt $" { - $p2 "$test1" + $p2 "$test1" } } } diff --git a/gdb/testsuite/gdb.base/ending-run.c b/gdb/testsuite/gdb.base/ending-run.c index a499f37a052..fd149cc6a2e 100644 --- a/gdb/testsuite/gdb.base/ending-run.c +++ b/gdb/testsuite/gdb.base/ending-run.c @@ -23,10 +23,10 @@ int main() p = (int *) malloc( 4 ); for (i = 1; i < 10; i++) - { - printf( "%d ", callee( i )); - fflush (stdout); - } + { + printf( "%d ", callee( i )); + fflush (stdout); + } printf( " Goodbye!\n" ); fflush (stdout); /* -break2- */ return 0; } diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp index 8c542efb004..b0313d50925 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -66,25 +66,25 @@ gdb_test "cle ending-run.c:$break1_line" \ gdb_test_multiple "info line ending-run.c:$break1_line" "" { -re ".*address (0x\[0-9a-fA-F]*).*$gdb_prompt $" { - set line_nine $expect_out(1,string) + set line_nine $expect_out(1,string) gdb_test "b ending-run.c:$break1_line" ".*Breakpoint 4.*ending-run.c, line $break1_line.*" gdb_test "b *$line_nine" ".*Note.*also.*Breakpoint 5.*" "breakpoint 7 at *ending-run.c:$break1_line" gdb_test "cle" "Deleted breakpoints 4 5 " "clear 2 by default" } -re ".*$gdb_prompt $" { - fail "need to fix test for new compile outcome" + fail "need to fix test for new compile outcome" } } gdb_test_multiple "i b" "all set to continue" { -re ".* breakpoint .* breakpoint .*$gdb_prompt $" { - fail "all set to continue (didn't clear bps)" + fail "all set to continue (didn't clear bps)" } -re ".*2.*main.*$break2_line.*$gdb_prompt $" { - pass "all set to continue" + pass "all set to continue" } -re ".*$gdb_prompt $" { - fail "all set to continue (missing bp at end)" + fail "all set to continue (missing bp at end)" } } @@ -184,13 +184,13 @@ gdb_test_multiple "next" "step out of main" { gdb_test "next" ".*in start_l ().*" "step out of main" } -re ".*in.*currently asm.*$gdb_prompt $" { - pass "step out of main" + pass "step out of main" } -re "_*start\[0-9\]* \\(\[^)\]*\\).*$gdb_prompt $" { - pass "step out of main" + pass "step out of main" } -re ".*Program received signal SIGTRAP.*$gdb_prompt $" { - pass "step out of main" + pass "step out of main" } -re ".*in.*__uClibc_main.*$gdb_prompt $" { # This is what happens on system using uClibc. @@ -249,7 +249,7 @@ if {!$use_gdb_stub set program_in_exit 1 } -re ".*Single.*_int_reset.*$gdb_prompt $" { - pass "step to end of run" + pass "step to end of run" if {![istarget "xstormy16-*-*"]} { set program_exited_normally 1 } @@ -266,7 +266,7 @@ if {!$use_gdb_stub } if {$program_exited_normally} { - gdb_test "n" ".*The program is not being run.*" "don't step after run" + gdb_test "n" ".*The program is not being run.*" "don't step after run" } elseif {$program_not_exited} { unresolved "don't step after run" } else { @@ -290,8 +290,3 @@ if {!$use_gdb_stub set timeout $old_timeout #remote_exec build "rm -f ${binfile}" - - - - - diff --git a/gdb/testsuite/gdb.base/enum_cond.exp b/gdb/testsuite/gdb.base/enum_cond.exp index 5c78ec90fae..9317fd0b890 100644 --- a/gdb/testsuite/gdb.base/enum_cond.exp +++ b/gdb/testsuite/gdb.base/enum_cond.exp @@ -45,10 +45,9 @@ if {![runto_main]} { } gdb_test "break call_me if param.e == 1" \ - "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal\\." + "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal\\." # Continue. We should hit our breakpoint... gdb_test "continue" \ - "Breakpoint $decimal, call_me \\(param=\\.\\.\\.\\) at .*" \ - "continue to conditional breakpoint in call_me" - + "Breakpoint $decimal, call_me \\(param=\\.\\.\\.\\) at .*" \ + "continue to conditional breakpoint in call_me" diff --git a/gdb/testsuite/gdb.base/examine-backward.c b/gdb/testsuite/gdb.base/examine-backward.c index b986a6cb25d..dbeda41f148 100644 --- a/gdb/testsuite/gdb.base/examine-backward.c +++ b/gdb/testsuite/gdb.base/examine-backward.c @@ -117,14 +117,14 @@ main (void) for (i = 0; i < len - 1; ++i) { for (j = i; j < len; ++j) - { - if (n[j] < n[i]) - { - int tmp = n[i]; - n[i] = n[j]; - n[j] = tmp; - } - } + { + if (n[j] < n[i]) + { + int tmp = n[i]; + n[i] = n[j]; + n[j] = tmp; + } + } } return 42; } diff --git a/gdb/testsuite/gdb.base/examine-backward.exp b/gdb/testsuite/gdb.base/examine-backward.exp index 0eef3270cc7..d2cf3ffdf6d 100644 --- a/gdb/testsuite/gdb.base/examine-backward.exp +++ b/gdb/testsuite/gdb.base/examine-backward.exp @@ -18,7 +18,7 @@ standard_testfile if { [prepare_for_testing "failed to prepare for examine-backward" \ - ${testfile} ${srcfile}] } { + ${testfile} ${srcfile}] } { return -1 } @@ -31,23 +31,23 @@ proc get_first_mapped_address {} { set addr "0" gdb_test_multiple "info proc mappings" "info proc mappings" { - -re "objfile\[\r\n\t \]+(0x\[0-9a-fA-F\]+).*\[\r\n\]*$gdb_prompt $" { - set addr $expect_out(1,string) - } - -re "$gdb_prompt $" { - unsupported "current target does not support 'info proc mappings'" - } + -re "objfile\[\r\n\t \]+(0x\[0-9a-fA-F\]+).*\[\r\n\]*$gdb_prompt $" { + set addr $expect_out(1,string) + } + -re "$gdb_prompt $" { + unsupported "current target does not support 'info proc mappings'" + } } return ${addr} } with_test_prefix "invalid format" { gdb_test "x/- 10xb main" "Invalid number \"10xb\"\." \ - "a whitespace after a leading hyphen" + "a whitespace after a leading hyphen" gdb_test "x/--10xb main" "Invalid number \"10xb\"\." \ - "double hyphen" + "double hyphen" gdb_test "x/-a10xb main" "Invalid number \"10xb\"\." \ - "an alphabet after a leading hyphen" + "an alphabet after a leading hyphen" gdb_test_no_output "x/-0i main" "zero with backward disassemble" gdb_test_no_output "x/-0sh main" "zero with backward examine string" } @@ -55,29 +55,29 @@ with_test_prefix "invalid format" { with_test_prefix "memory page boundary" { set boundary [get_first_mapped_address] if {![is_address_zero_readable] && $boundary != 0} { - gdb_test_no_output "set print elements 0" - gdb_test_sequence "x/3s ${boundary}" "take 3 strings forward" { - "0x" - "0x" - "0x" - } - gdb_test_sequence "x/-4s" "take 4 strings backward" { - "Cannot access memory at address 0x" - "0x" - "0x" - "0x" - } - gdb_test_sequence "x/3s ${boundary}" "take 3 strings forward again" { - "0x" - "0x" - "0x" - } - gdb_test_sequence "x/-3s" "take 3 strings backward" { - "Cannot access memory at address 0x" - "0x" - "0x" - "0x" - } + gdb_test_no_output "set print elements 0" + gdb_test_sequence "x/3s ${boundary}" "take 3 strings forward" { + "0x" + "0x" + "0x" + } + gdb_test_sequence "x/-4s" "take 4 strings backward" { + "Cannot access memory at address 0x" + "0x" + "0x" + "0x" + } + gdb_test_sequence "x/3s ${boundary}" "take 3 strings forward again" { + "0x" + "0x" + "0x" + } + gdb_test_sequence "x/-3s" "take 3 strings backward" { + "Cannot access memory at address 0x" + "0x" + "0x" + "0x" + } } } @@ -146,29 +146,29 @@ gdb_test_no_output "set charset ASCII" with_test_prefix "char-width=1, print-max=20" { gdb_test_no_output "set print elements 20" gdb_test_sequence "x/6s TestStrings" "take 6 strings forward" { - "\"ABCDEFGHIJKLMNOPQRST\"\.\.\." - "\"UVWXYZ\"" - "\"\"" - "\"\"" - "\"[^\"]+\"" - "\"01234567890123456789\"\.\.\." + "\"ABCDEFGHIJKLMNOPQRST\"\.\.\." + "\"UVWXYZ\"" + "\"\"" + "\"\"" + "\"[^\"]+\"" + "\"01234567890123456789\"\.\.\." } gdb_test "x/-1xb" "0x39" "take 1 char backward" gdb_test_sequence "x/-6s" "take 6 strings backward" { - "\"ABCDEFGHIJKLMNOPQRST\"\.\.\." - "\"UVWXYZ\"" - "\"\"" - "\"\"" - "\"[^\"]+\"" - "\"01234567890123456789\"\.\.\." + "\"ABCDEFGHIJKLMNOPQRST\"\.\.\." + "\"UVWXYZ\"" + "\"\"" + "\"\"" + "\"[^\"]+\"" + "\"01234567890123456789\"\.\.\." } gdb_test_sequence "x/6s TestStrings" "take 6 strings forward again" { - "\"ABCDEFGHIJKLMNOPQRST\"\.\.\." - "\"UVWXYZ\"" - "\"\"" - "\"\"" - "\"[^\"]+\"" - "\"01234567890123456789\"\.\.\." + "\"ABCDEFGHIJKLMNOPQRST\"\.\.\." + "\"UVWXYZ\"" + "\"\"" + "\"\"" + "\"[^\"]+\"" + "\"01234567890123456789\"\.\.\." } gdb_test "x/-xb" "0x39" "take 1 char backward again" gdb_test "x/-s" "\"01234567890123456789\"\.\.\." \ @@ -188,29 +188,29 @@ with_test_prefix "char-width=1, print-max=20" { with_test_prefix "char-width=2, print-max=20" { gdb_test_no_output "set print elements 20" gdb_test_sequence "x/6sh TestStringsH" "take 6 strings forward" { - "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\." - "u\"UVWXYZ\"" - "u\"\"" - "u\"\"" - "u\"[^\"]+\"" - "u\"01234567890123456789\"\.\.\." + "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\." + "u\"UVWXYZ\"" + "u\"\"" + "u\"\"" + "u\"[^\"]+\"" + "u\"01234567890123456789\"\.\.\." } gdb_test "x/-1xh" "0x0039" "take 1 char backward" gdb_test_sequence "x/-6sh" "take 6 strings backward" { - "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\." - "u\"UVWXYZ\"" - "u\"\"" - "u\"\"" - "u\"[^\"]+\"" - "u\"01234567890123456789\"\.\.\." + "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\." + "u\"UVWXYZ\"" + "u\"\"" + "u\"\"" + "u\"[^\"]+\"" + "u\"01234567890123456789\"\.\.\." } gdb_test_sequence "x/6sh TestStringsH" "take 6 strings forward again" { - "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\." - "u\"UVWXYZ\"" - "u\"\"" - "u\"\"" - "u\"[^\"]+\"" - "u\"01234567890123456789\"\.\.\." + "u\"ABCDEFGHIJKLMNOPQRST\"\.\.\." + "u\"UVWXYZ\"" + "u\"\"" + "u\"\"" + "u\"[^\"]+\"" + "u\"01234567890123456789\"\.\.\." } gdb_test "x/-xh" "0x0039" "take 1 char backward again" gdb_test "x/-sh" "u\"01234567890123456789\"\.\.\." \ @@ -230,29 +230,29 @@ with_test_prefix "char-width=2, print-max=20" { with_test_prefix "char-width=4, print-max=20" { gdb_test_no_output "set print elements 20" gdb_test_sequence "x/6sw TestStringsW" "take 6 strings forward" { - "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\." - "U\"UVWXYZ\"" - "U\"\"" - "U\"\"" - "U\"[^\"]+\"" - "U\"01234567890123456789\"\.\.\." + "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\." + "U\"UVWXYZ\"" + "U\"\"" + "U\"\"" + "U\"[^\"]+\"" + "U\"01234567890123456789\"\.\.\." } gdb_test "x/-1xw" "0x00000039" "take 1 char backward" gdb_test_sequence "x/-6sw" "take 6 strings backward" { - "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\." - "U\"UVWXYZ\"" - "U\"\"" - "U\"\"" - "U\"[^\"]+\"" - "U\"01234567890123456789\"\.\.\." + "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\." + "U\"UVWXYZ\"" + "U\"\"" + "U\"\"" + "U\"[^\"]+\"" + "U\"01234567890123456789\"\.\.\." } gdb_test_sequence "x/6sw TestStringsW" "take 6 strings forward again" { - "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\." - "U\"UVWXYZ\"" - "U\"\"" - "U\"\"" - "U\"[^\"]+\"" - "U\"01234567890123456789\"\.\.\." + "U\"ABCDEFGHIJKLMNOPQRST\"\.\.\." + "U\"UVWXYZ\"" + "U\"\"" + "U\"\"" + "U\"[^\"]+\"" + "U\"01234567890123456789\"\.\.\." } gdb_test "x/-xw" "0x00000039" "take 1 char backward again" gdb_test "x/-sw" "U\"01234567890123456789\"\.\.\." \ @@ -272,30 +272,30 @@ with_test_prefix "char-width=4, print-max=20" { with_test_prefix "char-width=2, print-max=0" { gdb_test_no_output "set print elements 0" gdb_test_sequence "x/6sh TestStringsH" "take 6 strings forward" { - "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"" - "u\"\"" - "u\"\"" - "u\"\\\\x307b\\\\x3052\\\\x307b\\\\x3052\"" - "u\"012345678901234567890123456789\"" - "u\"!!!!!!\"" + "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"" + "u\"\"" + "u\"\"" + "u\"\\\\x307b\\\\x3052\\\\x307b\\\\x3052\"" + "u\"012345678901234567890123456789\"" + "u\"!!!!!!\"" } gdb_test "x/-4xh" "0x0021\[\t \]+0x0021\[\t \]+0x0021\[\t \]+0x0000" \ - "take 4 characters backward" + "take 4 characters backward" gdb_test_sequence "x/-6sh" "take 6 strings backward" { - "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"" - "u\"\"" - "u\"\"" - "u\"[^\"]+\"" - "u\"012345678901234567890123456789\"" - "u\"!!!!!!\"" + "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"" + "u\"\"" + "u\"\"" + "u\"[^\"]+\"" + "u\"012345678901234567890123456789\"" + "u\"!!!!!!\"" } gdb_test_sequence "x/6sh TestStringsH" "take 6 strings forward again" { - "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"" - "u\"\"" - "u\"\"" - "u\"\\\\x307b\\\\x3052\\\\x307b\\\\x3052\"" - "u\"012345678901234567890123456789\"" - "u\"!!!!!!\"" + "u\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"" + "u\"\"" + "u\"\"" + "u\"\\\\x307b\\\\x3052\\\\x307b\\\\x3052\"" + "u\"012345678901234567890123456789\"" + "u\"!!!!!!\"" } gdb_test "x/-xh" "0x0000" "take 1 char backward" gdb_test "x/-sh" "u\"!!!!!!\"" \ @@ -315,28 +315,28 @@ with_test_prefix "char-width=2, print-max=0" { with_test_prefix "char-width=1, print-max=4" { gdb_test_no_output "set print elements 4" gdb_test_sequence "x/9s TestStrings" "take 9 strings forward" { - "\"ABCD\"\.\.\." - "\"EFGH\"\.\.\." - "\"IJKL\"\.\.\." - "\"MNOP\"\.\.\." - "\"QRST\"\.\.\." - "\"UVWX\"\.\.\." - "\"YZ\"" - "\"\"" - "\"\"" + "\"ABCD\"\.\.\." + "\"EFGH\"\.\.\." + "\"IJKL\"\.\.\." + "\"MNOP\"\.\.\." + "\"QRST\"\.\.\." + "\"UVWX\"\.\.\." + "\"YZ\"" + "\"\"" + "\"\"" } gdb_test "x/-xb" "0x00" "take 1 byte backward" gdb_test_sequence "x/-4s" "take 4 strings backward, 1/2" { - "\"TUVW\"\.\.\." - "\"XYZ\"" - "\"\"" - "\"\"" + "\"TUVW\"\.\.\." + "\"XYZ\"" + "\"\"" + "\"\"" } gdb_test_sequence "x/-4s" "take 4 strings backward, 2/2" { - "\"CDEF\"\.\.\." - "\"GHIJ\"\.\.\." - "\"KLMN\"\.\.\." - "\"OPQR\"\.\.\." + "\"CDEF\"\.\.\." + "\"GHIJ\"\.\.\." + "\"KLMN\"\.\.\." + "\"OPQR\"\.\.\." } } @@ -352,19 +352,19 @@ with_test_prefix "backward disassemble general" { gdb_test "x/-i" "0x\[0-9a-fA-F\]+ <$main_re>:\t.*" \ "move the current position to main, x/-i" for {set i 0} {$i < [llength $length_to_examine]} {incr i} { - set len [lindex $length_to_examine $i] - set instructions [capture_command_output "x/${len}i" ""] - lappend disassmbly $instructions + set len [lindex $length_to_examine $i] + set instructions [capture_command_output "x/${len}i" ""] + lappend disassmbly $instructions } for {set i 0} {$i < [llength $length_to_examine]} {incr i} { - set idx [expr {[llength $length_to_examine] - $i - 1}] - set len [lindex $length_to_examine $idx] - set actual [capture_command_output "x/-${len}i" ""] - set expected [lindex $disassmbly $idx] - if {$actual == $expected} { - pass "inst:$idx" - } else { - fail "inst:$idx" - } + set idx [expr {[llength $length_to_examine] - $i - 1}] + set len [lindex $length_to_examine $idx] + set actual [capture_command_output "x/-${len}i" ""] + set expected [lindex $disassmbly $idx] + if {$actual == $expected} { + pass "inst:$idx" + } else { + fail "inst:$idx" + } } } diff --git a/gdb/testsuite/gdb.base/exe-lock.exp b/gdb/testsuite/gdb.base/exe-lock.exp index 2e375b4ed71..fe4af579253 100644 --- a/gdb/testsuite/gdb.base/exe-lock.exp +++ b/gdb/testsuite/gdb.base/exe-lock.exp @@ -52,5 +52,3 @@ file delete $binfile if { [file exists $binfile] } { fail "executable still exists (${binfile})" } - - diff --git a/gdb/testsuite/gdb.base/expand-psymtabs.exp b/gdb/testsuite/gdb.base/expand-psymtabs.exp index 981a06d3664..bdbc6781291 100644 --- a/gdb/testsuite/gdb.base/expand-psymtabs.exp +++ b/gdb/testsuite/gdb.base/expand-psymtabs.exp @@ -39,4 +39,3 @@ if {[prepare_for_testing_full "failed to prepare" \ set foo_bp [gdb_get_line_number "Break here"] gdb_test "break $foo_bp" "Breakpoint.*" "expand psymtabs" - diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c index 4557cc55f7d..37337ef41e7 100644 --- a/gdb/testsuite/gdb.base/fileio.c +++ b/gdb/testsuite/gdb.base/fileio.c @@ -156,7 +156,7 @@ test_write (void) errno = 0; ret = write (fd, STRING, strlen (STRING)); printf ("write 1: ret = %d, errno = %d %s\n", ret, errno, - ret == strlen (STRING) ? "OK" : ""); + ret == strlen (STRING) ? "OK" : ""); close (fd); } else @@ -200,7 +200,7 @@ test_read (void) ret = read (fd, buf, 16); buf[15] = '\0'; /* Don't trust anybody... */ if (ret == strlen (STRING)) - printf ("read 1: %s %s\n", buf, !strcmp (buf, STRING) ? "OK" : ""); + printf ("read 1: %s %s\n", buf, !strcmp (buf, STRING) ? "OK" : ""); else printf ("read 1: ret = %d, errno = %d\n", ret, errno); close (fd); @@ -230,17 +230,17 @@ test_lseek (void) errno = 0; ret = lseek (fd, 0, SEEK_CUR); printf ("lseek 1: ret = %ld, errno = %d, %s\n", (long) ret, errno, - ret == 0 ? "OK" : ""); + ret == 0 ? "OK" : ""); stop (); errno = 0; ret = lseek (fd, 0, SEEK_END); printf ("lseek 2: ret = %ld, errno = %d, %s\n", (long) ret, errno, - ret == 11 ? "OK" : ""); + ret == 11 ? "OK" : ""); stop (); errno = 0; ret = lseek (fd, 3, SEEK_SET); printf ("lseek 3: ret = %ld, errno = %d, %s\n", (long) ret, errno, - ret == 3 ? "OK" : ""); + ret == 3 ? "OK" : ""); close (fd); } else @@ -271,7 +271,7 @@ test_close (void) errno = 0; ret = close (fd); printf ("close 1: ret = %d, errno = %d, %s\n", ret, errno, - ret == 0 ? "OK" : ""); + ret == 0 ? "OK" : ""); } else printf ("close 1: errno = %d\n", errno); @@ -280,7 +280,7 @@ test_close (void) errno = 0; ret = close (999); printf ("close 2: ret = %d, errno = %d, %s\n", ret, errno, - strerrno (errno)); + strerrno (errno)); stop (); } @@ -303,19 +303,19 @@ test_stat (void) errno = 0; ret = stat (null_str, &st); printf ("stat 2: ret = %d, errno = %d %s\n", ret, errno, - strerrno (errno)); + strerrno (errno)); stop (); /* Empty pathname */ errno = 0; ret = stat ("", &st); printf ("stat 3: ret = %d, errno = %d %s\n", ret, errno, - strerrno (errno)); + strerrno (errno)); stop (); /* Nonexistant file */ errno = 0; ret = stat (NONEXISTANT, &st); printf ("stat 4: ret = %d, errno = %d %s\n", ret, errno, - strerrno (errno)); + strerrno (errno)); stop (); } @@ -346,7 +346,7 @@ test_fstat (void) errno = 0; ret = fstat (999, &st); printf ("fstat 2: ret = %d, errno = %d %s\n", ret, errno, - strerrno (errno)); + strerrno (errno)); stop (); } @@ -426,7 +426,7 @@ test_rename (void) errno = 0; ret = stat (FILENAME, &st); if (ret && errno == ENOENT) - { + { errno = 0; ret = stat (OUTDIR RENAMED, &st); printf ("rename 1: ret = %d, errno = %d %s\n", ret, errno, @@ -449,7 +449,7 @@ test_rename (void) errno = 0; ret = rename (OUTDIR TESTDIR2, OUTDIR TESTDIR1); printf ("rename 3: ret = %d, errno = %d %s\n", ret, errno, - strerrno (errno)); + strerrno (errno)); stop (); /* newpath is a subdirectory of old path */ errno = 0; @@ -487,12 +487,12 @@ test_unlink (void) sprintf (sys, "chmod -w %s/%s", OUTDIR, TESTDIR2); ret = system (sys); if (!ret) - { + { errno = 0; ret = unlink (name); printf ("unlink 2: ret = %d, errno = %d %s\n", ret, errno, strerrno (errno)); - } + } else printf ("unlink 2: ret = %d chmod failed, errno= %d\n", ret, errno); } @@ -503,7 +503,7 @@ test_unlink (void) errno = 0; ret = unlink (OUTDIR NONEXISTANT); printf ("unlink 3: ret = %d, errno = %d %s\n", ret, errno, - strerrno (errno)); + strerrno (errno)); stop (); } diff --git a/gdb/testsuite/gdb.base/finish.exp b/gdb/testsuite/gdb.base/finish.exp index d68863b1ff6..af1d79b2563 100644 --- a/gdb/testsuite/gdb.base/finish.exp +++ b/gdb/testsuite/gdb.base/finish.exp @@ -77,12 +77,12 @@ proc finish_void { } { proc finish_abbreviation { abbrev } { if {![runto "int_func"]} { - return -1 + return -1 } gdb_test "$abbrev" \ - "Value returned is .* = 1" \ - "Testing the \"$abbrev\" abbreviation for \"finish\"" + "Value returned is .* = 1" \ + "Testing the \"$abbrev\" abbreviation for \"finish\"" } # Test "set print finish off". diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp index 278b3f55474..bb350ed1f4b 100644 --- a/gdb/testsuite/gdb.base/float.exp +++ b/gdb/testsuite/gdb.base/float.exp @@ -49,8 +49,8 @@ if {[is_aarch64_target]} { # if we have NEON. pass "info float (VFP)" } - -re "No floating.point info available for this processor.*$gdb_prompt $" { - pass "info float (without FPU)" + -re "No floating.point info available for this processor.*$gdb_prompt $" { + pass "info float (without FPU)" } } } elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} { @@ -59,11 +59,11 @@ if {[is_aarch64_target]} { gdb_test "info float" "f0.*f1.*f127.*" } elseif {[istarget "m68k-*-*"]} { gdb_test_multiple "info float" "info_float" { - -re "fp0.*fp1.*fp7.*$gdb_prompt $" { - pass "info float (with FPU)" + -re "fp0.*fp1.*fp7.*$gdb_prompt $" { + pass "info float (with FPU)" } - -re "No floating.point info available for this processor.*$gdb_prompt $" { - pass "info float (without FPU)" + -re "No floating.point info available for this processor.*$gdb_prompt $" { + pass "info float (without FPU)" } } } elseif {[istarget "mips*-*-*"]} { @@ -77,20 +77,20 @@ if {[is_aarch64_target]} { } } elseif {[istarget "nds32*-*-*"]} { gdb_test_multiple "info float" "info_float" { - -re "fd0.*fd3.*$gdb_prompt $" { - pass "info float (with FPU)" + -re "fd0.*fd3.*$gdb_prompt $" { + pass "info float (with FPU)" } - -re "No floating.point info available for this processor.*$gdb_prompt $" { - pass "info float (without FPU)" + -re "No floating.point info available for this processor.*$gdb_prompt $" { + pass "info float (without FPU)" } } } elseif {[istarget "powerpc*-*-*"]} { gdb_test_multiple "info float" "info_float" { - -re "f0.*f1.*f31.*fpscr.*$gdb_prompt $" { - pass "info float (with FPU)" + -re "f0.*f1.*f31.*fpscr.*$gdb_prompt $" { + pass "info float (with FPU)" } - -re "No floating.point info available for this processor.*$gdb_prompt $" { - pass "info float (without FPU)" + -re "No floating.point info available for this processor.*$gdb_prompt $" { + pass "info float (without FPU)" } } } elseif {[istarget "s390*-*-*"]} { diff --git a/gdb/testsuite/gdb.base/foll-exec.exp.tcl b/gdb/testsuite/gdb.base/foll-exec.exp.tcl index 64bcea857f8..dc65d956506 100644 --- a/gdb/testsuite/gdb.base/foll-exec.exp.tcl +++ b/gdb/testsuite/gdb.base/foll-exec.exp.tcl @@ -119,21 +119,21 @@ proc do_exec_tests { execer_lang execee_lang } { send_gdb "print global_i\n" gdb_expect { -re ".* = 100.*$gdb_prompt $"\ - {pass "print follow-exec/global_i"} + {pass "print follow-exec/global_i"} -re "$gdb_prompt $" {fail "print follow-exec/global_i"} timeout {fail "(timeout) print follow-exec/global_i"} } send_gdb "print local_j\n" gdb_expect { -re ".* = 101.*$gdb_prompt $"\ - {pass "print follow-exec/local_j"} + {pass "print follow-exec/local_j"} -re "$gdb_prompt $" {fail "print follow-exec/local_j"} timeout {fail "(timeout) print follow-exec/local_j"} } send_gdb "print local_k\n" gdb_expect { -re ".* = 102.*$gdb_prompt $"\ - {pass "print follow-exec/local_k"} + {pass "print follow-exec/local_k"} -re "$gdb_prompt $" {fail "print follow-exec/local_k"} timeout {fail "(timeout) print follow-exec/local_k"} } @@ -145,7 +145,7 @@ proc do_exec_tests { execer_lang execee_lang } { send_gdb "next\n" gdb_expect { -re ".*xecuting new program: .*${execee_testfile_re}.*${srcfile2}:${execd_line}.*int local_j = argc;.*$gdb_prompt $"\ - {pass "step through execlp call"} + {pass "step through execlp call"} -re "$gdb_prompt $" {fail "step through execlp call"} timeout {fail "(timeout) step through execlp call"} } @@ -156,7 +156,7 @@ proc do_exec_tests { execer_lang execee_lang } { send_gdb "next\n" gdb_expect { -re "printf \\(.Hello .*$gdb_prompt $"\ - {pass "step after execlp call"} + {pass "step after execlp call"} -re "$gdb_prompt $" {fail "step after execlp call"} timeout {fail "(timeout) step after execlp call"} } @@ -201,7 +201,7 @@ proc do_exec_tests { execer_lang execee_lang } { send_gdb "catch exec\n" gdb_expect { -re "Catchpoint .*(exec).*$gdb_prompt $"\ - {pass "set catch exec"} + {pass "set catch exec"} -re "$gdb_prompt $" {fail "set catch exec"} timeout {fail "(timeout) set catch exec"} } @@ -212,14 +212,14 @@ proc do_exec_tests { execer_lang execee_lang } { set msg "info shows catchpoint without exec pathname" gdb_test_multiple "info breakpoints" $msg { -re ".*catchpoint.*keep y.*exec\[\n\r\]+$gdb_prompt $" { - pass $msg + pass $msg } } send_gdb "continue\n" gdb_expect { -re ".*xecuting new program:.*${execee_testfile_re}.*Catchpoint .*(exec\'d .*${execee_testfile_re}).*$gdb_prompt $"\ - {pass "hit catch exec"} + {pass "hit catch exec"} -re "$gdb_prompt $" {fail "hit catch exec"} timeout {fail "(timeout) hit catch exec"} } @@ -236,7 +236,7 @@ proc do_exec_tests { execer_lang execee_lang } { set msg "info shows catchpoint exec pathname" gdb_test_multiple "info breakpoints" $msg { -re ".*catchpoint.*keep y.*exec, program \".*${execee_testfile_re}\".*$gdb_prompt $" { - pass $msg + pass $msg } } @@ -246,7 +246,7 @@ proc do_exec_tests { execer_lang execee_lang } { send_gdb "continue\n" gdb_expect { -re ".*${srcfile2}:${execd_line}.*$gdb_prompt $"\ - {pass "continue after hit catch exec"} + {pass "continue after hit catch exec"} -re "$gdb_prompt $" {fail "continue after hit catch exec"} timeout {fail "(timeout) continue after hit catch exec"} } @@ -276,14 +276,14 @@ proc do_exec_tests { execer_lang execee_lang } { send_gdb "tbreak ${tbreak_line}\n" gdb_expect { -re "Temporary breakpoint .*file .*${srcfile}, line ${tbreak_line}.*$gdb_prompt $"\ - {pass "prepare to jump to execl call"} + {pass "prepare to jump to execl call"} -re "$gdb_prompt $" {fail "prepare to jump to execl call"} timeout {fail "(timeout) prepare to jump to execl call"} } send_gdb "jump ${tbreak_line}\n" gdb_expect { -re "main.* at .*${srcfile}:${tbreak_line}.*$gdb_prompt $"\ - {pass "jump to execl call"} + {pass "jump to execl call"} -re "$gdb_prompt $" {fail "jump to execl call"} timeout {fail "(timeout) jump to execl call"} } @@ -296,14 +296,14 @@ proc do_exec_tests { execer_lang execee_lang } { send_gdb "next 2\n" gdb_expect { -re ".*xecuting new program: .*${execee_testfile_re}.*${srcfile2}:${execd_line}.*int local_j = argc;.*$gdb_prompt $"\ - {pass "step through execl call"} + {pass "step through execl call"} -re "$gdb_prompt $" {fail "step through execl call"} timeout {fail "(timeout) step through execl call"} } send_gdb "next\n" gdb_expect { -re "printf \\(.Hello .*$gdb_prompt $"\ - {pass "step after execl call"} + {pass "step after execl call"} -re "$gdb_prompt $" {fail "step after execl call"} timeout {fail "(timeout) step after execl call"} } @@ -344,28 +344,28 @@ proc do_exec_tests { execer_lang execee_lang } { send_gdb "tbreak ${tbreak_line}\n" gdb_expect { -re "Temporary breakpoint .*file .*${srcfile}, line ${tbreak_line}.*$gdb_prompt $"\ - {pass "prepare to jump to execv call"} + {pass "prepare to jump to execv call"} -re "$gdb_prompt $" {fail "prepare to jump to execv call"} timeout {fail "(timeout) prepare to jump to execv call"} } send_gdb "jump ${tbreak_line}\n" gdb_expect { -re "main.* at .*${srcfile}:${tbreak_line}.*$gdb_prompt $"\ - {pass "jump to execv call"} + {pass "jump to execv call"} -re "$gdb_prompt $" {fail "jump to execv call"} timeout {fail "(timeout) jump to execv call"} } send_gdb "next\n" gdb_expect { -re ".*xecuting new program: .*${execee_testfile_re}.*${srcfile2}:${execd_line}.*int local_j = argc;.*$gdb_prompt $"\ - {pass "step through execv call"} + {pass "step through execv call"} -re "$gdb_prompt $" {fail "step through execv call"} timeout {fail "(timeout) step through execv call"} } send_gdb "next\n" gdb_expect { -re "printf \\(.Hello .*$gdb_prompt $"\ - {pass "step after execv call"} + {pass "step after execv call"} -re "$gdb_prompt $" {fail "step after execv call"} timeout {fail "(timeout) step after execv call"} } @@ -399,7 +399,7 @@ proc do_exec_tests { execer_lang execee_lang } { send_gdb "continue\n" gdb_expect { -re ".*xecuting new program: .*${execee_testfile_re}.*${srcfile2}:${execd_line}.*int local_j = argc;.*$gdb_prompt $"\ - {pass "continue through exec"} + {pass "continue through exec"} -re "$gdb_prompt $" {fail "continue through exec"} timeout {fail "(timeout) continue through exec"} } diff --git a/gdb/testsuite/gdb.base/frame-args.exp b/gdb/testsuite/gdb.base/frame-args.exp index 0daa3aa3ef1..602c8e9e99d 100644 --- a/gdb/testsuite/gdb.base/frame-args.exp +++ b/gdb/testsuite/gdb.base/frame-args.exp @@ -29,37 +29,37 @@ if {![runto break_me]} { # Test with "print frame-arguments" set to "all" gdb_test_no_output "set print frame-arguments all" \ - "set print frame-arguments all" + "set print frame-arguments all" gdb_test "frame 1" \ - ".*in call_me \\(i=3, f=5, s=({a = 3, b = 5}|), ss=0x\[0-9a-f\]\+, u=({.*}|), e=green\\) at .*frame-args\\.c:.*" \ - "frame 1 with print frame-arguments set to all" + ".*in call_me \\(i=3, f=5, s=({a = 3, b = 5}|), ss=0x\[0-9a-f\]\+, u=({.*}|), e=green\\) at .*frame-args\\.c:.*" \ + "frame 1 with print frame-arguments set to all" # Test with "print frame-arguments" set to "scalars" gdb_test_no_output "set print frame-arguments scalars" \ - "set print frame-arguments scalars" + "set print frame-arguments scalars" gdb_test "frame 1" \ - ".*in call_me \\(i=3, f=5, s=\\.\\.\\., ss=0x\[0-9a-f\]\+, u=\\.\\.\\., e=green\\) at .*frame-args\\.c:.*" \ - "frame 1 with print frame-arguments set to scalars" + ".*in call_me \\(i=3, f=5, s=\\.\\.\\., ss=0x\[0-9a-f\]\+, u=\\.\\.\\., e=green\\) at .*frame-args\\.c:.*" \ + "frame 1 with print frame-arguments set to scalars" # Test with "print frame-arguments" set to "none" gdb_test_no_output "set print frame-arguments none" \ - "set print frame-arguments none" + "set print frame-arguments none" gdb_test "frame 1" \ - ".*in call_me \\(i=\\.\\.\\., f=\\.\\.\\., s=\\.\\.\\., ss=\\.\\.\\., u=\\.\\.\\., e=\\.\\.\\.\\) at .*frame-args\\.c:.*" \ - "frame 1 with print frame-arguments set to none" + ".*in call_me \\(i=\\.\\.\\., f=\\.\\.\\., s=\\.\\.\\., ss=\\.\\.\\., u=\\.\\.\\., e=\\.\\.\\.\\) at .*frame-args\\.c:.*" \ + "frame 1 with print frame-arguments set to none" # Test with "print frame-arguments" set to "presence" gdb_test_no_output "set print frame-arguments presence" \ - "set print frame-arguments presence" + "set print frame-arguments presence" gdb_test "frame 1" \ - ".*in call_me \\(\\.\\.\\.\\) at .*frame-args\\.c:.*" \ - "frame 1 with print frame-arguments set to presence" + ".*in call_me \\(\\.\\.\\.\\) at .*frame-args\\.c:.*" \ + "frame 1 with print frame-arguments set to presence" gdb_test "frame 2" \ - ".*in main \\(\\) at .*frame-args\\.c:.*" \ - "frame 2 (no args) with print frame-arguments set to presence" + ".*in main \\(\\) at .*frame-args\\.c:.*" \ + "frame 2 (no args) with print frame-arguments set to presence" # Test with "print frame-info" set to "location-and-address" diff --git a/gdb/testsuite/gdb.base/frame-selection.exp b/gdb/testsuite/gdb.base/frame-selection.exp index 9806a593686..f3fbd366359 100644 --- a/gdb/testsuite/gdb.base/frame-selection.exp +++ b/gdb/testsuite/gdb.base/frame-selection.exp @@ -173,7 +173,7 @@ with_test_prefix "second frame_2 breakpoint" { gdb_continue_to_breakpoint frame_2 gdb_test "bt" \ "#0 frame_2.*#1 $hex in recursive.*#2 $hex in recursive.*#3 $hex in recursive.*#4 $hex in main.*" \ - "backtrace at breakpoint with recursive frames" + "backtrace at breakpoint with recursive frames" # Check "frame function" when a function name occurs multiple times in # the stack. The inner most (lowest level) should always be selected. diff --git a/gdb/testsuite/gdb.base/freebpcmd.exp b/gdb/testsuite/gdb.base/freebpcmd.exp index 90333f964de..4d14fadd626 100644 --- a/gdb/testsuite/gdb.base/freebpcmd.exp +++ b/gdb/testsuite/gdb.base/freebpcmd.exp @@ -59,39 +59,39 @@ set lines {{if i<0 || i > 100} {echo Invalid i value\n} {else} {if (i%2) == 0} - {echo "even "} - {print i} - {else} - {echo "odd "} - {print i} - {end} - {set variable $foo = 0} - {set variable $j = 0} - {while $j < i} - {set variable $foo += $j} - {set variable $j++} - {end} - {print $foo} - {if i != 40} - {c} - {end} + {echo "even "} + {print i} + {else} + {echo "odd "} + {print i} + {end} + {set variable $foo = 0} + {set variable $j = 0} + {while $j < i} + {set variable $foo += $j} + {set variable $j++} + {end} + {print $foo} + {if i != 40} + {c} + {end} {end} - {end}} + {end}} send_gdb "commands\n" for {set i 0} {$i < [llength $lines]} {incr i} { gdb_expect { - -re ".*>" { - send_gdb "[lindex $lines $i]\n" - } - -re "$gdb_prompt $" { - set reason "got top-level prompt early" - break - } - timeout { - set reason "timeout" - break - } + -re ".*>" { + send_gdb "[lindex $lines $i]\n" + } + -re "$gdb_prompt $" { + set reason "got top-level prompt early" + break + } + timeout { + set reason "timeout" + break + } } } if {$i >= [llength $lines]} { diff --git a/gdb/testsuite/gdb.base/funcargs.c b/gdb/testsuite/gdb.base/funcargs.c index 5198248454b..add98b9c8ea 100644 --- a/gdb/testsuite/gdb.base/funcargs.c +++ b/gdb/testsuite/gdb.base/funcargs.c @@ -15,9 +15,9 @@ # include # define HAVE_STACK_ALLOCA 1 # ifdef __STDC__ - void *alloca (); + void *alloca (); # else - char *alloca (); + char *alloca (); # endif /* __STDC__ */ # endif /* sparc */ # endif /* Not AIX */ diff --git a/gdb/testsuite/gdb.base/gcorebg.exp b/gdb/testsuite/gdb.base/gcorebg.exp index fd9f06ed685..5d8b85f67a0 100644 --- a/gdb/testsuite/gdb.base/gcorebg.exp +++ b/gdb/testsuite/gdb.base/gcorebg.exp @@ -56,7 +56,7 @@ proc test_body { detached } { set res [remote_spawn target "$binfile $detached \"$gcore_cmd\" $corefile"] if { ![gdb_assert { ![expr {$res < 0 || $res == ""}] } \ "spawned gcore"] } { - return + return } set saw_corefile_created false diff --git a/gdb/testsuite/gdb.base/gdb1056.exp b/gdb/testsuite/gdb.base/gdb1056.exp index 0e0e4a0807a..411e61338fb 100644 --- a/gdb/testsuite/gdb.base/gdb1056.exp +++ b/gdb/testsuite/gdb.base/gdb1056.exp @@ -40,4 +40,3 @@ gdb_test_multiple "print 1/0" "" { } } gdb_test "print 1U/0" ".*Division by zero.*" "test unsigned division by zero" - diff --git a/gdb/testsuite/gdb.base/gdb11530.c b/gdb/testsuite/gdb.base/gdb11530.c index 4d613736231..24b4dd0d7d2 100644 --- a/gdb/testsuite/gdb.base/gdb11530.c +++ b/gdb/testsuite/gdb.base/gdb11530.c @@ -23,7 +23,7 @@ struct a { union { - int i; + int i; }; } a; @@ -32,4 +32,3 @@ main (void) { return sizeof (a.i); } - diff --git a/gdb/testsuite/gdb.base/gdb11530.exp b/gdb/testsuite/gdb.base/gdb11530.exp index 4b910cab634..be7d4766cc5 100644 --- a/gdb/testsuite/gdb.base/gdb11530.exp +++ b/gdb/testsuite/gdb.base/gdb11530.exp @@ -38,4 +38,3 @@ if {![runto_main]} { gdb_test "print a.i" " = 0" gdb_test "print sizeof (a.i)" " = \[0-9\]+" gdb_test "print sizeof (a.i) == sizeof (int)" " = 1" - diff --git a/gdb/testsuite/gdb.base/gdb11531.c b/gdb/testsuite/gdb.base/gdb11531.c index 137e3f21ed5..97f5928d33b 100644 --- a/gdb/testsuite/gdb.base/gdb11531.c +++ b/gdb/testsuite/gdb.base/gdb11531.c @@ -37,4 +37,3 @@ main () myrec.x = 78; return myrec.x; } - diff --git a/gdb/testsuite/gdb.base/gdb11531.exp b/gdb/testsuite/gdb.base/gdb11531.exp index c6c5e7b905d..82d399f2ef0 100644 --- a/gdb/testsuite/gdb.base/gdb11531.exp +++ b/gdb/testsuite/gdb.base/gdb11531.exp @@ -65,4 +65,3 @@ gdb_test "next" \ gdb_test "continue" \ ".*${nl}.*atchpoint \[0-9\]+: myrec\.x${nl}Old value = 5${nl}New value = 78${nl}.*" \ "watchpoint variable triggers at continue" - diff --git a/gdb/testsuite/gdb.base/gdb1555.c b/gdb/testsuite/gdb.base/gdb1555.c index 355dee87f57..9f6f08c79c8 100644 --- a/gdb/testsuite/gdb.base/gdb1555.c +++ b/gdb/testsuite/gdb.base/gdb1555.c @@ -23,4 +23,3 @@ int hithere2() a = 21; return a; } - diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp index 174c8f790c2..a3e0a3d4de8 100644 --- a/gdb/testsuite/gdb.base/gdb1555.exp +++ b/gdb/testsuite/gdb.base/gdb1555.exp @@ -65,4 +65,3 @@ gdb_test_multiple "n" $name \ kfail "gdb/1555" $name } } - diff --git a/gdb/testsuite/gdb.base/gdb1821.exp b/gdb/testsuite/gdb.base/gdb1821.exp index cd9c542b421..f84fc9c9585 100644 --- a/gdb/testsuite/gdb.base/gdb1821.exp +++ b/gdb/testsuite/gdb.base/gdb1821.exp @@ -32,4 +32,3 @@ if {![runto_main]} { return } gdb_test "print /x bar" "{x__0 = 0x0, y__0 = 0x0, z__1 = 0x0}" - diff --git a/gdb/testsuite/gdb.base/gdbhistsize-history.exp b/gdb/testsuite/gdb.base/gdbhistsize-history.exp index d73996d7d4f..5173b72e00f 100644 --- a/gdb/testsuite/gdb.base/gdbhistsize-history.exp +++ b/gdb/testsuite/gdb.base/gdbhistsize-history.exp @@ -51,9 +51,9 @@ proc test_histsize_history_setting { histsize size { env_var "GDBHISTSIZE" } } { gdb_test_no_output "show commands" } elseif { $size != "1" } { gdb_test "show commands" \ - " . show history size\r\n . show commands" + " . show history size\r\n . show commands" } - } + } } } diff --git a/gdb/testsuite/gdb.base/gdbinit-history.exp b/gdb/testsuite/gdb.base/gdbinit-history.exp index 11a4a23c528..28309995846 100644 --- a/gdb/testsuite/gdb.base/gdbinit-history.exp +++ b/gdb/testsuite/gdb.base/gdbinit-history.exp @@ -118,7 +118,7 @@ proc test_no_truncation_of_unlimited_history_file { } { gdb_start gdb_test "server show commands" " . print 1.*" } - } + } } } diff --git a/gdb/testsuite/gdb.base/grbx.c b/gdb/testsuite/gdb.base/grbx.c index 58034bbbaae..b4b754ba3e4 100644 --- a/gdb/testsuite/gdb.base/grbx.c +++ b/gdb/testsuite/gdb.base/grbx.c @@ -7,4 +7,3 @@ int grbx (int x) else return 0; } - diff --git a/gdb/testsuite/gdb.base/index-cache.c b/gdb/testsuite/gdb.base/index-cache.c index 4717cfd3d88..7c22825f64e 100644 --- a/gdb/testsuite/gdb.base/index-cache.c +++ b/gdb/testsuite/gdb.base/index-cache.c @@ -22,4 +22,3 @@ main (void) { return foo (); } - diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp index c7dbc469bea..b862e0ccbb2 100644 --- a/gdb/testsuite/gdb.base/index-cache.exp +++ b/gdb/testsuite/gdb.base/index-cache.exp @@ -117,12 +117,12 @@ proc_with_prefix test_basic_stuff { } { "index-cache is now enabled" with_test_prefix "deprecated commands" { - gdb_test "set index-cache off" ".*is deprecated.*" "disable index cache" + gdb_test "set index-cache off" ".*is deprecated.*" "disable index cache" gdb_test \ "show index-cache enabled" \ "The index cache is off." \ "index-cache is now disabled" - gdb_test "set index-cache on" ".*is deprecated.*" "enable index cache" + gdb_test "set index-cache on" ".*is deprecated.*" "enable index cache" gdb_test \ "show index-cache enabled" \ "The index cache is on." \ diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl index b633cf27519..eddbcb3ef87 100644 --- a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl +++ b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl @@ -113,12 +113,12 @@ proc run_tests { lang types } { global gdb_prompt foreach {name} {struct_01_01 struct_01_02 struct_01_03 struct_01_04 - struct_02_01 struct_02_02 struct_02_03 struct_02_04 - struct_04_01 struct_04_02 struct_04_03 struct_04_04 - struct_05_01 struct_05_02 struct_05_03 struct_05_04 - struct_static_02_01 struct_static_02_02 struct_static_02_03 struct_static_02_04 - struct_static_04_01 struct_static_04_02 struct_static_04_03 struct_static_04_04 - struct_static_06_01 struct_static_06_02 struct_static_06_03 struct_static_06_04} { + struct_02_01 struct_02_02 struct_02_03 struct_02_04 + struct_04_01 struct_04_02 struct_04_03 struct_04_04 + struct_05_01 struct_05_02 struct_05_03 struct_05_04 + struct_static_02_01 struct_static_02_02 struct_static_02_03 struct_static_02_04 + struct_static_04_01 struct_static_04_02 struct_static_04_03 struct_static_04_04 + struct_static_06_01 struct_static_06_02 struct_static_06_03 struct_static_06_04} { # Only run static member tests on C++ if { $lang == "c" && [regexp "static" $name match] } { diff --git a/gdb/testsuite/gdb.base/info-macros.c b/gdb/testsuite/gdb.base/info-macros.c index 4a6c96073b9..8fc13737961 100644 --- a/gdb/testsuite/gdb.base/info-macros.c +++ b/gdb/testsuite/gdb.base/info-macros.c @@ -68,4 +68,3 @@ int main (int argc, const char **argv) return 0; } #endif - diff --git a/gdb/testsuite/gdb.base/info-target.exp b/gdb/testsuite/gdb.base/info-target.exp index f3541088686..6e743202810 100644 --- a/gdb/testsuite/gdb.base/info-target.exp +++ b/gdb/testsuite/gdb.base/info-target.exp @@ -27,4 +27,4 @@ set eol "\r\n" # it is formatted properly. For instance, make sure that no '\n' is # missing at the end some lines. gdb_test "info target" \ - "Symbols from \".*${testfile}.*\"\\..*${eol}Local exec file:${eol}.*Entry point: 0x\[0-9a-zA-Z\]+${eol}.*" + "Symbols from \".*${testfile}.*\"\\..*${eol}Local exec file:${eol}.*Entry point: 0x\[0-9a-zA-Z\]+${eol}.*" diff --git a/gdb/testsuite/gdb.base/info_sources_base.c b/gdb/testsuite/gdb.base/info_sources_base.c index 9183a20eab0..fa955b9f2af 100644 --- a/gdb/testsuite/gdb.base/info_sources_base.c +++ b/gdb/testsuite/gdb.base/info_sources_base.c @@ -19,4 +19,3 @@ void some_other_func (void) { return; } - diff --git a/gdb/testsuite/gdb.base/infoline.exp b/gdb/testsuite/gdb.base/infoline.exp index 48b8e32b31c..fb19febcd5a 100644 --- a/gdb/testsuite/gdb.base/infoline.exp +++ b/gdb/testsuite/gdb.base/infoline.exp @@ -24,4 +24,4 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } { # at where N is different from zero. set fun_decl_line [gdb_get_line_number "THIS LINE"] gdb_test "info line ${srcfile}:${fun_decl_line}" \ - "Line ${fun_decl_line} of \".*${testfile}\.c\" starts at address 0x\[0-9a-f\]+ and ends at .*" + "Line ${fun_decl_line} of \".*${testfile}\.c\" starts at address 0x\[0-9a-f\]+ and ends at .*" diff --git a/gdb/testsuite/gdb.base/int-type.c b/gdb/testsuite/gdb.base/int-type.c index 8331d9656f7..ccf32d7865b 100644 --- a/gdb/testsuite/gdb.base/int-type.c +++ b/gdb/testsuite/gdb.base/int-type.c @@ -17,4 +17,3 @@ int main () return 0; } - diff --git a/gdb/testsuite/gdb.base/interact.exp b/gdb/testsuite/gdb.base/interact.exp index 6cf8e1811cd..748e535057c 100644 --- a/gdb/testsuite/gdb.base/interact.exp +++ b/gdb/testsuite/gdb.base/interact.exp @@ -34,10 +34,10 @@ gdb_start # change of the interactive-mode setting. gdb_test_no_output "set interactive-mode auto" gdb_test "source $script" "$script_output" \ - "source script with interactive-mode auto" + "source script with interactive-mode auto" gdb_test "print 3" "= 3" "sanity check with interactive-mode auto" gdb_test "show interactive-mode" \ - "Debugger's interactive mode is auto \\(currently .*\\)\\." \ + "Debugger's interactive mode is auto \\(currently .*\\)\\." \ "show interactive-mode, auto" # Test sourcing of the script with interactive mode `on'. @@ -45,10 +45,10 @@ gdb_test "show interactive-mode" \ # change of the interactive-mode setting. gdb_test_no_output "set interactive-mode on" gdb_test "source $script" "$script_output" \ - "source script with interactive-mode on" + "source script with interactive-mode on" gdb_test "print 4" "= 4" "sanity check with interactive-mode on" gdb_test "show interactive-mode" \ - "Debugger's interactive mode is on\\." \ + "Debugger's interactive mode is on\\." \ "show interactive-mode, on" # Test sourcing of the script with interactive mode `off'. @@ -56,9 +56,8 @@ gdb_test "show interactive-mode" \ # change of the interactive-mode setting. gdb_test_no_output "set interactive-mode off" gdb_test "source $script" "$script_output" \ - "source script with interactive-mode off" + "source script with interactive-mode off" gdb_test "print 5" "= 5" "sanity check with interactive-mode off" gdb_test "show interactive-mode" \ - "Debugger's interactive mode is off\\." \ + "Debugger's interactive mode is off\\." \ "show interactive-mode, off" - diff --git a/gdb/testsuite/gdb.base/interrupt.exp b/gdb/testsuite/gdb.base/interrupt.exp index fef0bd9496c..dd790fd6242 100644 --- a/gdb/testsuite/gdb.base/interrupt.exp +++ b/gdb/testsuite/gdb.base/interrupt.exp @@ -154,7 +154,7 @@ if {![file exists $binfile]} { } } - if { ! [target_info exists gdb,nosignals] } { + if { ! [target_info exists gdb,nosignals] } { # Wait until the program is in the read system call again. sleep 2 diff --git a/gdb/testsuite/gdb.base/jit-elf-util.h b/gdb/testsuite/gdb.base/jit-elf-util.h index bde24498fb9..8bede15ca25 100644 --- a/gdb/testsuite/gdb.base/jit-elf-util.h +++ b/gdb/testsuite/gdb.base/jit-elf-util.h @@ -70,7 +70,7 @@ load_symbol (void *addr, const char *sym_name) { const char *s = strtab + p->st_name; if (strcmp (s, sym_name) == 0) - return (void *) p->st_value; + return (void *) p->st_value; } } } @@ -101,7 +101,7 @@ load_elf (const char *libname, size_t *size, void *load_addr) } void *addr = mmap (load_addr, st.st_size, - PROT_READ | PROT_WRITE | PROT_EXEC, + PROT_READ | PROT_WRITE | PROT_EXEC, load_addr != NULL ? MAP_PRIVATE | MAP_FIXED : MAP_PRIVATE, fd, 0); close (fd); diff --git a/gdb/testsuite/gdb.base/jit-protocol.h b/gdb/testsuite/gdb.base/jit-protocol.h index fc538241c1c..99bb72cf06d 100644 --- a/gdb/testsuite/gdb.base/jit-protocol.h +++ b/gdb/testsuite/gdb.base/jit-protocol.h @@ -17,8 +17,8 @@ #ifdef JIT_H #error "We don't include jit.h directly since we'd like the jit-reader unit \ - tests to break if we make ABI incompatible changes to the structures \ - re-declared here." + tests to break if we make ABI incompatible changes to the structures \ + re-declared here." #endif #ifndef JIT_PROTOCOL_H diff --git a/gdb/testsuite/gdb.base/jit-reader.c b/gdb/testsuite/gdb.base/jit-reader.c index d3d007d3cb4..e5868f655f5 100644 --- a/gdb/testsuite/gdb.base/jit-reader.c +++ b/gdb/testsuite/gdb.base/jit-reader.c @@ -43,7 +43,7 @@ struct reader_state static enum gdb_status read_debug_info (struct gdb_reader_funcs *self, struct gdb_symbol_callbacks *cbs, - void *memory, long memory_sz) + void *memory, long memory_sz) { struct jithost_abi *symfile = memory; struct gdb_object *object = cbs->object_open (cbs); @@ -92,7 +92,7 @@ free_reg_value (struct gdb_reg_value *value) static void write_register (struct gdb_unwind_callbacks *callbacks, int dw_reg, - uintptr_t value) + uintptr_t value) { const int size = sizeof (uintptr_t); struct gdb_reg_value *reg_val = diff --git a/gdb/testsuite/gdb.base/killed-outside.exp b/gdb/testsuite/gdb.base/killed-outside.exp index 6cdbdb4eaec..7ddf5df1339 100644 --- a/gdb/testsuite/gdb.base/killed-outside.exp +++ b/gdb/testsuite/gdb.base/killed-outside.exp @@ -31,7 +31,7 @@ proc get_value {var msg} { -re ".*= ($decimal).*\r\n$gdb_prompt $" { set value $expect_out(1,string) pass "$msg" - } + } } return ${value} } diff --git a/gdb/testsuite/gdb.base/label.c b/gdb/testsuite/gdb.base/label.c index c8921981b2e..98e78f45eec 100644 --- a/gdb/testsuite/gdb.base/label.c +++ b/gdb/testsuite/gdb.base/label.c @@ -18,4 +18,3 @@ there: done: return 0; } - diff --git a/gdb/testsuite/gdb.base/langs1.c b/gdb/testsuite/gdb.base/langs1.c index 7b6b229afe6..80f9d0ddea9 100644 --- a/gdb/testsuite/gdb.base/langs1.c +++ b/gdb/testsuite/gdb.base/langs1.c @@ -30,4 +30,3 @@ static integer c__10000 = 10000; return cppsub_(&c__10000); #line 7 "langs1.f" } /* fsub_ */ - diff --git a/gdb/testsuite/gdb.base/large-frame.exp b/gdb/testsuite/gdb.base/large-frame.exp index f0d7af6c8b2..553afea7c44 100644 --- a/gdb/testsuite/gdb.base/large-frame.exp +++ b/gdb/testsuite/gdb.base/large-frame.exp @@ -57,4 +57,3 @@ foreach opt { O0 O1 O2 } { run_test $opt } } - diff --git a/gdb/testsuite/gdb.base/ldbl_e308.exp b/gdb/testsuite/gdb.base/ldbl_e308.exp index cb997cb04e1..1a4e9fc815a 100644 --- a/gdb/testsuite/gdb.base/ldbl_e308.exp +++ b/gdb/testsuite/gdb.base/ldbl_e308.exp @@ -26,5 +26,4 @@ if {![runto_main]} { gdb_test_no_output "set variable ldbl_308 = 1.6e+308l" gdb_test "print ldbl_308" \ - "= 1\..*e\\+308" - + "= 1\..*e\\+308" diff --git a/gdb/testsuite/gdb.base/line65535.exp b/gdb/testsuite/gdb.base/line65535.exp index a9cb739ccc9..1e6a6bed5ec 100644 --- a/gdb/testsuite/gdb.base/line65535.exp +++ b/gdb/testsuite/gdb.base/line65535.exp @@ -24,5 +24,5 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { } gdb_test "break $srcfile:65535" \ - ".*Breakpoint 1 at .*: file .*$srcfile, line 65535\\..*" \ + ".*Breakpoint 1 at .*: file .*$srcfile, line 65535\\..*" \ "break at line 65535" diff --git a/gdb/testsuite/gdb.base/lineinc.exp b/gdb/testsuite/gdb.base/lineinc.exp index 61983cc3395..c83bce03241 100644 --- a/gdb/testsuite/gdb.base/lineinc.exp +++ b/gdb/testsuite/gdb.base/lineinc.exp @@ -94,21 +94,21 @@ gdb_load $binfile set test_name "tolerate macro info with multiple #inclusions per line" gdb_test_multiple "break -q main" $test_name { -re "Breakpoint 1 at 0x.*: file .*lineinc.c.*\\.\r\n${gdb_prompt}" { - pass $test_name + pass $test_name } -re ".*internal-error:.*.y or n. " { - fail $test_name - send_gdb "y\n" - gdb_expect { - -re ".*.y or n. " { - send_gdb "n\n" - exp_continue - } - -re "$gdb_prompt" { - } - timeout { - fail "$test_name (timeout)" - } - } + fail $test_name + send_gdb "y\n" + gdb_expect { + -re ".*.y or n. " { + send_gdb "n\n" + exp_continue + } + -re "$gdb_prompt" { + } + timeout { + fail "$test_name (timeout)" + } + } } } diff --git a/gdb/testsuite/gdb.base/list-missing-source.exp b/gdb/testsuite/gdb.base/list-missing-source.exp index 196a1f209dc..9a1b5372260 100644 --- a/gdb/testsuite/gdb.base/list-missing-source.exp +++ b/gdb/testsuite/gdb.base/list-missing-source.exp @@ -61,4 +61,3 @@ gdb_test "info source" \ "Producer is \[^\n\r\]+" \ "Compiled with DWARF $decimal debugging format." \ "Does not include preprocessor macro info." ] - diff --git a/gdb/testsuite/gdb.base/long-inferior-output.exp b/gdb/testsuite/gdb.base/long-inferior-output.exp index 90369f8f824..df486194252 100644 --- a/gdb/testsuite/gdb.base/long-inferior-output.exp +++ b/gdb/testsuite/gdb.base/long-inferior-output.exp @@ -54,7 +54,7 @@ while {$more} { -i $inferior_spawn_id -ex "this is line number $i" { incr i - if {$i != $expected_lines} { + if {$i != $expected_lines} { set more 1 } } diff --git a/gdb/testsuite/gdb.base/m32r.ld b/gdb/testsuite/gdb.base/m32r.ld index 3358f4ce7fa..1e917c8db28 100644 --- a/gdb/testsuite/gdb.base/m32r.ld +++ b/gdb/testsuite/gdb.base/m32r.ld @@ -85,7 +85,7 @@ SECTIONS { *(.data) *(.gnu.linkonce.d*) - _ovly_table = .; + _ovly_table = .; _ovly0_entry = .; LONG(ABSOLUTE(ADDR(.ovly0))); LONG(SIZEOF(.ovly0)); diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp index c275d74eed3..a63bd950026 100644 --- a/gdb/testsuite/gdb.base/macscp.exp +++ b/gdb/testsuite/gdb.base/macscp.exp @@ -67,87 +67,87 @@ proc info_macro {macro} { if {$debug_me} {exp_internal 1} gdb_expect { - -re "Defined at \[^\r\n\]*(${filepat}):${nonzero}\[\r\n\]" { - # `location' and `definition' should be empty when we see - # this message. - if {[llength $location] == 0 && [llength $definition] == 0} { - set location $expect_out(1,string) - exp_continue - } else { - # Exit this expect loop, with a result indicating failure. - set definition {} - } - } - -re "The symbol `${macro}' has no definition as a C/C\\+\\+ preprocessor macro\[^\r\n\]*\[\r\n\]" { - # `location' and `definition' should be empty when we see - # this message. - if {[llength $location] == 0 && [llength $definition] == 0} { - set definition undefined - exp_continue - } else { - # Exit this expect loop, with a result indicating failure. - set definition {} - } - } - -re "^\[\r\n\]* included at \[^\r\n\]*(${filepat}):${nonzero}\[\r\n\]" { - # `location' should *not* be empty when we see this - # message. It should have recorded at least the initial - # `Defined at ' message (for definitions) or ` at' message - # (for undefined symbols). - if {[llength $location] != 0} { - lappend location $expect_out(1,string) - exp_continue - } else { - # Exit this expect loop, with a result indicating failure. - set definition {} - } - } - -re "^\[\r\n\]*at \[^\r\n\]*(${filepat}):${nonzero}\[\r\n\]" { - # This appears after a `has no definition' message. - # `location' should be empty when we see it. - if {[string compare $definition undefined] == 0 \ - && [llength $location] == 0} { - set location $expect_out(1,string) - exp_continue - } else { - # Exit this expect loop, with a result indicating failure. - set definition {} - } - } - -re "#define ${macro} (\[^\r\n\]*)\[\r\n\]" { - # `definition' should be empty when we see this message. - if {[string compare $definition ""] == 0} { - set definition $expect_out(1,string) - exp_continue - } else { - # Exit this expect loop, with a result indicating failure. - set definition {} - } - } - -re "has no preprocessor macro information.*$gdb_prompt $" { - set definition no-macro-info - } - -re "$gdb_prompt $" { - # Exit the expect loop; let the existing value of `definition' - # indicate failure or success. - } - timeout { - set definition timeout - } + -re "Defined at \[^\r\n\]*(${filepat}):${nonzero}\[\r\n\]" { + # `location' and `definition' should be empty when we see + # this message. + if {[llength $location] == 0 && [llength $definition] == 0} { + set location $expect_out(1,string) + exp_continue + } else { + # Exit this expect loop, with a result indicating failure. + set definition {} + } + } + -re "The symbol `${macro}' has no definition as a C/C\\+\\+ preprocessor macro\[^\r\n\]*\[\r\n\]" { + # `location' and `definition' should be empty when we see + # this message. + if {[llength $location] == 0 && [llength $definition] == 0} { + set definition undefined + exp_continue + } else { + # Exit this expect loop, with a result indicating failure. + set definition {} + } + } + -re "^\[\r\n\]* included at \[^\r\n\]*(${filepat}):${nonzero}\[\r\n\]" { + # `location' should *not* be empty when we see this + # message. It should have recorded at least the initial + # `Defined at ' message (for definitions) or ` at' message + # (for undefined symbols). + if {[llength $location] != 0} { + lappend location $expect_out(1,string) + exp_continue + } else { + # Exit this expect loop, with a result indicating failure. + set definition {} + } + } + -re "^\[\r\n\]*at \[^\r\n\]*(${filepat}):${nonzero}\[\r\n\]" { + # This appears after a `has no definition' message. + # `location' should be empty when we see it. + if {[string compare $definition undefined] == 0 \ + && [llength $location] == 0} { + set location $expect_out(1,string) + exp_continue + } else { + # Exit this expect loop, with a result indicating failure. + set definition {} + } + } + -re "#define ${macro} (\[^\r\n\]*)\[\r\n\]" { + # `definition' should be empty when we see this message. + if {[string compare $definition ""] == 0} { + set definition $expect_out(1,string) + exp_continue + } else { + # Exit this expect loop, with a result indicating failure. + set definition {} + } + } + -re "has no preprocessor macro information.*$gdb_prompt $" { + set definition no-macro-info + } + -re "$gdb_prompt $" { + # Exit the expect loop; let the existing value of `definition' + # indicate failure or success. + } + timeout { + set definition timeout + } } if {$debug_me} {exp_internal 0} switch -exact -- $definition { - no-macro-info { return no-macro-info } - timeout { return timeout } - undefined { return undefined } - default { - if {[llength $location] >= 1} { - return [concat $location [list $definition]] - } else { - return {} - } - } + no-macro-info { return no-macro-info } + timeout { return timeout } + undefined { return undefined } + default { + if {[llength $location] >= 1} { + return [concat $location [list $definition]] + } else { + return {} + } + } } } @@ -159,24 +159,24 @@ proc info_macro {macro} { proc check_macro {macro expected where} { set func_def [info_macro $macro] if {[string compare $func_def $expected] == 0} { - pass "info macro $macro $where" + pass "info macro $macro $where" } else { - switch -exact -- $func_def { - no-macro-info { - xfail "executable includes no macro debugging information" - return 1 - } + switch -exact -- $func_def { + no-macro-info { + xfail "executable includes no macro debugging information" + return 1 + } undefined { fail "info macro $macro $where (undefined)" return 1 } - timeout { - fail "info macro $macro $where (timeout)" - } - default { - fail "info macro $macro $where" - } - } + timeout { + fail "info macro $macro $where (timeout)" + } + default { + fail "info macro $macro $where" + } + } } return 0 } @@ -231,14 +231,14 @@ gdb_test "info macro __LINE__" "#define __LINE__ 26" \ gdb_test "list macscp4_2_from_macscp2" ".*macscp4_2_, MACSCP4_INCLUSION.*" switch -exact -- [info_macro WHERE] { {macscp4.h macscp2.h macscp1.c {before macscp4_2_..., from macscp2.h}} { - pass "info macro WHERE after `list macscp_4_2_from_macscp2'" + pass "info macro WHERE after `list macscp_4_2_from_macscp2'" } {macscp4.h macscp3.h macscp1.c {before macscp4_2_..., from macscp3.h}} { - setup_kfail "gdb/7660" *-*-* - fail "info macro WHERE after `list macscp_4_2_from_macscp2' (gdb/7660)" + setup_kfail "gdb/7660" *-*-* + fail "info macro WHERE after `list macscp_4_2_from_macscp2' (gdb/7660)" } timeout { - fail "info macro WHERE after `list macscp_4_2_from_macscp2' (timeout)" + fail "info macro WHERE after `list macscp_4_2_from_macscp2' (timeout)" } default { fail "info macro WHERE after `list macscp_4_2_from_macscp2'" } } @@ -246,14 +246,14 @@ switch -exact -- [info_macro WHERE] { gdb_test "list macscp4_2_from_macscp3" ".*macscp4_2_, MACSCP4_INCLUSION.*" switch -exact -- [info_macro WHERE] { {macscp4.h macscp3.h macscp1.c {before macscp4_2_..., from macscp3.h}} { - pass "info macro WHERE after `list macscp_4_2_from_macscp3'" + pass "info macro WHERE after `list macscp_4_2_from_macscp3'" } {macscp4.h macscp2.h macscp1.c {before macscp4_2_..., from macscp2.h}} { - setup_kfail "gdb/7660" *-*-* - fail "info macro WHERE after `list macscp_4_2_from_macscp3' (gdb/7660)" + setup_kfail "gdb/7660" *-*-* + fail "info macro WHERE after `list macscp_4_2_from_macscp3' (gdb/7660)" } timeout { - fail "info macro WHERE after `list macscp_4_2_from_macscp3' (timeout)" + fail "info macro WHERE after `list macscp_4_2_from_macscp3' (timeout)" } default { fail "info macro WHERE after `list macscp_4_2_from_macscp3'" } } @@ -274,52 +274,52 @@ switch -exact -- [info_macro WHERE] { set funcs { { - macscp1_1 - {macscp1.c {before macscp1_1}} + macscp1_1 + {macscp1.c {before macscp1_1}} } { - macscp2_1 - {macscp2.h macscp1.c {before macscp2_1}} + macscp2_1 + {macscp2.h macscp1.c {before macscp2_1}} } { - macscp4_1_from_macscp2 - {macscp4.h macscp2.h macscp1.c {before macscp4_1_..., from macscp2.h}} - {macscp4.h macscp3.h macscp1.c {before macscp4_1_..., from macscp3.h}} + macscp4_1_from_macscp2 + {macscp4.h macscp2.h macscp1.c {before macscp4_1_..., from macscp2.h}} + {macscp4.h macscp3.h macscp1.c {before macscp4_1_..., from macscp3.h}} } { - macscp4_2_from_macscp2 - {macscp4.h macscp2.h macscp1.c {before macscp4_2_..., from macscp2.h}} - {macscp4.h macscp3.h macscp1.c {before macscp4_2_..., from macscp3.h}} + macscp4_2_from_macscp2 + {macscp4.h macscp2.h macscp1.c {before macscp4_2_..., from macscp2.h}} + {macscp4.h macscp3.h macscp1.c {before macscp4_2_..., from macscp3.h}} } { - macscp2_2 - {macscp2.h macscp1.c {before macscp2_2}} + macscp2_2 + {macscp2.h macscp1.c {before macscp2_2}} } { - macscp1_2 - {macscp1.c {before macscp1_2}} + macscp1_2 + {macscp1.c {before macscp1_2}} } { - macscp3_1 - {macscp3.h macscp1.c {before macscp3_1}} + macscp3_1 + {macscp3.h macscp1.c {before macscp3_1}} } { - macscp4_1_from_macscp3 - {macscp4.h macscp3.h macscp1.c {before macscp4_1_..., from macscp3.h}} - {macscp4.h macscp2.h macscp1.c {before macscp4_1_..., from macscp2.h}} + macscp4_1_from_macscp3 + {macscp4.h macscp3.h macscp1.c {before macscp4_1_..., from macscp3.h}} + {macscp4.h macscp2.h macscp1.c {before macscp4_1_..., from macscp2.h}} } { - macscp4_2_from_macscp3 - {macscp4.h macscp3.h macscp1.c {before macscp4_2_..., from macscp3.h}} - {macscp4.h macscp2.h macscp1.c {before macscp4_2_..., from macscp2.h}} + macscp4_2_from_macscp3 + {macscp4.h macscp3.h macscp1.c {before macscp4_2_..., from macscp3.h}} + {macscp4.h macscp2.h macscp1.c {before macscp4_2_..., from macscp2.h}} } { - macscp3_2 - {macscp3.h macscp1.c {before macscp3_2}} + macscp3_2 + {macscp3.h macscp1.c {before macscp3_2}} } { - macscp1_3 - {macscp1.c {before macscp1_3}} + macscp1_3 + {macscp1.c {before macscp1_3}} } } @@ -358,71 +358,71 @@ for {set i 0} {$i < [llength $funcs]} {incr i} { # Check the macro WHERE. set result [info_macro WHERE] if {[string compare $result $expected] == 0} { - pass "info macro WHERE stopped in $func" + pass "info macro WHERE stopped in $func" } elseif {[string compare $result $kfail_expected] == 0} { - setup_kfail "gdb/7660" *-*-* - fail "info macro WHERE stopped in $func (gdb/7660)" + setup_kfail "gdb/7660" *-*-* + fail "info macro WHERE stopped in $func (gdb/7660)" } elseif {[string compare $result timeout] == 0} { - fail "info macro WHERE stopped in $func (timeout)" + fail "info macro WHERE stopped in $func (timeout)" } else { - fail "info macro WHERE stopped in $func" + fail "info macro WHERE stopped in $func" } # Check that the BEFORE_ macros for all prior functions are # #defined, and that those for all subsequent functions are not. for {set j 0} {$j < [llength $funcs]} {incr j} { - if {$j != $i} { - set func_j_entry [lindex $funcs $j] - set func_j [lindex $func_j_entry 0] - - set before_macro "BEFORE_[string toupper $func_j]" - set test_name \ - "$before_macro defined/undefined when stopped at $func" - set result [info_macro $before_macro] - - if {$j < $i} { - if {[llength $result] >= 2 && \ - [string compare [lindex $result end] {}] == 0} { - pass $test_name - } elseif {[string compare $result timeout] == 0} { - fail "$test_name (timeout)" - } else { - maybe_kfail $func "$test_name" - } - } elseif {$j > $i} { - switch -- [lindex $result end] { - undefined { pass $test_name } - timeout { fail "$test_name (timeout)" } - default { - maybe_kfail $func "$test_name" - } - } - } - - set until_macro "UNTIL_[string toupper $func_j]" - set test_name \ - "$until_macro defined/undefined when stopped at $func" - set result [info_macro $until_macro] - - if {$j <= $i} { - switch -- [lindex $result end] { - undefined { pass $test_name } - timeout { fail "$test_name (timeout)" } - default { - maybe_kfail $func "$test_name" - } - } - } elseif {$j > $i} { - if {[llength $result] >= 2 && \ - [string compare [lindex $result end] {}] == 0} { - pass $test_name - } elseif {[string compare $result timeout] == 0} { - fail "$test_name (timeout)" - } else { - maybe_kfail $func "$test_name" - } - } - } + if {$j != $i} { + set func_j_entry [lindex $funcs $j] + set func_j [lindex $func_j_entry 0] + + set before_macro "BEFORE_[string toupper $func_j]" + set test_name \ + "$before_macro defined/undefined when stopped at $func" + set result [info_macro $before_macro] + + if {$j < $i} { + if {[llength $result] >= 2 && \ + [string compare [lindex $result end] {}] == 0} { + pass $test_name + } elseif {[string compare $result timeout] == 0} { + fail "$test_name (timeout)" + } else { + maybe_kfail $func "$test_name" + } + } elseif {$j > $i} { + switch -- [lindex $result end] { + undefined { pass $test_name } + timeout { fail "$test_name (timeout)" } + default { + maybe_kfail $func "$test_name" + } + } + } + + set until_macro "UNTIL_[string toupper $func_j]" + set test_name \ + "$until_macro defined/undefined when stopped at $func" + set result [info_macro $until_macro] + + if {$j <= $i} { + switch -- [lindex $result end] { + undefined { pass $test_name } + timeout { fail "$test_name (timeout)" } + default { + maybe_kfail $func "$test_name" + } + } + } elseif {$j > $i} { + if {[llength $result] >= 2 && \ + [string compare [lindex $result end] {}] == 0} { + pass $test_name + } elseif {[string compare $result timeout] == 0} { + fail "$test_name (timeout)" + } else { + maybe_kfail $func "$test_name" + } + } + } } } diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index fd366d61f7d..7f6d9f6a981 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -110,14 +110,14 @@ gdb_test_multiple $test $test { exp_continue } -re "\[0-9\]+\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[0-9\]+\[^\r\n\]+\r\n" { - set saw_registers 1 - exp_continue + set saw_registers 1 + exp_continue } -re "^\\*\[0-9\]+\[^\r\n\]+\r\n" { - exp_continue + exp_continue } -re "$gdb_prompt $" { - gdb_assert { $saw_registers && $saw_headers } $test + gdb_assert { $saw_registers && $saw_headers } $test } } @@ -374,17 +374,17 @@ foreach { test_name command } $test_list { set msg "maint print type" gdb_test_multiple "maint print type argc" $msg { -re "type node $hex\r\nname .int. \\($hex\\)\r\ncode $hex \\(TYPE_CODE_INT\\)\r\nlength \[24\]\r\nobjfile $hex\r\ntarget_type $hex\r\npointer_type $hex\r\nreference_type $hex\r\ntype_chain $hex\r\ninstance_flags $hex\r\nflags\r\nnfields 0 $hex\r\n$gdb_prompt $" { - pass $msg + pass $msg } } if {[istarget "hppa*-*-11*"]} { setup_xfail hppa*-*-*11* CLLbs14860 gdb_test_multiple "maint print unwind &main" "maint print unwind" { - -re ".*unwind_table_entry \\($hex\\):\r\n\tregion_start = $hex
\r\n\tregion_end = $hex \r\n\tflags = Args_stored Save_RP\r\n\tRegion_description = $hex\r\n\tEntry_FR = $hex\r\n\tEntry_GR = $hex\r\n\tTotal_frame_size = $hex\r\n$gdb_prompt $" { + -re ".*unwind_table_entry \\($hex\\):\r\n\tregion_start = $hex
\r\n\tregion_end = $hex \r\n\tflags = Args_stored Save_RP\r\n\tRegion_description = $hex\r\n\tEntry_FR = $hex\r\n\tEntry_GR = $hex\r\n\tTotal_frame_size = $hex\r\n$gdb_prompt $" { pass "maint print unwind" } - -re ".*unwind_table_entry \\($hex\\):\r\n\tregion_start = $hex
\r\n\tregion_end = $hex \r\n\tflags = Args_stored Save_RP\r\n\tFLD = $hex\r\n\tFLD = $hex\r\n\tFLD = $hex\r\n\tFLD = $hex\r\n$gdb_prompt $" { + -re ".*unwind_table_entry \\($hex\\):\r\n\tregion_start = $hex
\r\n\tregion_end = $hex \r\n\tflags = Args_stored Save_RP\r\n\tFLD = $hex\r\n\tFLD = $hex\r\n\tFLD = $hex\r\n\tFLD = $hex\r\n$gdb_prompt $" { xfail "maint print unwind" } } diff --git a/gdb/testsuite/gdb.base/max-depth.c b/gdb/testsuite/gdb.base/max-depth.c index 4811af9c200..38fc305809e 100644 --- a/gdb/testsuite/gdb.base/max-depth.c +++ b/gdb/testsuite/gdb.base/max-depth.c @@ -143,8 +143,8 @@ struct s9 int a; struct { - int b; - int c; + int b; + int c; }; } d1; }; @@ -174,8 +174,8 @@ struct s10 int a; struct { - int b[10]; - int c; + int b[10]; + int c; }; } d1; }; diff --git a/gdb/testsuite/gdb.base/miscexprs.exp b/gdb/testsuite/gdb.base/miscexprs.exp index 9d2d1d29233..00b7df4d324 100644 --- a/gdb/testsuite/gdb.base/miscexprs.exp +++ b/gdb/testsuite/gdb.base/miscexprs.exp @@ -72,10 +72,10 @@ gdb_test "print &ibig.i\[0\]" " = \\(int \\*\\) $hex" gdb_test_multiple "print &cbig.c\[0\]" "" { -re ".\[0-9\]* = $hex \"\".*$gdb_prompt $" { - pass $gdb_test_name + pass $gdb_test_name } -re ".\[0-9\]* = $hex \"*\".*$gdb_prompt $" { - pass $gdb_test_name + pass $gdb_test_name } } @@ -85,19 +85,19 @@ gdb_test "print &dbig.d\[0\]" " = \\(double \\*\\) $hex" gdb_test_multiple "print &sbig.s\[0\]" "" { -re ".\[0-9\]* = \\(short \\*\\) $hex.*$gdb_prompt $" { - pass $gdb_test_name + pass $gdb_test_name } -re ".\[0-9\]* = \\(short int \\*\\) $hex.*$gdb_prompt $" { - pass $gdb_test_name + pass $gdb_test_name } } gdb_test_multiple "print &lbig.l\[0\]" "" { -re ".\[0-9\]* = \\(long \\*\\) $hex.*$gdb_prompt $" { - pass $gdb_test_name + pass $gdb_test_name } -re ".\[0-9\]* = \\(long int \\*\\) $hex.*$gdb_prompt $" { - pass $gdb_test_name + pass $gdb_test_name } } @@ -132,4 +132,3 @@ gdb_test "print ibig.i\[100\] << 2" " = 20" gdb_test "print sbig.s\[90\] >> 4" " = 15" gdb_test "print lbig.l\[333\] >> 6" " = 15624999" - diff --git a/gdb/testsuite/gdb.base/morestack.c b/gdb/testsuite/gdb.base/morestack.c index fc7bf81abdb..45856a7d149 100644 --- a/gdb/testsuite/gdb.base/morestack.c +++ b/gdb/testsuite/gdb.base/morestack.c @@ -68,7 +68,7 @@ down (int i) if (i == 500) { if (munmap (reserved, RESERVED_SIZE) != 0) - abort (); + abort (); reserved = NULL; } diff --git a/gdb/testsuite/gdb.base/nested-subp1.exp b/gdb/testsuite/gdb.base/nested-subp1.exp index 9d0e873ad7c..f1f29e82f4e 100644 --- a/gdb/testsuite/gdb.base/nested-subp1.exp +++ b/gdb/testsuite/gdb.base/nested-subp1.exp @@ -30,9 +30,9 @@ if {![support_nested_function_tests]} { } if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \ - [standard_output_file "${testcase}"] \ - executable \ - [list debug "additional_flags=-std=gnu99"]] != "" } { + [standard_output_file "${testcase}"] \ + executable \ + [list debug "additional_flags=-std=gnu99"]] != "" } { return -1 } @@ -46,11 +46,11 @@ if {![runto_main]} { set bp_location [gdb_get_line_number "STOP" "${testcase}.c"] gdb_test "break ${testcase}.c:${bp_location}" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \ - "breakpoint to the STOP marker" + "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \ + "breakpoint to the STOP marker" gdb_test "continue" \ - "Breakpoint \[0-9\]+, nested .*" \ - "continue to the STOP marker" + "Breakpoint \[0-9\]+, nested .*" \ + "continue to the STOP marker" # Check we get correct values for both local and non-local variable references. diff --git a/gdb/testsuite/gdb.base/nested-subp2.exp b/gdb/testsuite/gdb.base/nested-subp2.exp index 1846685a5d1..35b7865c8d1 100644 --- a/gdb/testsuite/gdb.base/nested-subp2.exp +++ b/gdb/testsuite/gdb.base/nested-subp2.exp @@ -55,8 +55,8 @@ if {![runto_main]} { set bp_location [gdb_get_line_number "STOP" "${testcase}.c"] gdb_test "break ${testcase}.c:${bp_location}" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \ - "breakpoint to the STOP marker" + "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \ + "breakpoint to the STOP marker" with_test_prefix "stop at first iteration" { gdb_test "continue" \ diff --git a/gdb/testsuite/gdb.base/nested-subp3.exp b/gdb/testsuite/gdb.base/nested-subp3.exp index 4099667fdac..3898b24591f 100644 --- a/gdb/testsuite/gdb.base/nested-subp3.exp +++ b/gdb/testsuite/gdb.base/nested-subp3.exp @@ -55,11 +55,11 @@ if {![runto_main]} { set bp_location [gdb_get_line_number "STOP" "${testcase}.c"] gdb_test "break ${testcase}.c:${bp_location}" \ - "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \ - "breakpoint to the STOP marker" + "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: .*" \ + "breakpoint to the STOP marker" gdb_test "continue" \ - "Breakpoint \[0-9\]+, child .*" \ - "continue to the STOP marker" + "Breakpoint \[0-9\]+, child .*" \ + "continue to the STOP marker" # Check we get correct values for both local and non-local variable references. diff --git a/gdb/testsuite/gdb.base/nofield.c b/gdb/testsuite/gdb.base/nofield.c index 4ff1cccd68d..a949f381445 100644 --- a/gdb/testsuite/gdb.base/nofield.c +++ b/gdb/testsuite/gdb.base/nofield.c @@ -36,4 +36,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.base/nofield.exp b/gdb/testsuite/gdb.base/nofield.exp index 31d0234c91f..d7d555ed2e9 100644 --- a/gdb/testsuite/gdb.base/nofield.exp +++ b/gdb/testsuite/gdb.base/nofield.exp @@ -27,10 +27,10 @@ clean_restart gdb_load $binfile gdb_test "ptype struct not_empty" \ - "type = struct not_empty {$eol${sp}void \\*e;$eol${sp}void \\*u;$eol}" + "type = struct not_empty {$eol${sp}void \\*e;$eol${sp}void \\*u;$eol}" gdb_test "ptype struct empty" \ - "type = struct empty {$eol$sp$eol}" + "type = struct empty {$eol$sp$eol}" gdb_test "ptype union empty_union" \ - "type = union empty_union {$eol$sp$eol}" + "type = union empty_union {$eol$sp$eol}" diff --git a/gdb/testsuite/gdb.base/opaque.exp b/gdb/testsuite/gdb.base/opaque.exp index c010fb899b8..49d505c3472 100644 --- a/gdb/testsuite/gdb.base/opaque.exp +++ b/gdb/testsuite/gdb.base/opaque.exp @@ -52,7 +52,7 @@ proc setup_xfail_on_opaque_pointer {} { setup_xfail "vax-*-*" "i*86-sequent-bsd*" if {!$gcc_compiled} { - setup_xfail "alpha-*-*" + setup_xfail "alpha-*-*" } } diff --git a/gdb/testsuite/gdb.base/overlays.c b/gdb/testsuite/gdb.base/overlays.c index e9dc9a0b586..cc967ef8d75 100644 --- a/gdb/testsuite/gdb.base/overlays.c +++ b/gdb/testsuite/gdb.base/overlays.c @@ -31,4 +31,3 @@ int main () + 'g' + 'r' + 'b' + 'x')); } - diff --git a/gdb/testsuite/gdb.base/overlays.exp b/gdb/testsuite/gdb.base/overlays.exp index 8e7e0c0ab70..1ab1cdc46b8 100644 --- a/gdb/testsuite/gdb.base/overlays.exp +++ b/gdb/testsuite/gdb.base/overlays.exp @@ -175,16 +175,16 @@ proc simultaneous_pair { sec1 sec2 } { send_gdb "overlay list\n" gdb_expect { - -re ".*[string_to_regexp $sec1], " { set seen_sec1 1; exp_continue } - -re ".*[string_to_regexp $sec2], " { set seen_sec2 1; exp_continue } - -re ".*$gdb_prompt $" { - if {$seen_sec1 && $seen_sec2} { - pass "$pairname" - } else { - fail "$pairname" - } - } - timeout { fail "(timeout) $pairname" } + -re ".*[string_to_regexp $sec1], " { set seen_sec1 1; exp_continue } + -re ".*[string_to_regexp $sec2], " { set seen_sec2 1; exp_continue } + -re ".*$gdb_prompt $" { + if {$seen_sec1 && $seen_sec2} { + pass "$pairname" + } else { + fail "$pairname" + } + } + timeout { fail "(timeout) $pairname" } } } @@ -265,4 +265,3 @@ gdb_expect { -re ".*$gdb_prompt $" { fail "BT grbx" } timeout { fail "(timeout) BT grbx" } } - diff --git a/gdb/testsuite/gdb.base/pie-execl.exp b/gdb/testsuite/gdb.base/pie-execl.exp index 0400a9909f8..aa4f2c36acb 100644 --- a/gdb/testsuite/gdb.base/pie-execl.exp +++ b/gdb/testsuite/gdb.base/pie-execl.exp @@ -80,7 +80,7 @@ gdb_test_multiple $test $test { } -i "$inferior_spawn_id" -re "pie-execl: re-exec" { # output from inferior - incr matches_found + incr matches_found if { $matches_found == 2 } { pass $test } else { @@ -90,7 +90,7 @@ gdb_test_multiple $test $test { -i "$gdb_spawn_id" -re "executing new program.*\r\nBreakpoint \[0-9\]+,\[^\r\n\]* pie_execl_marker .*\r\n$gdb_prompt $" { # output from gdb - incr matches_found + incr matches_found if { $matches_found == 2 } { pass $test } else { diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.exp index 73380bb45bc..adb9261bb43 100644 --- a/gdb/testsuite/gdb.base/prelink.exp +++ b/gdb/testsuite/gdb.base/prelink.exp @@ -69,9 +69,9 @@ foreach i "${coredir}/core ${coredir}/core.coremaker.c ${binfile}.core" { if { $found == 0 } { set names [glob -nocomplain -directory $coredir core.*] if {[llength $names] == 1} { - set corefile [file join $coredir [lindex $names 0]] - remote_exec build "mv $corefile [standard_output_file prelink.core]" - set found 1 + set corefile [file join $coredir [lindex $names 0]] + remote_exec build "mv $corefile [standard_output_file prelink.core]" + set found 1 } } diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index 0165791e3d9..2baa3399c75 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -711,7 +711,7 @@ proc test_artificial_arrays {} { "({{0, 1}, {2, 3}, {4, 5}}|\[Cc\]annot.*)" \ {p int1dim[0]@2@3} gdb_test_escape_braces "p int1dim\[0\]${ctrlv}@FE_TWO" " = {0, 1}" \ - {p int1dim[0]@TWO} + {p int1dim[0]@TWO} gdb_test_escape_braces "p int1dim\[0\]${ctrlv}@FE_TWO${ctrlv}@three" \ "({{0, 1}, {2, 3}, {4, 5}}|\[Cc\]annot.*)" \ {p int1dim[0]@TWO@three} diff --git a/gdb/testsuite/gdb.base/prologue-include.c b/gdb/testsuite/gdb.base/prologue-include.c index 3efc0ba2be8..8ca40f879f8 100644 --- a/gdb/testsuite/gdb.base/prologue-include.c +++ b/gdb/testsuite/gdb.base/prologue-include.c @@ -22,4 +22,3 @@ main (void) #include "prologue-include.h" return 0; } - diff --git a/gdb/testsuite/gdb.base/psym-external-decl.c b/gdb/testsuite/gdb.base/psym-external-decl.c index fe67dae4975..e8d3b4a3dde 100644 --- a/gdb/testsuite/gdb.base/psym-external-decl.c +++ b/gdb/testsuite/gdb.base/psym-external-decl.c @@ -22,4 +22,3 @@ main (void) { return aaa; } - diff --git a/gdb/testsuite/gdb.base/ptype-offsets.exp b/gdb/testsuite/gdb.base/ptype-offsets.exp index ff20ef549a2..a8e9cd7eec4 100644 --- a/gdb/testsuite/gdb.base/ptype-offsets.exp +++ b/gdb/testsuite/gdb.base/ptype-offsets.exp @@ -411,7 +411,7 @@ with_test_prefix "with_hex_default" { # Test setting default display to hex gdb_test_no_output "set print type hex on" gdb_test "show print type hex" \ - "Display of struct members offsets and sizes in hexadecimal is on" + "Display of struct members offsets and sizes in hexadecimal is on" # test "ptype /o" is now equivalent to "ptype /ox" gdb_test "ptype /o struct abc" \ diff --git a/gdb/testsuite/gdb.base/ptype.exp b/gdb/testsuite/gdb.base/ptype.exp index 25dd4c912e4..cf28aea2f51 100644 --- a/gdb/testsuite/gdb.base/ptype.exp +++ b/gdb/testsuite/gdb.base/ptype.exp @@ -497,7 +497,7 @@ gdb_test "ptype nested_su.inner_union_instance" "type = union inner_union \{.*\[ # correctly printed (at nesting level 1 and 2). gdb_test "ptype the_highest" \ - "type = struct highest \{.*\[\r\n\] *int a;.*\[\r\n\] *struct \{.*\[\r\n\] *int b;.*\[\r\n\] *struct \{\.\.\.\} anonymous_level_2;.*\[\r\n\] *\} anonymous_level_1;.*\[\r\n\]}.*" + "type = struct highest \{.*\[\r\n\] *int a;.*\[\r\n\] *struct \{.*\[\r\n\] *int b;.*\[\r\n\] *struct \{\.\.\.\} anonymous_level_2;.*\[\r\n\] *\} anonymous_level_1;.*\[\r\n\]}.*" # Print the type descrption for one of the fields of variable the_highest. # The purpose is to verify that the type of a field that was printed above @@ -505,8 +505,8 @@ gdb_test "ptype the_highest" \ # nesting level is now one level less). gdb_test "ptype the_highest.anonymous_level_1" \ - "type = struct \{.*\[\r\n\] *int b;.*\[\r\n\] *struct \{.*\[\r\n\] *int c;.*\[\r\n\] *\} anonymous_level_2;.*\[\r\n\]}.*" \ - "ptype the_highest.anonymous_level_1" + "type = struct \{.*\[\r\n\] *int b;.*\[\r\n\] *struct \{.*\[\r\n\] *int c;.*\[\r\n\] *\} anonymous_level_2;.*\[\r\n\]}.*" \ + "ptype the_highest.anonymous_level_1" get_debug_format @@ -535,37 +535,37 @@ proc ptype_maybe_prototyped { id prototyped plain { overprototyped "NO-MATCH" } } gdb_test_multiple "ptype $id" "ptype $id" { - -re "type = $prototyped\[\r\n\]+$gdb_prompt $" { - pass "ptype $id" - } - -re "type = $plain\[\r\n\]+$gdb_prompt $" { - if {$gcc_compiled} { setup_xfail_format "stabs" } - fail "ptype $id (compiler doesn't emit prototyped types)" - } - -re "type = $overprototyped\[\r\n\]+$gdb_prompt $" { + -re "type = $prototyped\[\r\n\]+$gdb_prompt $" { + pass "ptype $id" + } + -re "type = $plain\[\r\n\]+$gdb_prompt $" { + if {$gcc_compiled} { setup_xfail_format "stabs" } + fail "ptype $id (compiler doesn't emit prototyped types)" + } + -re "type = $overprototyped\[\r\n\]+$gdb_prompt $" { # C23 no longer supports non-prototype function declaration, in which # case the overprototyped regexp is the expected one. Simply pass # in all cases. pass "ptype $id (overprototyped)" - } + } } } ptype_maybe_prototyped "func_type" "int (*)(int (*)(int, float), float)" \ - "int (*)()" + "int (*)()" ptype_maybe_prototyped "old_fptr" "double (*)()" "double (*)()" \ - "double (*)(void)" + "double (*)(void)" ptype_maybe_prototyped "new_fptr" "double (*)(void)" "double (*)()" ptype_maybe_prototyped "fptr" "int (*)(int, float)" "int (*)()" ptype_maybe_prototyped "fptr2" "int *(*)(int (*)(int, float), float)" \ - "int *(*)()" + "int *(*)()" ptype_maybe_prototyped "xptr" "int (*)(int (*)(), int (*)(void), int)" \ - "int (*)()" \ - "int (*)(int (*)(void), int (*)(void), int)" + "int (*)()" \ + "int (*)(int (*)(void), int (*)(void), int)" ptype_maybe_prototyped "ffptr" "int (*(*)(char))(short int)" \ - "int (*(*)())()" + "int (*(*)())()" ptype_maybe_prototyped "fffptr" "int (*(*(*)(char))(short int))(long int)" \ - "int (*(*(*)())())()" + "int (*(*(*)())())()" # Test printing type of typedefs in different scopes, with same name # but different type. diff --git a/gdb/testsuite/gdb.base/randomize.exp b/gdb/testsuite/gdb.base/randomize.exp index 5a7b0891596..f8202679c67 100644 --- a/gdb/testsuite/gdb.base/randomize.exp +++ b/gdb/testsuite/gdb.base/randomize.exp @@ -54,8 +54,8 @@ gdb_test_multiple "${test}" "${test}" { } } gdb_test "show disable-randomization" \ - "Disabling randomization .* is off." \ - "show disable-randomization off" + "Disabling randomization .* is off." \ + "show disable-randomization off" set addr1 [address_get "randomized first address"] set addr2 [address_get "randomized second address"] @@ -69,8 +69,8 @@ if {[string equal $addr1 $addr2]} { gdb_test_no_output "set disable-randomization on" gdb_test "show disable-randomization" \ - "Disabling randomization .* is on." \ - "show disable-randomization on" + "Disabling randomization .* is on." \ + "show disable-randomization on" set addr1 [address_get "fixed first address"] set addr2 [address_get "fixed second address"] diff --git a/gdb/testsuite/gdb.base/readline-commands-eof.exp b/gdb/testsuite/gdb.base/readline-commands-eof.exp index d55dd1d1f56..7d78829574e 100644 --- a/gdb/testsuite/gdb.base/readline-commands-eof.exp +++ b/gdb/testsuite/gdb.base/readline-commands-eof.exp @@ -126,4 +126,3 @@ save_vars { env(TERM) } { } } } - diff --git a/gdb/testsuite/gdb.base/readnever.exp b/gdb/testsuite/gdb.base/readnever.exp index 891adf53a54..1db5831e3d4 100644 --- a/gdb/testsuite/gdb.base/readnever.exp +++ b/gdb/testsuite/gdb.base/readnever.exp @@ -36,16 +36,16 @@ if {![runto_main]} { } gdb_test "break fun_three" \ - "Breakpoint $decimal at $hex" + "Breakpoint $decimal at $hex" gdb_test "continue" \ - "Breakpoint $decimal, $hex in fun_three \\(\\)" + "Breakpoint $decimal, $hex in fun_three \\(\\)" gdb_test "backtrace" \ - [multi_line "#0 $hex in fun_three \\(\\)" \ - "#1 $hex in fun_two \\(\\)" \ - "#2 $hex in fun_one \\(\\)" \ - "#3 $hex in main \\(\\)" ] + [multi_line "#0 $hex in fun_three \\(\\)" \ + "#1 $hex in fun_two \\(\\)" \ + "#2 $hex in fun_one \\(\\)" \ + "#3 $hex in main \\(\\)" ] gdb_test_no_output "maint info symtabs" \ "maint info symtabs no output for --readnever" diff --git a/gdb/testsuite/gdb.base/recpar.exp b/gdb/testsuite/gdb.base/recpar.exp index 5676067c31d..59935c20bdf 100644 --- a/gdb/testsuite/gdb.base/recpar.exp +++ b/gdb/testsuite/gdb.base/recpar.exp @@ -24,18 +24,18 @@ if {![runto_main]} { } gdb_test "break $srcfile:[gdb_get_line_number BREAK $srcfile] if n == 3" \ - "Breakpoint $decimal at $hex: file .*recpar\\.c, line $decimal\\." + "Breakpoint $decimal at $hex: file .*recpar\\.c, line $decimal\\." gdb_test "continue" \ - "Breakpoint .* foo \\(n=3\\) at .*$srcfile:$decimal.*" + "Breakpoint .* foo \\(n=3\\) at .*$srcfile:$decimal.*" gdb_test "backtrace" \ - "#0 +foo \\(n=3\\).*\r\n#1.* foo \\(n=4\\).*\r\n#2.* foo \\(n=5\\).*#3.* main \\(\\).*" + "#0 +foo \\(n=3\\).*\r\n#1.* foo \\(n=4\\).*\r\n#2.* foo \\(n=5\\).*#3.* main \\(\\).*" gdb_test "frame 2" \ - "#2 .* foo \\(n=5\\) .*" + "#2 .* foo \\(n=5\\) .*" # In the currently selected frame, n=5, and thus foo::val should be 5 # as well. gdb_test "print foo::val" \ - " = 5" + " = 5" diff --git a/gdb/testsuite/gdb.base/recurse.exp b/gdb/testsuite/gdb.base/recurse.exp index e05f7e072a5..a8ad98a03a7 100644 --- a/gdb/testsuite/gdb.base/recurse.exp +++ b/gdb/testsuite/gdb.base/recurse.exp @@ -142,4 +142,3 @@ recurse_tests # Restore the preserved old timeout value. set timeout $oldtimeout verbose "Timeout is now $timeout seconds" 2 - diff --git a/gdb/testsuite/gdb.base/relational.exp b/gdb/testsuite/gdb.base/relational.exp index d79e205bd59..864e3e68e93 100644 --- a/gdb/testsuite/gdb.base/relational.exp +++ b/gdb/testsuite/gdb.base/relational.exp @@ -203,4 +203,3 @@ with_test_prefix "with parenthesis" { # 1 3 4 gdb_test "print (x == y) < z" "$true" "print value of (x==y) j 0) "n + " "") - last ");\n") - (setq j (1+ j))))) + (insert " n = " (callee j) " (" + (if (> j 0) "n + " "") + last ");\n") + (setq j (1+ j))))) (insert " return n+") (local-sum i) - (insert ";\n") + (insert ";\n") (insert "}\n\n") (setq i (1+ i)))) diff --git a/gdb/testsuite/gdb.base/restore.exp b/gdb/testsuite/gdb.base/restore.exp index a19c956645b..b2e58088da8 100644 --- a/gdb/testsuite/gdb.base/restore.exp +++ b/gdb/testsuite/gdb.base/restore.exp @@ -44,22 +44,22 @@ proc restore_tests { } { for {set c 1} {$c <= $limit} {incr c} { - # Set a breakpoint at the next caller function. - gdb_test "tbreak caller$c" "Temporary breakpoint.*\[0-9\]*\\." + # Set a breakpoint at the next caller function. + gdb_test "tbreak caller$c" "Temporary breakpoint.*\[0-9\]*\\." # Continue to the next caller function. gdb_test "continue" " caller$c prologue .*" "run to caller$c" # Do each callee function. - for {set e 1} {$e <= $limit} {incr e} { + for {set e 1} {$e <= $limit} {incr e} { - gdb_test "tbreak callee$e" "Temporary breakpoint.*\[0-9\]*\\." \ + gdb_test "tbreak callee$e" "Temporary breakpoint.*\[0-9\]*\\." \ "caller$c calls callee$e; tbreak callee" - gdb_test "continue" " callee$e prologue .*/" \ + gdb_test "continue" " callee$e prologue .*/" \ "caller$c calls callee$e; continue to callee" - # Do a forced return from the callee. + # Do a forced return from the callee. set test "caller$c calls callee$e; return callee now" gdb_test "return 0" \ @@ -68,14 +68,14 @@ proc restore_tests { } { "Make .* return now.*y or n. $" \ "y" - # Check that the values of the local variables are what + # Check that the values of the local variables are what # they should be. - for {set var 1} {$var <= $c} {incr var} { - set expected [expr {0x7eeb + $var}] + for {set var 1} {$var <= $c} {incr var} { + set expected [expr {0x7eeb + $var}] set test "caller$c calls callee$e; return restored l$var to $expected" set pass_pattern " = $expected" set unsupported_pattern " = " - gdb_test_multiple "print l$var" $test { + gdb_test_multiple "print l$var" $test { -re "\[\r\n\]*(?:$pass_pattern)\[\r\n\]+$gdb_prompt $" { pass $test } @@ -83,8 +83,8 @@ proc restore_tests { } { unsupported $test } } - } - } + } + } } gdb_continue_to_end "" continue 1 diff --git a/gdb/testsuite/gdb.base/return2.exp b/gdb/testsuite/gdb.base/return2.exp index e90a60b1da7..5a4fcae59f1 100644 --- a/gdb/testsuite/gdb.base/return2.exp +++ b/gdb/testsuite/gdb.base/return2.exp @@ -91,7 +91,7 @@ proc return2_tests { } { return_1 "int" return_1 "long" if {![istarget "m6811-*-*"] && ![istarget "h8300*-*"]} { - return_1 "long_long" + return_1 "long_long" } if {$allow_float_test} { return_1 "float" diff --git a/gdb/testsuite/gdb.base/save-bp.c b/gdb/testsuite/gdb.base/save-bp.c index 103b0924b9c..177741feaf7 100644 --- a/gdb/testsuite/gdb.base/save-bp.c +++ b/gdb/testsuite/gdb.base/save-bp.c @@ -33,4 +33,3 @@ main (void) break_me (); /* Finally, try a breakpoint with commands. */ return 0; /* Return line. */ } - diff --git a/gdb/testsuite/gdb.base/sep.c b/gdb/testsuite/gdb.base/sep.c index 5cd422306be..cce3441a495 100644 --- a/gdb/testsuite/gdb.base/sep.c +++ b/gdb/testsuite/gdb.base/sep.c @@ -28,4 +28,3 @@ main (void) say_hello (); return 0; } - diff --git a/gdb/testsuite/gdb.base/sep.exp b/gdb/testsuite/gdb.base/sep.exp index 6abf3564961..a07b4670c01 100644 --- a/gdb/testsuite/gdb.base/sep.exp +++ b/gdb/testsuite/gdb.base/sep.exp @@ -40,8 +40,8 @@ gdb_load $binfile # decides later to reformat sep-proc.c. gdb_test "list sep-proc.c:$location" \ - "void.*say_hello.*" \ - "list using location inside included file" + "void.*say_hello.*" \ + "list using location inside included file" # Try the same, but this time with a breakpoint. We need to exit # GDB to make sure that we havn't loaded the full symbols yet when @@ -52,10 +52,9 @@ gdb_load $binfile set test "breakpoint inside included file" gdb_test_multiple "break sep-proc.c:$location" "$test" { -re "Breakpoint.*at.* file .*sep-proc.c, line .*" { - pass "$test" + pass "$test" } -re "No source file named sep-proc.c.*" { - fail "$test" + fail "$test" } } - diff --git a/gdb/testsuite/gdb.base/server-del-break.exp b/gdb/testsuite/gdb.base/server-del-break.exp index adf503509ed..9cd1d5b0ab4 100644 --- a/gdb/testsuite/gdb.base/server-del-break.exp +++ b/gdb/testsuite/gdb.base/server-del-break.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { } gdb_test "break -q main" \ - "Breakpoint.*at.* file .*$srcfile, line .*" + "Breakpoint.*at.* file .*$srcfile, line .*" # Try deleting all breakpoints, using the "server" command prefix. # Prefixing the "delete breakpoints" with "server" should turn diff --git a/gdb/testsuite/gdb.base/set-lang-auto.exp b/gdb/testsuite/gdb.base/set-lang-auto.exp index e6f961bae82..947762cb15f 100644 --- a/gdb/testsuite/gdb.base/set-lang-auto.exp +++ b/gdb/testsuite/gdb.base/set-lang-auto.exp @@ -26,28 +26,26 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { # Check the language after the binary has been loaded. It should be # "auto; currently c". gdb_test "show lang" \ - "The current source language is \"auto; currently c\"\\." \ - "show lang after loading binary" + "The current source language is \"auto; currently c\"\\." \ + "show lang after loading binary" # Now, switch the language to a specific language, instead of leaving it # on auto. gdb_test_no_output "set lang ada" \ - "forcing the language to ada" + "forcing the language to ada" # Verify that the language is now "ada". gdb_test "show lang" \ - "The current source language is \"ada\"\\." \ - "show lang after switching language to ada" + "The current source language is \"ada\"\\." \ + "show lang after switching language to ada" # Then, switch back to auto... gdb_test_no_output "set lang auto" \ - "switching the language back to auto" + "switching the language back to auto" # ... And verify that the language mode is back to auto *and* that # the selected language is C. gdb_test "show lang" \ - "The current source language is \"auto; currently c\"\\." \ - "show lang after having switched back to auto" - - + "The current source language is \"auto; currently c\"\\." \ + "show lang after having switched back to auto" diff --git a/gdb/testsuite/gdb.base/settings.exp b/gdb/testsuite/gdb.base/settings.exp index d83023b6816..cd0e9033518 100644 --- a/gdb/testsuite/gdb.base/settings.exp +++ b/gdb/testsuite/gdb.base/settings.exp @@ -114,7 +114,7 @@ proc check_type {setting expected} { # "No type information for GDB functions" # Test 'type int', so as to make it fail if ptype is changed. gdb_test "ptype \$_gdb_maint_setting(\"$setting\")" \ - "type = int" + "type = int" } } diff --git a/gdb/testsuite/gdb.base/share-psymtabs-bt.exp b/gdb/testsuite/gdb.base/share-psymtabs-bt.exp index 62c8dc5b29c..3f8b8db30c1 100644 --- a/gdb/testsuite/gdb.base/share-psymtabs-bt.exp +++ b/gdb/testsuite/gdb.base/share-psymtabs-bt.exp @@ -28,7 +28,7 @@ standard_testfile .c share-psymtabs-bt-2.c if { [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \ - {debug}] } { + {debug}] } { untested "failed to compile" return -1 } diff --git a/gdb/testsuite/gdb.base/shr1.c b/gdb/testsuite/gdb.base/shr1.c index da7bffa2efd..9d428c665f7 100644 --- a/gdb/testsuite/gdb.base/shr1.c +++ b/gdb/testsuite/gdb.base/shr1.c @@ -38,6 +38,3 @@ int pstructarg(struct s *x) { return x->a; } - - - diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp index 461a92b57f2..500ccd9f6a8 100644 --- a/gdb/testsuite/gdb.base/sigall.exp +++ b/gdb/testsuite/gdb.base/sigall.exp @@ -56,7 +56,7 @@ proc test_one_sig {nextsig} { if { $thissig == "URG" } { setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu" } - # Either Lynx or GDB screws up on SIGPRIO + # Either Lynx or GDB screws up on SIGPRIO if { $thissig == "PRIO" } { setup_xfail "*-*-*lynx*" } @@ -74,14 +74,14 @@ proc test_one_sig {nextsig} { if {$missed_handler == "0"} { gdb_test_multiple "signal 0" "advance to $nextsig" { -re "Breakpoint.*gen_$nextsig.*\r\n\[0-9\]+\[ \t\]+kill \\(.*\r\n$gdb_prompt $" { - pass "advance to $nextsig" - set sig_supported 1 + pass "advance to $nextsig" + set sig_supported 1 } -re "Breakpoint.*gen_$nextsig.*\r\n\[0-9\]+\[ \t\]+handle_.*\r\n$gdb_prompt $" { - pass "advance to $nextsig" - set sig_supported 0 + pass "advance to $nextsig" + set sig_supported 0 } - } + } } set thissig $nextsig } diff --git a/gdb/testsuite/gdb.base/sigchld.exp b/gdb/testsuite/gdb.base/sigchld.exp index 40112417460..fe9f2d647ef 100644 --- a/gdb/testsuite/gdb.base/sigchld.exp +++ b/gdb/testsuite/gdb.base/sigchld.exp @@ -30,9 +30,9 @@ gdb_load $binfile runto_main gdb_test "b [gdb_get_line_number "good, not blocked"]" \ - ".*Breakpoint .*sigchld.*" "set breakpoint at success exit" + ".*Breakpoint .*sigchld.*" "set breakpoint at success exit" gdb_test "b [gdb_get_line_number "bad, blocked"]" \ - ".*Breakpoint .*sigchld.*" "set breakpoint at failure exit" + ".*Breakpoint .*sigchld.*" "set breakpoint at failure exit" gdb_test "continue" ".*good, not blocked.*" "SIGCHLD blocked in inferior" diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp index c0aaa0a3ed2..7cd9298ef9d 100644 --- a/gdb/testsuite/gdb.base/signals.exp +++ b/gdb/testsuite/gdb.base/signals.exp @@ -38,8 +38,8 @@ proc test_handle_all_print {} { set timeout [expr {$timeout + 60}] verbose "Timeout is now $timeout seconds" 2 if { ![istarget "*-*-linux*"] - && ( [istarget "*-*-gnu*"] - || [istarget "*-*-mach*"] ) } { + && ( [istarget "*-*-gnu*"] + || [istarget "*-*-mach*"] ) } { gdb_test_sequence "handle all print" "" \ { "Signal\[ \]+Stop\[ \]+Print\[ \]+Pass to program\[ \]+Description\r\nSIGHUP\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Hangup" diff --git a/gdb/testsuite/gdb.base/signest.exp b/gdb/testsuite/gdb.base/signest.exp index c55db4aec7e..67f2f0cc3d4 100644 --- a/gdb/testsuite/gdb.base/signest.exp +++ b/gdb/testsuite/gdb.base/signest.exp @@ -41,7 +41,7 @@ if { [is_address_zero_readable] } { # Run until we hit the SIGSEGV (or SIGBUS on some platforms). gdb_test "continue" \ ".*Program received signal (SIGBUS|SIGSEGV).*bowler.*" \ - "continue to fault" + "continue to fault" # Insert conditional breakpoint at faulting instruction gdb_test "break if 0" ".*" "set conditional breakpoint" @@ -52,6 +52,5 @@ gdb_test "handle SIGBUS nostop print pass" ".*" "pass SIGBUS" # Step off the faulting instruction into the handler, triggering nested faults gdb_test "continue" \ - ".*Program received signal (SIGBUS|SIGSEGV).*Program received signal (SIGBUS|SIGSEGV).*exited normally.*" \ + ".*Program received signal (SIGBUS|SIGSEGV).*Program received signal (SIGBUS|SIGSEGV).*exited normally.*" \ "run through nested faults" - diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp index 3e2f162730b..0eef01c9e6b 100644 --- a/gdb/testsuite/gdb.base/skip.exp +++ b/gdb/testsuite/gdb.base/skip.exp @@ -337,4 +337,3 @@ with_test_prefix "skip delete completion" { test_gdb_complete_none "skip delete a1" test_gdb_complete_none "skip delete 2-33" } - diff --git a/gdb/testsuite/gdb.base/solib-abort.c b/gdb/testsuite/gdb.base/solib-abort.c index 5148ffb78e4..7b09561a4a7 100644 --- a/gdb/testsuite/gdb.base/solib-abort.c +++ b/gdb/testsuite/gdb.base/solib-abort.c @@ -22,4 +22,3 @@ main () callee (); return 0; } - diff --git a/gdb/testsuite/gdb.base/solib-search.exp b/gdb/testsuite/gdb.base/solib-search.exp index 35b0314d810..48b0267bd83 100644 --- a/gdb/testsuite/gdb.base/solib-search.exp +++ b/gdb/testsuite/gdb.base/solib-search.exp @@ -180,4 +180,3 @@ gdb_test "set solib-search-path [standard_output_file ${right_lib_subdir}]" \ test_backtrace 0 gdb_test "p lib1_size" " = 8192" gdb_test "p lib2_size" " = 8192" - diff --git a/gdb/testsuite/gdb.base/solib-symbol-main.c b/gdb/testsuite/gdb.base/solib-symbol-main.c index 34c099bdbb5..61af4af745d 100644 --- a/gdb/testsuite/gdb.base/solib-symbol-main.c +++ b/gdb/testsuite/gdb.base/solib-symbol-main.c @@ -39,4 +39,3 @@ void foo2() printf ("foo2 in main\n"); return; } - diff --git a/gdb/testsuite/gdb.base/solib-vanish.exp b/gdb/testsuite/gdb.base/solib-vanish.exp index d85e06a7154..f594873766e 100644 --- a/gdb/testsuite/gdb.base/solib-vanish.exp +++ b/gdb/testsuite/gdb.base/solib-vanish.exp @@ -114,4 +114,3 @@ gdb_continue_to_breakpoint "bar" \ gdb_test "next" \ "" \ "next succeeds" - diff --git a/gdb/testsuite/gdb.base/source-dir.exp b/gdb/testsuite/gdb.base/source-dir.exp index 96f5a7c685d..1a82c1875dd 100644 --- a/gdb/testsuite/gdb.base/source-dir.exp +++ b/gdb/testsuite/gdb.base/source-dir.exp @@ -84,7 +84,7 @@ proc test_truncated_comp_dir {} { # All of these pathname and directory manipulations assume # host == build, so do not attempt this set of tests on remote host. if {[is_remote host]} { - return + return } set working_dir [build_standard_output_file ""] @@ -123,7 +123,7 @@ proc test_truncated_comp_dir {} { gdb_load $binfile if { [ishost *-*-mingw*] } { - gdb_test_no_output "set directories \$cdir;\$cwd" + gdb_test_no_output "set directories \$cdir;\$cwd" } else { gdb_test_no_output "set directories \$cdir:\$cwd" } diff --git a/gdb/testsuite/gdb.base/source.exp b/gdb/testsuite/gdb.base/source.exp index d8b814f7fdf..60b0ebd3664 100644 --- a/gdb/testsuite/gdb.base/source.exp +++ b/gdb/testsuite/gdb.base/source.exp @@ -57,10 +57,10 @@ gdb_test "source -v -s ./source-test.gdb" \ # comes from the a command entered at the GDB prompt, and when # it comes from a script being sourced. gdb_test "source for-sure-nonexistant-file" \ - "for-sure-nonexistant-file: No such file or directory\." + "for-sure-nonexistant-file: No such file or directory\." gdb_test "source source-nofile.gdb" \ - "warning: for-sure-nonexistant-file: No such file or directory\.\[\r\n\]*source error not fatal" + "warning: for-sure-nonexistant-file: No such file or directory\.\[\r\n\]*source error not fatal" # Test commands that error out in sourced files, including in nested sourced diff --git a/gdb/testsuite/gdb.base/stack-protector.exp b/gdb/testsuite/gdb.base/stack-protector.exp index c56c5f57bfc..8fe63a8d4eb 100644 --- a/gdb/testsuite/gdb.base/stack-protector.exp +++ b/gdb/testsuite/gdb.base/stack-protector.exp @@ -52,7 +52,7 @@ proc simple_func_break_test { protection } { gdb_breakpoint "foo" if { $protection == "-fstack-protector-all" - && [test_compiler_info "gcc-*"] } { + && [test_compiler_info "gcc-*"] } { setup_xfail "gcc/88432" "*-*-linux*" } gdb_continue_to_breakpoint "foo" ".*break here.*" diff --git a/gdb/testsuite/gdb.base/stap-probe.exp b/gdb/testsuite/gdb.base/stap-probe.exp index 4d8efc184f3..540daf3970b 100644 --- a/gdb/testsuite/gdb.base/stap-probe.exp +++ b/gdb/testsuite/gdb.base/stap-probe.exp @@ -177,8 +177,8 @@ proc stap_test {exec_name {args ""}} { gdb_test "print \$_probe_arg0 == x" " = 1" \ "check \$_probe_arg0 for probe user" gdb_test "print \$_probe_arg1" \ - "Invalid probe argument 1 -- probe has 1 arguments available" \ - "check \$_probe_arg1 for probe user" + "Invalid probe argument 1 -- probe has 1 arguments available" \ + "check \$_probe_arg1 for probe user" # Set a breakpoint with multiple probe locations. gdb_test "break -pstap test:two" \ @@ -267,8 +267,8 @@ proc stap_test_no_debuginfo {exec_name {args ""}} { gdb_test "print \$_probe_arg0 == 23" " = 1" \ "check \$_probe_arg0 for probe user" gdb_test "print \$_probe_arg1" \ - "Invalid probe argument 1 -- probe has 1 arguments available" \ - "check \$_probe_arg1 for probe user" + "Invalid probe argument 1 -- probe has 1 arguments available" \ + "check \$_probe_arg1 for probe user" # Set a breakpoint with multiple probe locations. # In this scenario, we may expect more than 2 locations because of diff --git a/gdb/testsuite/gdb.base/start-cpp.exp b/gdb/testsuite/gdb.base/start-cpp.exp index ea8972fae63..59a1a59842c 100644 --- a/gdb/testsuite/gdb.base/start-cpp.exp +++ b/gdb/testsuite/gdb.base/start-cpp.exp @@ -39,5 +39,5 @@ if { [gdb_start_cmd] < 0 } { } gdb_test "" \ - "Temporary breakpoint $decimal at $hex: file.*main \\(\\) at .*start-cpp.cc:.*" \ - "start" + "Temporary breakpoint $decimal at $hex: file.*main \\(\\) at .*start-cpp.cc:.*" \ + "start" diff --git a/gdb/testsuite/gdb.base/start.exp b/gdb/testsuite/gdb.base/start.exp index 02e238a7dad..97be64da1b0 100644 --- a/gdb/testsuite/gdb.base/start.exp +++ b/gdb/testsuite/gdb.base/start.exp @@ -31,5 +31,5 @@ if { [gdb_start_cmd] < 0 } { } gdb_test "" \ - "main \\(\\) at .*start.c.*" \ - "start" + "main \\(\\) at .*start.c.*" \ + "start" diff --git a/gdb/testsuite/gdb.base/step-bt.exp b/gdb/testsuite/gdb.base/step-bt.exp index f213a2fb844..56b082cdad6 100644 --- a/gdb/testsuite/gdb.base/step-bt.exp +++ b/gdb/testsuite/gdb.base/step-bt.exp @@ -24,25 +24,24 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { } gdb_test "break *hello" \ - "Breakpoint.*at.* file .*$srcfile, line .*" \ - "breakpoint at first instruction of hello()" + "Breakpoint.*at.* file .*$srcfile, line .*" \ + "breakpoint at first instruction of hello()" gdb_run_cmd gdb_test "" "Breakpoint.* hello .* at .*$srcfile:.*" "run to hello()" gdb_test "stepi" \ - ".*" \ - "step first instruction" + ".*" \ + "step first instruction" gdb_test "bt" \ - "#0 +(0x\[0-9a-z\]+ in )?hello .*#1 +(0x\[0-9a-z\]* in )?main.*" \ - "backtrace after first instruction step" + "#0 +(0x\[0-9a-z\]+ in )?hello .*#1 +(0x\[0-9a-z\]* in )?main.*" \ + "backtrace after first instruction step" gdb_test "stepi" \ - ".*" \ - "step second instruction" + ".*" \ + "step second instruction" gdb_test "bt" \ - "#0 +(0x\[0-9a-z\]+ in )?hello .*#1 +(0x\[0-9a-z\]* in )?main.*" \ - "backtrace after second instruction step" - + "#0 +(0x\[0-9a-z\]+ in )?hello .*#1 +(0x\[0-9a-z\]* in )?main.*" \ + "backtrace after second instruction step" diff --git a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp index 146a0e061db..3a5700a64e3 100644 --- a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp +++ b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp @@ -23,7 +23,7 @@ if { [gcc_major_version] >= 8 } { append cflags " -fcf-protection=none" } if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ - [list debug "additional_flags=$cflags"]] } { + [list debug "additional_flags=$cflags"]] } { return -1 } @@ -48,18 +48,18 @@ proc stepi_until { current target test } { set count 0 gdb_test_multiple "stepi" "$test" { - -re "$current.*$gdb_prompt $" { - incr count - if { $count < 100 } { - send_gdb "stepi\n" - exp_continue - } else { - fail "$test" - } - } - -re "$target.*$gdb_prompt $" { - pass "$test" - } + -re "$current.*$gdb_prompt $" { + incr count + if { $count < 100 } { + send_gdb "stepi\n" + exp_continue + } else { + fail "$test" + } + } + -re "$target.*$gdb_prompt $" { + pass "$test" + } } } diff --git a/gdb/testsuite/gdb.base/step-line.exp b/gdb/testsuite/gdb.base/step-line.exp index 068adf52616..96071d093af 100644 --- a/gdb/testsuite/gdb.base/step-line.exp +++ b/gdb/testsuite/gdb.base/step-line.exp @@ -35,47 +35,47 @@ set remote_linefile [gdb_remote_download host ${srcdir}/${subdir}/${linefile}] gdb_test "break f1" ".*Breakpoint 2 at .* file .*step-line.c.*" gdb_test "continue" \ - "Continuing.*Breakpoint 2, f1 \\(i=4\\).*dummy \\(1, i\\);" \ + "Continuing.*Breakpoint 2, f1 \\(i=4\\).*dummy \\(1, i\\);" \ "continue to f1" gdb_test "next" \ - ".*i = f2 \\(i\\);.*" \ + ".*i = f2 \\(i\\);.*" \ "next over dummy 1" gdb_test "next" \ - ".*dummy \\(2, i\\);.*" \ + ".*dummy \\(2, i\\);.*" \ "next to dummy 2" gdb_test "next" \ - ".*i = f2 \\(i\\);.*" \ + ".*i = f2 \\(i\\);.*" \ "next over dummy 2" gdb_test "step" \ - ".*f2 \\(i=4\\).*dummy \\(4, i\\);.*" \ + ".*f2 \\(i=4\\).*dummy \\(4, i\\);.*" \ "step into f2" gdb_test "next" \ - ".*j = i;.*" \ + ".*j = i;.*" \ "next over dummy 4" gdb_test "next" \ - ".*dummy \\(5, i\\);.*" \ + ".*dummy \\(5, i\\);.*" \ "next to dummy 5" gdb_test "next" \ - ".*dummy \\(6, j\\);.*" \ + ".*dummy \\(6, j\\);.*" \ "next to dummy 6" gdb_test "next" \ - ".*j = SUCC \\(j\\);.*" \ + ".*j = SUCC \\(j\\);.*" \ "next over dummy 6" gdb_test "next" \ - ".*dummy \\(7, i\\);.*" \ + ".*dummy \\(7, i\\);.*" \ "next to dummy 7" gdb_test "next" \ - ".*dummy \\(8, j\\);.*" \ + ".*dummy \\(8, j\\);.*" \ "next to dummy 8" gdb_test "next" \ - ".*j = j - i;.*" \ + ".*j = j - i;.*" \ "next over dummy 8" gdb_test "next" \ - ".*dummy \\(9, i\\);.*" \ + ".*dummy \\(9, i\\);.*" \ "next to dummy 9" gdb_test "next" \ - ".*dummy \\(10, j\\);.*" \ + ".*dummy \\(10, j\\);.*" \ "next to dummy 10" gdb_test "next" \ - ".*RETURN \\(j\\);.*" \ + ".*RETURN \\(j\\);.*" \ "next over dummy 10" diff --git a/gdb/testsuite/gdb.base/step-line.inp b/gdb/testsuite/gdb.base/step-line.inp index 7f49e9731c5..5bf49c6f32f 100644 --- a/gdb/testsuite/gdb.base/step-line.inp +++ b/gdb/testsuite/gdb.base/step-line.inp @@ -6,12 +6,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . diff --git a/gdb/testsuite/gdb.base/step-test.c b/gdb/testsuite/gdb.base/step-test.c index c10fb8246c6..a3a5c43a5bc 100644 --- a/gdb/testsuite/gdb.base/step-test.c +++ b/gdb/testsuite/gdb.base/step-test.c @@ -58,4 +58,3 @@ int main () { exit (0); } - diff --git a/gdb/testsuite/gdb.base/step-test.exp b/gdb/testsuite/gdb.base/step-test.exp index cfcf5118151..372d52ccd83 100644 --- a/gdb/testsuite/gdb.base/step-test.exp +++ b/gdb/testsuite/gdb.base/step-test.exp @@ -67,10 +67,10 @@ gdb_test "step" ".*${decimal}.*myglob.*" "step into" set test "step out" if { [istarget "ia64-*-*"] || [istarget "mips*-*-*"]} { gdb_test_multiple "finish" "$test" { - -re ".*${decimal}.*a.*5.*= a.*3.*$gdb_prompt $" { + -re ".*${decimal}.*a.*5.*= a.*3.*$gdb_prompt $" { pass "$test" } - -re ".*${decimal}.*callee.*INTO.*$gdb_prompt $" { + -re ".*${decimal}.*callee.*INTO.*$gdb_prompt $" { pass "$test" } } @@ -188,7 +188,7 @@ gdb_test \ ".*Breakpoint.* at .*" \ "set breakpoint at call to large_struct_by_value" gdb_test "continue" \ - ".*Breakpoint ${decimal},.*large_struct_by_value.*" \ + ".*Breakpoint ${decimal},.*large_struct_by_value.*" \ "run to pass large struct" set test "large struct by value" gdb_test_multiple "step" "$test" { diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp index 21f442219c4..e91ebf4380c 100644 --- a/gdb/testsuite/gdb.base/store.exp +++ b/gdb/testsuite/gdb.base/store.exp @@ -234,4 +234,3 @@ check_field 4 # WANTED: A fairly portable way of convincing the compiler to split a # value across memory and registers. - diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp index 4850a59c872..5f0fae8e093 100644 --- a/gdb/testsuite/gdb.base/structs.exp +++ b/gdb/testsuite/gdb.base/structs.exp @@ -358,10 +358,10 @@ proc test_struct_returns { n } { set test "value foo returned; ${tests}" gdb_test_multiple "p/c L${n}" "${test}" { -re " = [foo ${n}].*${gdb_prompt} $" { - # This answer is okay regardless of whether GDB claims to - # have set the return value: if it did, then this is what - # we expected; and if it didn't, then any answer is okay. - pass "${test}" + # This answer is okay regardless of whether GDB claims to + # have set the return value: if it did, then this is what + # we expected; and if it didn't, then any answer is okay. + pass "${test}" } -re " = [any $n].*${gdb_prompt} $" { if {$return_value_known} { @@ -369,8 +369,8 @@ proc test_struct_returns { n } { # the location of the return value. fail "${test}" } else { - # We expected L${n} to be set to garbage, so any - # answer is acceptable. + # We expected L${n} to be set to garbage, so any + # answer is acceptable. pass "${test}" } } diff --git a/gdb/testsuite/gdb.base/subst.exp b/gdb/testsuite/gdb.base/subst.exp index 27c82c0457d..556eef1d0aa 100644 --- a/gdb/testsuite/gdb.base/subst.exp +++ b/gdb/testsuite/gdb.base/subst.exp @@ -19,126 +19,124 @@ clean_restart # commands that do not require the presence of an executable. gdb_test_no_output "set confirm off" \ - "deactivate GDB's confirmation interface" + "deactivate GDB's confirmation interface" # Clear any substitution rules that are available by default due # to GDB being configured with --with-relocated-sources. gdb_test_no_output "unset substitute-path" \ - "remove default substitution rules" + "remove default substitution rules" gdb_test "show substitute-path" \ - "List of all source path substitution rules:" \ - "show substitute-path, no rule entered yet" + "List of all source path substitution rules:" \ + "show substitute-path, no rule entered yet" gdb_test "show substitute-path from" \ - "Source path substitution rule matching `from':" \ - "show substitute-path from, no rule entered yet" + "Source path substitution rule matching `from':" \ + "show substitute-path from, no rule entered yet" gdb_test "show substitute-path too many" \ - "Too many arguments in command" \ - "show substitute-path, too many arguments" + "Too many arguments in command" \ + "show substitute-path, too many arguments" gdb_test "unset substitute-path from" \ - "No substitution rule defined for `from'" \ - "unset substitute-path from, no rule entered yet" + "No substitution rule defined for `from'" \ + "unset substitute-path from, no rule entered yet" gdb_test_no_output "unset substitute-path" \ - "unset substitute-path, no rule entered yet" + "unset substitute-path, no rule entered yet" gdb_test "unset substitute-path from" \ - "No substitution rule defined for `from'" \ - "unset substitute-path from, after unset substitute-path" + "No substitution rule defined for `from'" \ + "unset substitute-path from, after unset substitute-path" gdb_test "unset substitute-path from to" \ - "Incorrect usage, too many arguments in command" \ - "unset substitute-path, too many arguments" + "Incorrect usage, too many arguments in command" \ + "unset substitute-path, too many arguments" gdb_test "set substitute-path too many arguments" \ - "Incorrect usage, too many arguments in command" \ - "set substitute-path, too many arguments" + "Incorrect usage, too many arguments in command" \ + "set substitute-path, too many arguments" gdb_test "set substitute-path missing" \ - "Incorrect usage, too few arguments in command" \ - "set substitute-path, too few arguments" + "Incorrect usage, too few arguments in command" \ + "set substitute-path, too few arguments" gdb_test "set substitute-path '' to" \ - "First argument must be at least one character long" \ - "set substitute-path, first argument is empty string" + "First argument must be at least one character long" \ + "set substitute-path, first argument is empty string" gdb_test_no_output "set substitute-path from to" \ - "add from -> to substitution rule" + "add from -> to substitution rule" gdb_test_no_output "set substitute-path from1 to1/" \ - "add from1 -> to1 substitution rule" + "add from1 -> to1 substitution rule" gdb_test_no_output "set substitute-path source destination" \ - "add source -> destination substitution rule" + "add source -> destination substitution rule" gdb_test_no_output "set substitute-path depuis/ vers" \ - "add depuis -> vers substitution rule" + "add depuis -> vers substitution rule" gdb_test_no_output "set substitute-path empty ''" \ - "add substitution rule to empty string" + "add substitution rule to empty string" gdb_test "show substitute-path" \ - "List of all source path substitution rules:\r\n +`from' -> `to'.\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`depuis' -> `vers'.\r\n +`empty' -> `'." \ - "show substitute-path after all paths added" + "List of all source path substitution rules:\r\n +`from' -> `to'.\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`depuis' -> `vers'.\r\n +`empty' -> `'." \ + "show substitute-path after all paths added" gdb_test "show substitute-path from" \ - "Source path substitution rule matching `from':\r\n +`from' -> `to'." \ - "show substitute-path from, after all paths added" + "Source path substitution rule matching `from':\r\n +`from' -> `to'." \ + "show substitute-path from, after all paths added" gdb_test "show substitute-path depuis" \ - "Source path substitution rule matching `depuis':\r\n +`depuis' -> `vers'." \ - "show substitute-path depuis, after all paths added" + "Source path substitution rule matching `depuis':\r\n +`depuis' -> `vers'." \ + "show substitute-path depuis, after all paths added" gdb_test "show substitute-path from/path" \ - "Source path substitution rule matching `from/path':\r\n +`from' -> `to'." \ - "show substitute-path from/path, after all paths added" + "Source path substitution rule matching `from/path':\r\n +`from' -> `to'." \ + "show substitute-path from/path, after all paths added" gdb_test "show substitute-path from_a_bad_path" \ - "Source path substitution rule matching `from_a_bad_path':" \ - "show substitute-path from_a_bad_path, after all paths added" + "Source path substitution rule matching `from_a_bad_path':" \ + "show substitute-path from_a_bad_path, after all paths added" gdb_test "show substitute-path garbage" \ - "Source path substitution rule matching `garbage':" \ - "show substitute-path garbage, after all paths added" + "Source path substitution rule matching `garbage':" \ + "show substitute-path garbage, after all paths added" gdb_test_no_output "unset substitute-path from" \ - "unset substitute-path from" + "unset substitute-path from" gdb_test "show substitute-path from" \ - "Source path substitution rule matching `from':" \ - "show substitute-path from, after unsetting it" + "Source path substitution rule matching `from':" \ + "show substitute-path from, after unsetting it" gdb_test "show substitute-path" \ - "List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`depuis' -> `vers'.\r\n +`empty' -> `'." \ - "show substitute-path after from rule removed" + "List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`depuis' -> `vers'.\r\n +`empty' -> `'." \ + "show substitute-path after from rule removed" gdb_test "unset substitute-path from" \ - "No substitution rule defined for `from'" \ - "unset substitute-path from after the rule was removed" + "No substitution rule defined for `from'" \ + "unset substitute-path from after the rule was removed" gdb_test_no_output "unset substitute-path depuis" \ - "unset substitute-path depuis (middle of list)" + "unset substitute-path depuis (middle of list)" gdb_test "show substitute-path" \ - "List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`empty' -> `'." \ - "show substitute-path after depuis rule removed" + "List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`empty' -> `'." \ + "show substitute-path after depuis rule removed" gdb_test_no_output "unset substitute-path empty" \ - "unset substitute-path empty (end of list)" + "unset substitute-path empty (end of list)" gdb_test "show substitute-path" \ - "List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'." \ - "show substitute-path after empty rule removed" + "List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'." \ + "show substitute-path after empty rule removed" gdb_test_no_output "unset substitute-path" \ - "remove all remaining substitution rules" + "remove all remaining substitution rules" gdb_test "show substitute-path" \ - "List of all source path substitution rules:" \ - "show substitute-path after all remaining rules removed" - - + "List of all source path substitution rules:" \ + "show substitute-path after all remaining rules removed" diff --git a/gdb/testsuite/gdb.base/sum.c b/gdb/testsuite/gdb.base/sum.c index 3e27fa1a41a..d3e745b6d54 100644 --- a/gdb/testsuite/gdb.base/sum.c +++ b/gdb/testsuite/gdb.base/sum.c @@ -3,8 +3,8 @@ int sum(int *list, int low, int high) { - int i = 0, s = 0; /* stop-in-sum */ - for (i = low; i <= high; i++) - s += list[i]; - return(s); + int i = 0, s = 0; /* stop-in-sum */ + for (i = low; i <= high; i++) + s += list[i]; + return(s); } diff --git a/gdb/testsuite/gdb.base/term.exp b/gdb/testsuite/gdb.base/term.exp index 76bc004471e..545d4bc5892 100644 --- a/gdb/testsuite/gdb.base/term.exp +++ b/gdb/testsuite/gdb.base/term.exp @@ -49,18 +49,18 @@ proc compare_gdb_and_inferior_settings { t } { gdb_test "info terminal" \ [multi_line "Inferior's terminal status .currently saved by GDB.:" \ - "File descriptor flags = .*" \ - "Process group = $decimal" \ - "c_iflag = ${termios(c_iflag)}, c_oflag = ${termios(c_oflag)}," \ - "c_cflag = ${termios(c_cflag)}, c_lflag = ${termios(c_lflag)}.*" ] + "File descriptor flags = .*" \ + "Process group = $decimal" \ + "c_iflag = ${termios(c_iflag)}, c_oflag = ${termios(c_oflag)}," \ + "c_cflag = ${termios(c_cflag)}, c_lflag = ${termios(c_lflag)}.*" ] } if {[target_info gdb_protocol] == ""} { # Record the initial terminal settings. Verify that GDB's version of the # inferior's terminal settings is right. with_test_prefix "initial" { - array set termios1 [read_term_settings_from_inferior] - compare_gdb_and_inferior_settings [array get termios1] + array set termios1 [read_term_settings_from_inferior] + compare_gdb_and_inferior_settings [array get termios1] } # Continue until after the inferior removes ECHO from its terminal settings. @@ -69,12 +69,12 @@ if {[target_info gdb_protocol] == ""} { # After the inferior has changed its terminal settings, check that GDB's # saved version reflects the new settings correctly. with_test_prefix "post tcsetattr" { - array set termios2 [read_term_settings_from_inferior] - compare_gdb_and_inferior_settings [array get termios2] + array set termios2 [read_term_settings_from_inferior] + compare_gdb_and_inferior_settings [array get termios2] - # Make sure that the current settings are different than the initial - # settings... otherwise this test is meaningless. - gdb_assert {${termios1(c_lflag)} != ${termios2(c_lflag)}} + # Make sure that the current settings are different than the initial + # settings... otherwise this test is meaningless. + gdb_assert {${termios1(c_lflag)} != ${termios2(c_lflag)}} } # Continue again... @@ -83,12 +83,12 @@ if {[target_info gdb_protocol] == ""} { # ... and verify again, to validate that when resuming, GDB restored the # inferior's terminal settings correctly. with_test_prefix "after last resume" { - array set termios3 [read_term_settings_from_inferior] - compare_gdb_and_inferior_settings [array get termios3] - gdb_assert {${termios2(c_iflag)} == ${termios3(c_iflag)}} - gdb_assert {${termios2(c_oflag)} == ${termios3(c_oflag)}} - gdb_assert {${termios2(c_cflag)} == ${termios3(c_cflag)}} - gdb_assert {${termios2(c_lflag)} == ${termios3(c_lflag)}} + array set termios3 [read_term_settings_from_inferior] + compare_gdb_and_inferior_settings [array get termios3] + gdb_assert {${termios2(c_iflag)} == ${termios3(c_iflag)}} + gdb_assert {${termios2(c_oflag)} == ${termios3(c_oflag)}} + gdb_assert {${termios2(c_cflag)} == ${termios3(c_cflag)}} + gdb_assert {${termios2(c_lflag)} == ${termios3(c_lflag)}} } } else { # While only native targets save terminal status, we still test diff --git a/gdb/testsuite/gdb.base/testenv.c b/gdb/testsuite/gdb.base/testenv.c index 7dc35fc4409..8e5707068bc 100644 --- a/gdb/testsuite/gdb.base/testenv.c +++ b/gdb/testsuite/gdb.base/testenv.c @@ -41,4 +41,3 @@ int main (int argc, char **argv, char **envp) printf ("Program found %d variables starting with TEST_GDB\n", j); return 0; /* set breakpoint here. */ } - diff --git a/gdb/testsuite/gdb.base/until.exp b/gdb/testsuite/gdb.base/until.exp index a4e626e56f1..1768c5aab4b 100644 --- a/gdb/testsuite/gdb.base/until.exp +++ b/gdb/testsuite/gdb.base/until.exp @@ -72,4 +72,3 @@ delete_breakpoints gdb_test "until marker3" \ "($hex in |)main.*argc.*argv.*envp.*at.*${srcfile}:($bp_location20.*marker2 \\(43\\)|$bp_location21.*marker3 \\(.stack., .trace.\\)).*" \ "until func, not called by current frame" - diff --git a/gdb/testsuite/gdb.base/vla-datatypes.exp b/gdb/testsuite/gdb.base/vla-datatypes.exp index a11612398ee..e3413adf9c8 100644 --- a/gdb/testsuite/gdb.base/vla-datatypes.exp +++ b/gdb/testsuite/gdb.base/vla-datatypes.exp @@ -38,9 +38,9 @@ gdb_test "print short_vla" " = \\\{0, 2, 4, 6, 8\\\}" gdb_test "print unsigned_short_vla" " = \\\{0, 2, 4, 6, 8\\\}" gdb_test "print unsigned_char_vla" " = \"AAAAA\"" gdb_test "print foo_vla" \ - "\\\{\\\{a = 0\\\}, \\\{a = 2\\\}, \\\{a = 4\\\}, \\\{a = 6\\\}, \\\{a = 8\\\}\\\}" + "\\\{\\\{a = 0\\\}, \\\{a = 2\\\}, \\\{a = 4\\\}, \\\{a = 6\\\}, \\\{a = 8\\\}\\\}" gdb_test "print bar_vla" \ - "\\\{\\\{x = 0, y = \\\{a = 0\\\}\\\}, \\\{x = 2, y = \\\{a = 2\\\}\\\}, \\\{x = 4, y = \\\{a = 4\\\}\\\}, \\\{x = 6, y = \\\{a = 6\\\}\\\}, \\\{x = 8, y = \\\{a = 8\\\}\\\}\\\}" + "\\\{\\\{x = 0, y = \\\{a = 0\\\}\\\}, \\\{x = 2, y = \\\{a = 2\\\}\\\}, \\\{x = 4, y = \\\{a = 4\\\}\\\}, \\\{x = 6, y = \\\{a = 6\\\}\\\}, \\\{x = 8, y = \\\{a = 8\\\}\\\}\\\}" # Check whatis of VLA's. gdb_test "whatis int_vla" "type = int \\\[5\\\]" @@ -49,11 +49,11 @@ gdb_test "whatis double_vla" "type = double \\\[5\\\]" gdb_test "whatis float_vla" "type = float \\\[5\\\]" gdb_test "whatis long_vla" "type = long( int)? \\\[5\\\]" gdb_test "whatis unsigned_long_vla" \ - "type = (long unsigned int|unsigned long) \\\[5\\\]" + "type = (long unsigned int|unsigned long) \\\[5\\\]" gdb_test "whatis char_vla" "type = char \\\[5\\\]" gdb_test "whatis short_vla" "type = short( int)? \\\[5\\\]" gdb_test "whatis unsigned_short_vla" \ - "type = (short unsigned int|unsigned short) \\\[5\\\]" + "type = (short unsigned int|unsigned short) \\\[5\\\]" gdb_test "whatis unsigned_char_vla" "type = unsigned char \\\[5\\\]" gdb_test "whatis foo_vla" "type = struct foo \\\[5\\\]" gdb_test "whatis bar_vla" "type = BAR \\\[5\\\]" @@ -71,44 +71,44 @@ gdb_test "ptype unsigned_short_vla" "type = unsigned short \\\[5\\\]" gdb_test "ptype unsigned_char_vla" "type = unsigned char \\\[5\\\]" gdb_test "ptype foo_vla" "type = struct foo {\r\n\\s+int a;\r\n} \\\[5\\\]" gdb_test "ptype bar_vla" \ - "type = struct bar {\r\n\\s+int x;\r\n\\s+struct foo y;\r\n} \\\[5\\\]" + "type = struct bar {\r\n\\s+int x;\r\n\\s+struct foo y;\r\n} \\\[5\\\]" # Check the size of the VLA's. gdb_breakpoint [gdb_get_line_number "break_end_of_vla_factory"] gdb_continue_to_breakpoint "break_end_of_vla_factory" gdb_test "print int_size == sizeof(int_vla)" " = 1" "size of int_vla" gdb_test "print uint_size == sizeof(unsigned_int_vla)" " = 1" \ - "size of unsigned_int_vla" + "size of unsigned_int_vla" gdb_test "print double_size == sizeof(double_vla)" " = 1" \ - "size of double_vla" + "size of double_vla" gdb_test "print float_size == sizeof(float_vla)" " = 1" \ - "size of float_vla" + "size of float_vla" gdb_test "print long_size == sizeof(long_vla)" " = 1" \ - "size of long_vla" + "size of long_vla" gdb_test "print char_size == sizeof(char_vla)" " = 1" \ - "size of char_vla" + "size of char_vla" gdb_test "print short_size == sizeof(short_vla)" " = 1" \ - "size of short_vla" + "size of short_vla" gdb_test "print ushort_size == sizeof(unsigned_short_vla)" " = 1" \ - "size of unsigned_short_vla" + "size of unsigned_short_vla" gdb_test "print uchar_size == sizeof(unsigned_char_vla)" " = 1" \ - "size of unsigned_char_vla" + "size of unsigned_char_vla" gdb_test "print foo_size == sizeof(foo_vla)" " = 1" "size of foo_vla" gdb_test "print bar_size == sizeof(bar_vla)" " = 1" "size of bar_vla" # Check side effects for sizeof argument. set sizeof_int [get_sizeof "int" 4] gdb_test_no_output "set variable int_vla\[0\] = 42" \ - "set variable int_vla\[0\] = 42" + "set variable int_vla\[0\] = 42" gdb_test "print sizeof (++int_vla\[0\])" " = ${sizeof_int}" gdb_test "print int_vla\[0\]" " = 42" \ - "print int_vla\[0\] - sizeof no side effects" + "print int_vla\[0\] - sizeof no side effects" gdb_test "ptype ++int_vla\[0\]" "type = int" gdb_test "print int_vla\[0\]" " = 42" \ - "print int_vla\[0\] - ptype no side effects" + "print int_vla\[0\] - ptype no side effects" gdb_test "whatis ++int_vla\[0\]" "type = int" gdb_test "print int_vla\[0\]" " = 42" \ - "print int_vla\[0\] - whatis no side effects" + "print int_vla\[0\] - whatis no side effects" diff --git a/gdb/testsuite/gdb.base/vla-optimized-out.exp b/gdb/testsuite/gdb.base/vla-optimized-out.exp index 316043d55f6..2393ab7733c 100644 --- a/gdb/testsuite/gdb.base/vla-optimized-out.exp +++ b/gdb/testsuite/gdb.base/vla-optimized-out.exp @@ -89,4 +89,3 @@ foreach {test_prefix options} $test_matrix { vla_optimized_out $test_prefix $options } } - diff --git a/gdb/testsuite/gdb.base/vla-sideeffect.exp b/gdb/testsuite/gdb.base/vla-sideeffect.exp index 158ae356a2c..aff9ac00f2d 100644 --- a/gdb/testsuite/gdb.base/vla-sideeffect.exp +++ b/gdb/testsuite/gdb.base/vla-sideeffect.exp @@ -36,19 +36,19 @@ set sizeof_vla [expr {10 * $sizeof_int}] gdb_test "print sizeof (vla1\[i++\])" " = ${sizeof_int}" gdb_test "print i" " = 0" \ - "print i - sizeof no side effects" + "print i - sizeof no side effects" gdb_test "print sizeof (++vla1\[0\])" " = ${sizeof_int}" gdb_test "print vla1\[0\]" " = 10" \ - "print vla1\[0\] - sizeof no side effects" + "print vla1\[0\] - sizeof no side effects" gdb_test "ptype ++vla1\[0\]" "type = int" gdb_test "print vla1\[0\]" " = 10" \ - "print vla1\[0\] - ptype no side effects" + "print vla1\[0\] - ptype no side effects" gdb_test "whatis ++vla1\[0\]" "type = int" gdb_test "print vla1\[0\]" " = 10" \ - "print vla1\[0\] - whatis no side effects" + "print vla1\[0\] - whatis no side effects" gdb_test "print sizeof (vla2\[i++\])" " = ${sizeof_vla}" @@ -59,7 +59,7 @@ gdb_test "print sizeof (vla2\[i++ + sizeof(j++)\])" " = ${sizeof_vla}" gdb_test "print i" " = 2" \ "print i - sizeof with side effects, 2" gdb_test "print j" " = 0" \ - "print j - sizeof with no side effects" + "print j - sizeof with no side effects" gdb_test "ptype vla2\[i++\]" "type = int \\\[10\\\]" gdb_test "print i" " = 2" \ @@ -69,7 +69,7 @@ gdb_test "ptype vla2\[i++ + sizeof(j++)\]" "type = int \\\[10\\\]" gdb_test "print i" " = 2" \ "print i - ptype with side effects, 2" gdb_test "print j" " = 0" \ - "print j - ptype with no side effects" + "print j - ptype with no side effects" gdb_test "whatis vla2\[i++\]" "type = int \\\[10\\\]" gdb_test "print i" " = 2" \ @@ -79,4 +79,4 @@ gdb_test "whatis vla2\[i++ + sizeof(j++)\]" "type = int \\\[10\\\]" gdb_test "print i" " = 2" \ "print i - whatis with side effects, 2" gdb_test "print j" " = 0" \ - "print j - whatis with no side effects" + "print j - whatis with no side effects" diff --git a/gdb/testsuite/gdb.base/watch_thread_num.c b/gdb/testsuite/gdb.base/watch_thread_num.c index 87230cf0f98..f58f2085326 100644 --- a/gdb/testsuite/gdb.base/watch_thread_num.c +++ b/gdb/testsuite/gdb.base/watch_thread_num.c @@ -51,9 +51,9 @@ int main () { for (i = 0; i < NUM; i++) { - res = pthread_create (&threads[i], - NULL, - thread_function, + res = pthread_create (&threads[i], + NULL, + thread_function, (void *) i); } @@ -96,4 +96,3 @@ void *thread_function (void *arg) { pthread_exit (NULL); } - diff --git a/gdb/testsuite/gdb.base/watch_thread_num.exp b/gdb/testsuite/gdb.base/watch_thread_num.exp index e1b54c0e4fb..0c6d828e5d4 100644 --- a/gdb/testsuite/gdb.base/watch_thread_num.exp +++ b/gdb/testsuite/gdb.base/watch_thread_num.exp @@ -101,4 +101,3 @@ for {set i 1} {$i <= 5} {incr i} { } gdb_test "thread" ".*Current thread is $thread_num .*" $check } - diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 7a5a96aac58..fec74dc9ff7 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -457,28 +457,28 @@ proc test_complex_watchpoint {} { gdb_test "cont" "Continuing.*Breakpoint.*marker5 \\(\\).*" \ "did not trigger wrong watchpoint" - # Test watches of things declared locally in a function. - # In particular, test that a watch of stack-based things - # is deleted when the stack-based things go out of scope. - # + # Test watches of things declared locally in a function. + # In particular, test that a watch of stack-based things + # is deleted when the stack-based things go out of scope. + # gdb_test_no_output "disable" "disable in test_complex_watchpoint, first time" - gdb_test "break marker6" ".*Breakpoint.*" - gdb_test "cont" "Continuing.*Breakpoint.*marker6 \\(\\).*" \ - "continue to marker6" + gdb_test "break marker6" ".*Breakpoint.*" + gdb_test "cont" "Continuing.*Breakpoint.*marker6 \\(\\).*" \ + "continue to marker6" gdb_breakpoint [gdb_get_line_number "func2 breakpoint here"] gdb_continue_to_breakpoint "func2 breakpoint here, first time" - # Test a watch of a single stack-based variable, whose scope - # is the function we're now in. This should auto-delete when - # execution exits the scope of the watchpoint. - # + # Test a watch of a single stack-based variable, whose scope + # is the function we're now in. This should auto-delete when + # execution exits the scope of the watchpoint. + # gdb_test "watch local_a" \ "^(?:Hardware w|W)atchpoint $::decimal: local_a" \ "set local watch" - gdb_test "cont" "\[Ww\]atchpoint.*local_a.*" "trigger local watch" + gdb_test "cont" "\[Ww\]atchpoint.*local_a.*" "trigger local watch" set test "self-delete local watch" - gdb_test_multiple "cont" $test { + gdb_test_multiple "cont" $test { -re "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*\r\n$gdb_prompt $" { pass $test } @@ -498,43 +498,43 @@ proc test_complex_watchpoint {} { } gdb_continue_to_breakpoint "func2 breakpoint here, second time" - # We should be in "func2" again now. Test a watch of an - # expression which includes both a stack-based local and - # something whose scope is larger than this invocation - # of "func2". This should also auto-delete. - # + # We should be in "func2" again now. Test a watch of an + # expression which includes both a stack-based local and + # something whose scope is larger than this invocation + # of "func2". This should also auto-delete. + # gdb_test "watch local_a + ival5" \ "^(?:Hardware w|W)atchpoint $::decimal: local_a . ival5" \ "set partially local watch" - gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: local_a . ival5.*" \ - "trigger1 partially local watch" - gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: local_a . ival5.*" \ - "trigger2 partially local watch" - gdb_test "cont" "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*" \ - "self-delete partially local watch" - - # We should be in "func2" again now. Test a watch of a - # static (non-stack-based) local. Since this has scope - # across any invocations of "func2", it should not auto- - # delete. - # + gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: local_a . ival5.*" \ + "trigger1 partially local watch" + gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: local_a . ival5.*" \ + "trigger2 partially local watch" + gdb_test "cont" "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*" \ + "self-delete partially local watch" + + # We should be in "func2" again now. Test a watch of a + # static (non-stack-based) local. Since this has scope + # across any invocations of "func2", it should not auto- + # delete. + # gdb_continue_to_breakpoint "func2 breakpoint here, third time" gdb_test "watch static_b" \ "^(?:Hardware w|W)atchpoint $::decimal: static_b" \ - "set static local watch" - gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: static_b.*" \ - "trigger static local watch" - gdb_test "cont" "Continuing.*marker6 \\(\\).*" \ - "continue after trigger static local watch" - gdb_test "info break" ".*watchpoint.*static_b.*" \ - "static local watch did not self-delete" - - # We should be in "recurser" now. Test a watch of a stack- - # based local. Symbols mentioned in a watchpoint are bound - # at watchpoint-creation. Thus, a watch of a stack-based - # local to a recursing function should be bound only to that - # one invocation, and should not trigger for other invocations. - # + "set static local watch" + gdb_test "cont" "Continuing.*\[Ww\]atchpoint .*: static_b.*" \ + "trigger static local watch" + gdb_test "cont" "Continuing.*marker6 \\(\\).*" \ + "continue after trigger static local watch" + gdb_test "info break" ".*watchpoint.*static_b.*" \ + "static local watch did not self-delete" + + # We should be in "recurser" now. Test a watch of a stack- + # based local. Symbols mentioned in a watchpoint are bound + # at watchpoint-creation. Thus, a watch of a stack-based + # local to a recursing function should be bound only to that + # one invocation, and should not trigger for other invocations. + # with_test_prefix "local_x" { gdb_test "tbreak recurser" ".*breakpoint.*" gdb_test "cont" "Continuing.*recurser.*" @@ -548,8 +548,8 @@ proc test_complex_watchpoint {} { "self-delete local watch in recursive call" } - # Repeat the preceding test, but this time use "recurser::local_x" as - # the variable to track. + # Repeat the preceding test, but this time use "recurser::local_x" as + # the variable to track. with_test_prefix "recurser::local_x" { gdb_test "cont" "Continuing.*marker6.*" "continue to marker6" gdb_test "tbreak recurser" ".*breakpoint.*" @@ -661,8 +661,8 @@ proc test_wide_location_1 {} { # Platforms where the target can't watch such a large region # should clear hw_expected below. if { $no_hw || !$allow_hw_watchpoint_tests_p - || [istarget arm*-*-*] - || ([istarget powerpc*-*-*] && ![is_lp64_target])} { + || [istarget arm*-*-*] + || ([istarget powerpc*-*-*] && ![is_lp64_target])} { set hw_expected 0 } else { set hw_expected 1 @@ -709,8 +709,8 @@ proc test_wide_location_2 {} { # Platforms where the target can't watch such a large region # should clear hw_expected below. if { $no_hw || !$allow_hw_watchpoint_tests_p - || [istarget arm*-*-*] - || [istarget powerpc*-*-*]} { + || [istarget arm*-*-*] + || [istarget powerpc*-*-*]} { set hw_expected 0 } else { set hw_expected 1 @@ -855,7 +855,7 @@ proc test_no_hw_watchpoints {} { gdb_test "watch ival3 if count > 1 thread 1 " \ "watch ival3 if count > 1 thread 1 \r\nWatchpoint \[0-9\]*: ival3.*" \ - "set slow condition watch w/thread" + "set slow condition watch w/thread" gdb_test_no_output "delete \$bpnum" "delete watch w/condition and thread" @@ -872,7 +872,7 @@ proc test_no_hw_watchpoints {} { # Re-enable hardware watchpoints if necessary. if {$allow_hw_watchpoint_tests_p} { - gdb_test_no_output "set can-use-hw-watchpoints 1" "" + gdb_test_no_output "set can-use-hw-watchpoints 1" "" } } diff --git a/gdb/testsuite/gdb.base/watchpoints.exp b/gdb/testsuite/gdb.base/watchpoints.exp index 0d213151bb7..41f2b5c46a2 100644 --- a/gdb/testsuite/gdb.base/watchpoints.exp +++ b/gdb/testsuite/gdb.base/watchpoints.exp @@ -38,17 +38,17 @@ with_test_prefix "before inferior start" { # hardware watchpoint. gdb_test_no_output "set can-use-hw-watchpoints 0" "" gdb_test "watch ival1" "Watchpoint \[0-9\]+: ival1" \ - "create watchpoint" + "create watchpoint" # The next tests are written to match the current state of gdb: access # and read watchpoints require hardware watchpoint support, with this # turned off these can't be created. gdb_test "awatch ival1" \ - "Can't set read/access watchpoint when hardware watchpoints are disabled." \ - "create access watchpoint" + "Can't set read/access watchpoint when hardware watchpoints are disabled." \ + "create access watchpoint" gdb_test "rwatch ival1" \ - "Can't set read/access watchpoint when hardware watchpoints are disabled." \ - "create read watchpoint" + "Can't set read/access watchpoint when hardware watchpoints are disabled." \ + "create read watchpoint" } # This will turn hardware watchpoints back on and delete the watchpoint @@ -58,7 +58,7 @@ with_test_prefix "before inferior start" { # Disable hardware watchpoints if necessary. if {!$allow_hw_watchpoint_tests_p} { - gdb_test_no_output "set can-use-hw-watchpoints 0" "" + gdb_test_no_output "set can-use-hw-watchpoints 0" "" } runto_main diff --git a/gdb/testsuite/gdb.base/wchar.c b/gdb/testsuite/gdb.base/wchar.c index 3863614eecd..6fee56b107c 100644 --- a/gdb/testsuite/gdb.base/wchar.c +++ b/gdb/testsuite/gdb.base/wchar.c @@ -47,4 +47,3 @@ main (void) do_nothing (difficile); do_nothing (mixed); } - diff --git a/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp b/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp index 56efd291bd9..035cb8eeca0 100644 --- a/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp +++ b/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp @@ -26,8 +26,8 @@ set opaque_testfile wrong_frame_bt_full-opaque set opaque_objfile [standard_output_file "$opaque_testfile.o"] if {[gdb_compile "${srcdir}/${subdir}/$opaque_testfile.c" \ - $opaque_objfile \ - object {}] != ""} { + $opaque_objfile \ + object {}] != ""} { untested "failed to compile" return -1 } diff --git a/gdb/testsuite/gdb.btrace/cpu.exp b/gdb/testsuite/gdb.btrace/cpu.exp index b93882fafc9..93a7c625676 100644 --- a/gdb/testsuite/gdb.btrace/cpu.exp +++ b/gdb/testsuite/gdb.btrace/cpu.exp @@ -20,23 +20,23 @@ gdb_start proc test_good { arg } { gdb_test_no_output "set record btrace cpu $arg" "set cpu $arg" gdb_test "show record btrace cpu" "btrace cpu is '$arg'\." \ - "show cpu $arg" + "show cpu $arg" } proc test_bad { arg current } { gdb_test "set record btrace cpu $arg" \ - "Bad format\. See \"help set record btrace cpu\"\." \ - "set cpu $arg" + "Bad format\. See \"help set record btrace cpu\"\." \ + "set cpu $arg" gdb_test "show record btrace cpu" "btrace cpu is '$current'\." \ - "show cpu $arg" + "show cpu $arg" } proc test_junk { arg junk current } { gdb_test "set record btrace cpu $arg" \ - "Trailing junk: '$junk'\." \ - "set cpu $arg" + "Trailing junk: '$junk'\." \ + "set cpu $arg" gdb_test "show record btrace cpu" "btrace cpu is '$current'\." \ - "show cpu $arg" + "show cpu $arg" } gdb_test "show record btrace cpu" "btrace cpu is 'auto'\." "default cpu" diff --git a/gdb/testsuite/gdb.btrace/enable-running.exp b/gdb/testsuite/gdb.btrace/enable-running.exp index c2e64864b28..1e620ae8dbf 100644 --- a/gdb/testsuite/gdb.btrace/enable-running.exp +++ b/gdb/testsuite/gdb.btrace/enable-running.exp @@ -46,44 +46,44 @@ proc check_tracing_enabled { thread } { global gdb_prompt with_test_prefix "thread $thread" { - gdb_test "thread $thread" "(running).*" "is running" - - # We can't read the trace while the thread is running. - gdb_test "info record" "Selected thread is running\." \ - "info record while running" - - # Try various commands that try to read trace. - gdb_test "record instruction-history" "Selected thread is running\." - gdb_test "record function-call-history" "Selected thread is running\." - - # Including reverse-stepping commands. - gdb_test "reverse-continue" "\[Ss\]elected thread is running\." - gdb_test "reverse-step" "\[Ss\]elected thread is running\." - gdb_test "reverse-next" "\[Ss\]elected thread is running\." - gdb_test "reverse-finish" "\[Ss\]elected thread is running\." - - # Stop the thread before reading the trace. - gdb_test_multiple "interrupt" "interrupt" { - -re "interrupt\r\n$gdb_prompt " { - pass "interrupt" - } - } - # Wait until the thread actually stopped. - gdb_test_multiple "" "stopped" { - -re "Thread $thread.*stopped\." { - pass "stopped" - } - } - # We will consume the thread's current location as part of the - # "info record" output. - gdb_test "info record" [multi_line \ - "Active record target: record-btrace" \ - "Recording format: .*" \ - "Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" \ - ] - - # Continue the thread again. - gdb_test "cont&" "Continuing\." + gdb_test "thread $thread" "(running).*" "is running" + + # We can't read the trace while the thread is running. + gdb_test "info record" "Selected thread is running\." \ + "info record while running" + + # Try various commands that try to read trace. + gdb_test "record instruction-history" "Selected thread is running\." + gdb_test "record function-call-history" "Selected thread is running\." + + # Including reverse-stepping commands. + gdb_test "reverse-continue" "\[Ss\]elected thread is running\." + gdb_test "reverse-step" "\[Ss\]elected thread is running\." + gdb_test "reverse-next" "\[Ss\]elected thread is running\." + gdb_test "reverse-finish" "\[Ss\]elected thread is running\." + + # Stop the thread before reading the trace. + gdb_test_multiple "interrupt" "interrupt" { + -re "interrupt\r\n$gdb_prompt " { + pass "interrupt" + } + } + # Wait until the thread actually stopped. + gdb_test_multiple "" "stopped" { + -re "Thread $thread.*stopped\." { + pass "stopped" + } + } + # We will consume the thread's current location as part of the + # "info record" output. + gdb_test "info record" [multi_line \ + "Active record target: record-btrace" \ + "Recording format: .*" \ + "Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" \ + ] + + # Continue the thread again. + gdb_test "cont&" "Continuing\." } } diff --git a/gdb/testsuite/gdb.btrace/instruction_history.exp b/gdb/testsuite/gdb.btrace/instruction_history.exp index fb68b332271..bc7bf5903ef 100644 --- a/gdb/testsuite/gdb.btrace/instruction_history.exp +++ b/gdb/testsuite/gdb.btrace/instruction_history.exp @@ -50,8 +50,8 @@ set traced {} set testname "determine number of recorded instructions" gdb_test_multiple "info record" $testname { -re "Active record target: record-btrace\r\n.*\r\nRecorded \(\[0-9\]*\) instructions in \(\[0-9\]*\) functions \\\(0 gaps\\\) for thread 1 .*\\.\r\n$gdb_prompt $" { - set traced $expect_out(1,string) - pass $testname + set traced $expect_out(1,string) + pass $testname } } @@ -107,9 +107,9 @@ proc test_lines_output { command message } { global gdb_prompt set message "test_lines_output: $message" gdb_test_multiple $command $message { - -re "\n\(.*\)\r\n$gdb_prompt $" { - return [split [string trim $expect_out(1,string)] "\n"] - } + -re "\n\(.*\)\r\n$gdb_prompt $" { + return [split [string trim $expect_out(1,string)] "\n"] + } } } diff --git a/gdb/testsuite/gdb.btrace/multi-thread-step.exp b/gdb/testsuite/gdb.btrace/multi-thread-step.exp index 7a769b55af9..4afb4b27fa3 100644 --- a/gdb/testsuite/gdb.btrace/multi-thread-step.exp +++ b/gdb/testsuite/gdb.btrace/multi-thread-step.exp @@ -43,7 +43,7 @@ proc gdb_cont_to_line { line } { proc check_replay_insn { thread insn } { gdb_test "thread apply $thread info record" \ - "Replay in progress\. At instruction $insn\." + "Replay in progress\. At instruction $insn\." } proc check_not_replaying { thread } { @@ -52,12 +52,12 @@ proc check_not_replaying { thread } { set test "thread $thread not replaying" gdb_test_multiple "thread apply $thread info record" $test { - -re "Replay in progress" { - fail $test - } - -re "$gdb_prompt $" { - pass $test - } + -re "Replay in progress" { + fail $test + } + -re "$gdb_prompt $" { + pass $test + } } } @@ -71,116 +71,116 @@ gdb_cont_to_line $srcfile:$bp_2 proc test_navigate {} { with_test_prefix "navigate" { - gdb_test "thread 1" ".*" - with_test_prefix "thread 1" { - gdb_test "record goto begin" ".*" - - check_replay_insn 1 1 - check_not_replaying 2 - } - gdb_test "thread 2" ".*" - with_test_prefix "thread 2" { - gdb_test "record goto begin" ".*" - - check_replay_insn 1 1 - check_replay_insn 2 1 - } + gdb_test "thread 1" ".*" + with_test_prefix "thread 1" { + gdb_test "record goto begin" ".*" + + check_replay_insn 1 1 + check_not_replaying 2 + } + gdb_test "thread 2" ".*" + with_test_prefix "thread 2" { + gdb_test "record goto begin" ".*" + + check_replay_insn 1 1 + check_replay_insn 2 1 + } } } proc test_step {} { with_test_prefix "step" { - gdb_test "thread 1" ".*" - with_test_prefix "thread 1" { - gdb_test "stepi" ".*" - - check_replay_insn 1 2 - check_replay_insn 2 1 - } - gdb_test "thread 2" ".*" - with_test_prefix "thread 2" { - gdb_test "stepi" ".*" - - check_replay_insn 1 2 - check_replay_insn 2 2 - } + gdb_test "thread 1" ".*" + with_test_prefix "thread 1" { + gdb_test "stepi" ".*" + + check_replay_insn 1 2 + check_replay_insn 2 1 + } + gdb_test "thread 2" ".*" + with_test_prefix "thread 2" { + gdb_test "stepi" ".*" + + check_replay_insn 1 2 + check_replay_insn 2 2 + } } } proc test_cont {} { with_test_prefix "cont" { - gdb_test "thread 1" ".*" - with_test_prefix "thread 1" { - gdb_test "continue" "Reached end of recorded history.*" - - check_not_replaying 1 - check_replay_insn 2 2 - } - gdb_test "thread 2" ".*" - with_test_prefix "thread 2" { - gdb_test "continue" "Reached end of recorded history.*" - - check_not_replaying 1 - check_not_replaying 2 - } + gdb_test "thread 1" ".*" + with_test_prefix "thread 1" { + gdb_test "continue" "Reached end of recorded history.*" + + check_not_replaying 1 + check_replay_insn 2 2 + } + gdb_test "thread 2" ".*" + with_test_prefix "thread 2" { + gdb_test "continue" "Reached end of recorded history.*" + + check_not_replaying 1 + check_not_replaying 2 + } } } proc test_cont_all {} { with_test_prefix "cont-all" { - gdb_test "continue" "Reached end of recorded history.*" + gdb_test "continue" "Reached end of recorded history.*" - # this works because we're lock-stepping threads that executed exactly - # the same code starting from the same instruction. + # this works because we're lock-stepping threads that executed exactly + # the same code starting from the same instruction. - check_not_replaying 1 - check_not_replaying 2 + check_not_replaying 1 + check_not_replaying 2 } } proc test_rstep {} { with_test_prefix "reverse-step" { - gdb_test "thread apply all record goto 3" - - gdb_test "thread 1" ".*" - with_test_prefix "thread 1" { - gdb_test "reverse-stepi" ".*" - - check_replay_insn 1 2 - check_replay_insn 2 3 - } - gdb_test "thread 2" ".*" - with_test_prefix "thread 2" { - gdb_test "reverse-stepi" ".*" - - check_replay_insn 1 2 - check_replay_insn 2 2 - } + gdb_test "thread apply all record goto 3" + + gdb_test "thread 1" ".*" + with_test_prefix "thread 1" { + gdb_test "reverse-stepi" ".*" + + check_replay_insn 1 2 + check_replay_insn 2 3 + } + gdb_test "thread 2" ".*" + with_test_prefix "thread 2" { + gdb_test "reverse-stepi" ".*" + + check_replay_insn 1 2 + check_replay_insn 2 2 + } } } proc test_goto_end {} { with_test_prefix "goto-end" { - gdb_test "thread apply all record goto end" + gdb_test "thread apply all record goto end" - check_not_replaying 1 - check_not_replaying 2 + check_not_replaying 1 + check_not_replaying 2 } } foreach schedlock { "replay" "on" "step" } { with_test_prefix "schedlock-$schedlock" { - gdb_test_no_output "set scheduler-locking $schedlock" - - test_navigate - test_step - if { $schedlock == "step" } { - test_cont_all - } else { - test_cont - } - test_rstep - test_goto_end + gdb_test_no_output "set scheduler-locking $schedlock" + + test_navigate + test_step + if { $schedlock == "step" } { + test_cont_all + } else { + test_cont + } + test_rstep + test_goto_end } } @@ -194,20 +194,20 @@ with_test_prefix "cont-to-end" { gdb_test "thread 1" ".*" with_test_prefix "thread 1" { - gdb_test "record goto begin" ".*" + gdb_test "record goto begin" ".*" - check_replay_insn 1 1 + check_replay_insn 1 1 } gdb_test "thread 2" ".*" with_test_prefix "thread 2" { - gdb_test "record goto end" ".*" + gdb_test "record goto end" ".*" - check_not_replaying 2 + check_not_replaying 2 - # if we reach the breakpoint, thread 2 terminated... - gdb_cont_to_line $srcfile:$bp_3 + # if we reach the breakpoint, thread 2 terminated... + gdb_cont_to_line $srcfile:$bp_3 - # and thread 1 stopped replaying - check_not_replaying 1 + # and thread 1 stopped replaying + check_not_replaying 1 } } diff --git a/gdb/testsuite/gdb.btrace/non-stop.exp b/gdb/testsuite/gdb.btrace/non-stop.exp index bc5ebdbcb0e..81ea0096f1e 100644 --- a/gdb/testsuite/gdb.btrace/non-stop.exp +++ b/gdb/testsuite/gdb.btrace/non-stop.exp @@ -55,28 +55,28 @@ proc gdb_cont_to { threads cmd line nthreads } { # consume the prompt. since we started the command in the background, # the prompt precedes any further output except some errors. gdb_test_multiple "$full_cmd &" "$full_cmd: prompt" { - -re "$gdb_prompt " { - pass $gdb_test_name - } + -re "$gdb_prompt " { + pass $gdb_test_name + } } # now check for the expected line - one per thread. for {set i 0} {$i < $nthreads} {incr i} { - gdb_test_multiple "" "$full_cmd: thread $i" { - -re "$line\[^\\\r\\\n\]*\r\n" { - pass $gdb_test_name - } - } + gdb_test_multiple "" "$full_cmd: thread $i" { + -re "$line\[^\\\r\\\n\]*\r\n" { + pass $gdb_test_name + } + } } } proc gdb_cont_to_bp_line { line threads nthreads } { gdb_cont_to $threads "continue" \ - [multi_line \ - "Breakpoint\[^\\\r\\\n\]*$line" \ - "\[^\\\r\\\n\]*" \ - ] \ - $nthreads + [multi_line \ + "Breakpoint\[^\\\r\\\n\]*$line" \ + "\[^\\\r\\\n\]*" \ + ] \ + $nthreads } proc gdb_cont_to_no_history_backward { threads cmd nthreads } { @@ -122,66 +122,66 @@ with_test_prefix "navigate" { gdb_test "thread apply 1 record goto 3" "$loop_line" gdb_test "thread apply 2 record goto 4" "$loop_line" gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 3\." "thread 1 at insn 3" + ".*Replay in progress\. At instruction 3\." "thread 1 at insn 3" gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 4\." "thread 2 at insn 4" + ".*Replay in progress\. At instruction 4\." "thread 2 at insn 4" gdb_test "thread apply all record goto 5" "$loop_line" gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 5\." "thread 1 at insn 5" + ".*Replay in progress\. At instruction 5\." "thread 1 at insn 5" gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 5\." "thread 2 at insn 5" + ".*Replay in progress\. At instruction 5\." "thread 2 at insn 5" } with_test_prefix "step" { with_test_prefix "thread 1" { - gdb_test "thread apply 1 stepi 2" "$loop_line" - gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 7\." - gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 5\." + gdb_test "thread apply 1 stepi 2" "$loop_line" + gdb_test "thread apply 1 info record" \ + ".*Replay in progress\. At instruction 7\." + gdb_test "thread apply 2 info record" \ + ".*Replay in progress\. At instruction 5\." } with_test_prefix "thread 2" { - gdb_test "thread apply 2 stepi 3" "$loop_line" - gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 7\." - gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 8\." + gdb_test "thread apply 2 stepi 3" "$loop_line" + gdb_test "thread apply 1 info record" \ + ".*Replay in progress\. At instruction 7\." + gdb_test "thread apply 2 info record" \ + ".*Replay in progress\. At instruction 8\." } with_test_prefix "all" { - gdb_cont_to all "stepi 4" "$loop_line" 2 - gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 11\." - gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 12\." + gdb_cont_to all "stepi 4" "$loop_line" 2 + gdb_test "thread apply 1 info record" \ + ".*Replay in progress\. At instruction 11\." + gdb_test "thread apply 2 info record" \ + ".*Replay in progress\. At instruction 12\." } } with_test_prefix "reverse-step" { with_test_prefix "thread 1" { - gdb_test "thread apply 1 reverse-stepi 2" "$loop_line" - gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 9\." - gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 12\." + gdb_test "thread apply 1 reverse-stepi 2" "$loop_line" + gdb_test "thread apply 1 info record" \ + ".*Replay in progress\. At instruction 9\." + gdb_test "thread apply 2 info record" \ + ".*Replay in progress\. At instruction 12\." } with_test_prefix "thread 2" { - gdb_test "thread apply 2 reverse-stepi 3" "$loop_line" - gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 9\." - gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 9\." + gdb_test "thread apply 2 reverse-stepi 3" "$loop_line" + gdb_test "thread apply 1 info record" \ + ".*Replay in progress\. At instruction 9\." + gdb_test "thread apply 2 info record" \ + ".*Replay in progress\. At instruction 9\." } with_test_prefix "all" { - gdb_cont_to all "reverse-stepi 4" "$loop_line" 2 - gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 5\." - gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 5\." + gdb_cont_to all "reverse-stepi 4" "$loop_line" 2 + gdb_test "thread apply 1 info record" \ + ".*Replay in progress\. At instruction 5\." + gdb_test "thread apply 2 info record" \ + ".*Replay in progress\. At instruction 5\." } } @@ -224,37 +224,37 @@ with_test_prefix "continue" { # a thread may only resume if no thread is still replaying with_test_prefix "no progress" { with_test_prefix "thread 1" { - gdb_test "thread apply 1 record goto end" ".*" - gdb_test "thread apply 2 record goto begin" ".*" - - gdb_cont_to_no_history_forward 1 "continue" 1 - gdb_cont_to_no_history_forward 1 "step" 1 - gdb_test "thread apply 1 info record" \ - ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" - gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 1\." + gdb_test "thread apply 1 record goto end" ".*" + gdb_test "thread apply 2 record goto begin" ".*" + + gdb_cont_to_no_history_forward 1 "continue" 1 + gdb_cont_to_no_history_forward 1 "step" 1 + gdb_test "thread apply 1 info record" \ + ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" + gdb_test "thread apply 2 info record" \ + ".*Replay in progress\. At instruction 1\." } with_test_prefix "thread 2" { - gdb_test "thread apply 1 record goto begin" ".*" - gdb_test "thread apply 2 record goto end" ".*" - - gdb_cont_to_no_history_forward 2 "continue" 1 - gdb_cont_to_no_history_forward 2 "step" 1 - gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 1\." - gdb_test "thread apply 2 info record" \ - ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" + gdb_test "thread apply 1 record goto begin" ".*" + gdb_test "thread apply 2 record goto end" ".*" + + gdb_cont_to_no_history_forward 2 "continue" 1 + gdb_cont_to_no_history_forward 2 "step" 1 + gdb_test "thread apply 1 info record" \ + ".*Replay in progress\. At instruction 1\." + gdb_test "thread apply 2 info record" \ + ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" } with_test_prefix "all" { - gdb_test "thread apply all record goto begin" ".*" + gdb_test "thread apply all record goto begin" ".*" - gdb_cont_to_no_history_forward all "continue" 2 - gdb_test "thread apply 1 info record" \ - ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" - gdb_test "thread apply 2 info record" \ - ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" + gdb_cont_to_no_history_forward all "continue" 2 + gdb_test "thread apply 1 info record" \ + ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" + gdb_test "thread apply 2 info record" \ + ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" } } diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp index 6da3fa7510d..edbf9b50325 100644 --- a/gdb/testsuite/gdb.btrace/tsx.exp +++ b/gdb/testsuite/gdb.btrace/tsx.exp @@ -59,15 +59,15 @@ set abort_3 \ set test "speculation indication" gdb_test_multiple "record instruction-history" $test { -re "$abort_1.*$gdb_prompt $" { - pass $test + pass $test } -re "$abort_2.*$gdb_prompt $" { - pass $test + pass $test } -re -wrap "$abort_3.*" { - pass $gdb_test_name + pass $gdb_test_name } -re "$begin_to_end.*$gdb_prompt $" { - pass $test + pass $test } } diff --git a/gdb/testsuite/gdb.compile/compile-cplus-namespace.cc b/gdb/testsuite/gdb.compile/compile-cplus-namespace.cc index abfd07aa686..7741d53eacd 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-namespace.cc +++ b/gdb/testsuite/gdb.compile/compile-cplus-namespace.cc @@ -21,19 +21,19 @@ namespace N1 { namespace N4 { - static int n4static = 400; - - struct S4 - { - static int s4static; - int s4int_; - S4 () : s4int_ (4) {}; - ~S4 () { --s4static; } - - int get_var () { return s4int_; } - static int get_svar () { return s4static; } - }; - int S4::s4static = 40; + static int n4static = 400; + + struct S4 + { + static int s4static; + int s4int_; + S4 () : s4int_ (4) {}; + ~S4 () { --s4static; } + + int get_var () { return s4int_; } + static int get_svar () { return s4static; } + }; + int S4::s4static = 40; } } } diff --git a/gdb/testsuite/gdb.cp/annota2.cc b/gdb/testsuite/gdb.cp/annota2.cc index 234752e49af..b0b4badd06f 100644 --- a/gdb/testsuite/gdb.cp/annota2.cc +++ b/gdb/testsuite/gdb.cp/annota2.cc @@ -25,4 +25,3 @@ int main() printf ("a.x is %d\n", a.x); return 0; } - diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp index 16344bd7474..1dc8c2dbd97 100644 --- a/gdb/testsuite/gdb.cp/annota2.exp +++ b/gdb/testsuite/gdb.cp/annota2.exp @@ -163,8 +163,8 @@ gdb_test_multiple "continue" "continue until exit" { send_gdb "delete\n" gdb_expect { -re ".*Delete all breakpoints, watchpoints, tracepoints, and catchpoints. \\(y or n\\) \r\n\032\032query.*$" { - send_gdb "y\n" - gdb_expect { + send_gdb "y\n" + gdb_expect { -re "\r\n\032\032post-query\r\n${breakpoints_invalid}$gdb_prompt$" { pass "delete bps" } -re ".*$gdb_prompt$" { fail "delete bps" } timeout { fail "delete bps (timeout)" } @@ -291,4 +291,3 @@ if {![target_info exists gdb,nointerrupts]} { # reinstall the old prompt for the rest of the testsuite. set gdb_prompt $old_gdb_prompt - diff --git a/gdb/testsuite/gdb.cp/annota3.cc b/gdb/testsuite/gdb.cp/annota3.cc index 234752e49af..b0b4badd06f 100644 --- a/gdb/testsuite/gdb.cp/annota3.cc +++ b/gdb/testsuite/gdb.cp/annota3.cc @@ -25,4 +25,3 @@ int main() printf ("a.x is %d\n", a.x); return 0; } - diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp index db3f69648a4..56bdbdd0601 100644 --- a/gdb/testsuite/gdb.cp/annota3.exp +++ b/gdb/testsuite/gdb.cp/annota3.exp @@ -119,8 +119,8 @@ gdb_expect_list "continue to exit" "$gdb_prompt$" $el send_gdb "delete\n" gdb_expect { -re ".*Delete all breakpoints, watchpoints, tracepoints, and catchpoints. \\(y or n\\) \r\n\032\032query.*$" { - send_gdb "y\n" - gdb_expect { + send_gdb "y\n" + gdb_expect { -re "\r\n\032\032post-query\r\n$gdb_prompt$" { pass "delete bps" } -re ".*$gdb_prompt$" { fail "delete bps" } timeout { fail "delete bps (timeout)" } @@ -201,4 +201,3 @@ if {![target_info exists gdb,nointerrupts]} { # reinstall the old prompt for the rest of the testsuite. set gdb_prompt $old_gdb_prompt - diff --git a/gdb/testsuite/gdb.cp/baseenum.cc b/gdb/testsuite/gdb.cp/baseenum.cc index aef8a7ec00a..a7167c7a1e7 100644 --- a/gdb/testsuite/gdb.cp/baseenum.cc +++ b/gdb/testsuite/gdb.cp/baseenum.cc @@ -77,4 +77,3 @@ int main() nc.test (N::A::X); return 0; } - diff --git a/gdb/testsuite/gdb.cp/baseenum.exp b/gdb/testsuite/gdb.cp/baseenum.exp index 0e0112245d1..7088183693f 100644 --- a/gdb/testsuite/gdb.cp/baseenum.exp +++ b/gdb/testsuite/gdb.cp/baseenum.exp @@ -32,4 +32,4 @@ gdb_test "print X" "= A::X" "print enum constant X of class A" gdb_breakpoint [gdb_get_line_number "breakpoint 2" $srcfile] gdb_continue_to_breakpoint "breakpoint 2" gdb_test "print X" "= N::A::X" \ - "Print enum constant X of class A in namespace N" + "Print enum constant X of class A in namespace N" diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp index ad637496088..64689c701e2 100644 --- a/gdb/testsuite/gdb.cp/classes.exp +++ b/gdb/testsuite/gdb.cp/classes.exp @@ -511,9 +511,9 @@ proc test_enums {} { # ptype on the enum member gdb_test_multiple "ptype obj_with_enum.priv_enum" "ptype obj_with_enum.priv_enum" { - -re "type = enum ClassWithEnum::PrivEnum (: unsigned (int|short|char) )?\{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" { + -re "type = enum ClassWithEnum::PrivEnum (: unsigned (int|short|char) )?\{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" - } + } -re "type = enum PrivEnum \{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" { # gcc 2.95.3 -gdwarf-2 # gcc 3.3.2 -gdwarf-2 diff --git a/gdb/testsuite/gdb.cp/cplabel.cc b/gdb/testsuite/gdb.cp/cplabel.cc index b21bb202350..ae06036429a 100644 --- a/gdb/testsuite/gdb.cp/cplabel.cc +++ b/gdb/testsuite/gdb.cp/cplabel.cc @@ -77,4 +77,3 @@ main (void) foo f; return f.baz (foo::bar () + 3); } - diff --git a/gdb/testsuite/gdb.cp/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp index d1b4ecb4de2..c0f2c111d3b 100644 --- a/gdb/testsuite/gdb.cp/cplusfuncs.exp +++ b/gdb/testsuite/gdb.cp/cplusfuncs.exp @@ -401,7 +401,7 @@ proc test_lookup_operator_functions {} { info_func "operator>>=(" "void foo::operator>>=($dm_type_foo_ref);" info_func "operator|=(" "void foo::operator|=($dm_type_foo_ref);" info_func "operator$dm_operator_comma\(" \ - "void foo::operator$dm_operator_comma\($dm_type_foo_ref);" + "void foo::operator$dm_operator_comma\($dm_type_foo_ref);" info_func "operator/(" "void foo::operator/($dm_type_foo_ref);" info_func "operator+(" "void foo::operator+($dm_type_foo_ref);" info_func "operator<<(" "void foo::operator<<($dm_type_foo_ref);" diff --git a/gdb/testsuite/gdb.cp/derivation.cc b/gdb/testsuite/gdb.cp/derivation.cc index b2746d17d51..9be1049bcee 100644 --- a/gdb/testsuite/gdb.cp/derivation.cc +++ b/gdb/testsuite/gdb.cp/derivation.cc @@ -25,7 +25,7 @@ namespace N { int i = 3; while (i > 0) - --i; + --i; } }; } @@ -38,8 +38,8 @@ public: A() { - a=1; - aa=2; + a=1; + aa=2; } value_type afoo(); value_type foo(); @@ -54,8 +54,8 @@ public: B() { - b=3; - bb=4; + b=3; + bb=4; } A::value_type bfoo(); A::value_type foo(); @@ -71,8 +71,8 @@ public: C() { - c=5; - cc=6; + c=5; + cc=6; } int cfoo(); int foo(); @@ -88,8 +88,8 @@ public: D() { - d =7; - dd=8; + d =7; + dd=8; } value_type dfoo(); value_type foo(); @@ -104,8 +104,8 @@ public: E() { - e =9; - ee=10; + e =9; + ee=10; } value_type efoo(); value_type foo(); @@ -120,8 +120,8 @@ public: F() { - f =11; - ff=12; + f =11; + ff=12; } value_type ffoo(); value_type foo(); @@ -138,11 +138,11 @@ public: G() { - g =13; - gg =14; - a=15; - b=16; - c=17; + g =13; + gg =14; + a=15; + b=16; + c=17; } int gfoo(); diff --git a/gdb/testsuite/gdb.cp/derivation.exp b/gdb/testsuite/gdb.cp/derivation.exp index bb3dccea774..8a0a331ffed 100644 --- a/gdb/testsuite/gdb.cp/derivation.exp +++ b/gdb/testsuite/gdb.cp/derivation.exp @@ -208,13 +208,13 @@ gdb_test "print g_instance.afoo()" "\\$\[0-9\]+ = 1" "print value of g_instance. gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" { -re "#0 marker1.*$gdb_prompt $" { - setup_kfail "gdb/1155" s390-*-linux-gnu - fail "re-selected 'main' frame after inferior call" - gdb_test "finish" ".*main.*at .*derivation.cc:.*// marker1-returns-here.*" \ - "finish call to marker1" + setup_kfail "gdb/1155" s390-*-linux-gnu + fail "re-selected 'main' frame after inferior call" + gdb_test "finish" ".*main.*at .*derivation.cc:.*// marker1-returns-here.*" \ + "finish call to marker1" } -re "#1 ($hex in )?main.*$gdb_prompt $" { - pass "re-selected 'main' frame after inferior call" + pass "re-selected 'main' frame after inferior call" } } diff --git a/gdb/testsuite/gdb.cp/derivation2.cc b/gdb/testsuite/gdb.cp/derivation2.cc index 233580a3407..0fdbac3974c 100644 --- a/gdb/testsuite/gdb.cp/derivation2.cc +++ b/gdb/testsuite/gdb.cp/derivation2.cc @@ -25,7 +25,7 @@ public: A2() { - a=1; + a=1; } }; @@ -35,7 +35,7 @@ public: D2() { - d=7; + d=7; } }; diff --git a/gdb/testsuite/gdb.cp/dispcxx.cc b/gdb/testsuite/gdb.cp/dispcxx.cc index 07b5dfbf139..018e9e7916a 100644 --- a/gdb/testsuite/gdb.cp/dispcxx.cc +++ b/gdb/testsuite/gdb.cp/dispcxx.cc @@ -35,4 +35,3 @@ int main() { k.method(); return k.m2(); } - diff --git a/gdb/testsuite/gdb.cp/formatted-ref.exp b/gdb/testsuite/gdb.cp/formatted-ref.exp index bf0aae3861b..1aaf9725a5c 100644 --- a/gdb/testsuite/gdb.cp/formatted-ref.exp +++ b/gdb/testsuite/gdb.cp/formatted-ref.exp @@ -42,12 +42,12 @@ proc get_address { var } { gdb_test_multiple "print &$var" "find address of $var" { -re "\\$\[0-9\]+ = \\(.*\\) (0x\[0-9a-f\]+).*$gdb_prompt $" { - return $expect_out(1,string) - } - timeout { + return $expect_out(1,string) + } + timeout { perror "couldn't find address of $var" return "" - } + } } return "" } @@ -57,15 +57,15 @@ proc test_p_x { var type val addr } { set test "print/x $var" gdb_test_multiple $test $test { - -re "\\$\[0-9\]+ = \\([string_to_regexp $type]\\) @0x\[a-f0-9\]+: [string_to_regexp $val].*$gdb_prompt $" { + -re "\\$\[0-9\]+ = \\([string_to_regexp $type]\\) @0x\[a-f0-9\]+: [string_to_regexp $val].*$gdb_prompt $" { pass $test } -re "\\$\[0-9\]+ = $addr.*$gdb_prompt $" { - fail "$test (prints just address)" - } + fail "$test (prints just address)" + } -re "\\$\[0-9\]+ = 0x\[a-f0-9\]+.*$gdb_prompt $" { - fail "$test (prints unexpected address)" - } + fail "$test (prints unexpected address)" + } } return 0 } @@ -75,12 +75,12 @@ proc test_p_x_addr { var addr } { set test "print/x &$var" gdb_test_multiple $test $test { - -re "\\$\[0-9\]+ = $addr.*$gdb_prompt $" { + -re "\\$\[0-9\]+ = $addr.*$gdb_prompt $" { pass $test } -re "\\$\[0-9\]+ = 0x\[a-f0-9+\]+.*$gdb_prompt $" { - fail "$test (prints unexpected address)" - } + fail "$test (prints unexpected address)" + } } return 0 } @@ -90,7 +90,7 @@ proc test_p_x_ref_addr { var addr } { set test "print/x *(&(&$var))" gdb_test_multiple $test $test { - -re "\\$\[0-9\]+ = $addr.*$gdb_prompt $" { + -re "\\$\[0-9\]+ = $addr.*$gdb_prompt $" { pass $test } -re "Attempt to take address of value not located in memory.*$gdb_prompt $" { @@ -99,8 +99,8 @@ proc test_p_x_ref_addr { var addr } { pass $test } -re "\\$\[0-9\]+ = 0x\[a-f0-9+\]+.*$gdb_prompt $" { - fail "$test (prints unexpected address)" - } + fail "$test (prints unexpected address)" + } } return 0 } diff --git a/gdb/testsuite/gdb.cp/gdb2384.exp b/gdb/testsuite/gdb.cp/gdb2384.exp index a53ec3a8ccc..4f4f7c89132 100644 --- a/gdb/testsuite/gdb.cp/gdb2384.exp +++ b/gdb/testsuite/gdb.cp/gdb2384.exp @@ -73,4 +73,3 @@ gdb_continue_to_breakpoint "run to 'Second breakpoint', second time" gdb_test "print d2.meth ()" \ ".*24.*" \ "gdb2384 at 'Second breakpoint'" - diff --git a/gdb/testsuite/gdb.cp/koenig.cc b/gdb/testsuite/gdb.cp/koenig.cc index 49feeab0269..d2d89ed5bf9 100644 --- a/gdb/testsuite/gdb.cp/koenig.cc +++ b/gdb/testsuite/gdb.cp/koenig.cc @@ -193,17 +193,17 @@ namespace P { public: int operator== (int) { - return 24; + return 24; } int operator== (float) { - return 25; + return 25; } int operator+ (float) { - return 26; + return 26; } }; @@ -322,7 +322,7 @@ main () r.rfoo(); return first (0, c) + foo (eo) + - foo (eo, eo) + foo (eo, eo, 1) + - foo (fo, eo) + foo (1 ,fo, eo) + - foo (go, fo, eo); + foo (eo, eo) + foo (eo, eo, 1) + + foo (fo, eo) + foo (1 ,fo, eo) + + foo (go, fo, eo); } diff --git a/gdb/testsuite/gdb.cp/local.cc b/gdb/testsuite/gdb.cp/local.cc index 35a04b981fd..183d47cdf37 100644 --- a/gdb/testsuite/gdb.cp/local.cc +++ b/gdb/testsuite/gdb.cp/local.cc @@ -51,7 +51,7 @@ int main() int nil; int nil_foo (int i) { - return i * 27; + return i * 27; } }; NestedInnerLocal nest1; diff --git a/gdb/testsuite/gdb.cp/local.exp b/gdb/testsuite/gdb.cp/local.exp index 7c13de01243..96e736906cc 100644 --- a/gdb/testsuite/gdb.cp/local.exp +++ b/gdb/testsuite/gdb.cp/local.exp @@ -160,18 +160,18 @@ gdb_test "up" ".*main.*" "up from marker2" set eol "\[\t \]*\r\n\[\t \]*" gdb_test_multiple "ptype Local" "local out of scope" { -re "No symbol \"Local\" in current context.*${gdb_prompt} $" { - pass "local out of scope" + pass "local out of scope" } -re "ptype Local${eol}type = class Local {${eol} public:${eol} int loc1;${eol}.*${eol} char loc_foo\\(char\\);${eol}}${eol}${gdb_prompt} " { - # GCC emits STABS debugging information in a way that doesn't - # properly preserve the scoping of local classes. I think - # we'd need to start using Sun's extensions to stabs to get - # this right. - kfail gdb/825 "Local out of scope" + # GCC emits STABS debugging information in a way that doesn't + # properly preserve the scoping of local classes. I think + # we'd need to start using Sun's extensions to stabs to get + # this right. + kfail gdb/825 "Local out of scope" } -re "ptype Local${eol}type = class Local {${eol} public:${eol} int loc1;${eol} char loc_foo\\(char\\);${eol}.*${eol}}${eol}${gdb_prompt} " { # gcc 3.X abi-2 -gstabs+ - kfail gdb/825 "Local out of scope" + kfail gdb/825 "Local out of scope" } } diff --git a/gdb/testsuite/gdb.cp/m-static.h b/gdb/testsuite/gdb.cp/m-static.h index 29924638112..e9c577c72ae 100644 --- a/gdb/testsuite/gdb.cp/m-static.h +++ b/gdb/testsuite/gdb.cp/m-static.h @@ -14,4 +14,3 @@ class gnu_obj_4 // try to ensure test4 is actually allocated int dummy; }; - diff --git a/gdb/testsuite/gdb.cp/maint.exp b/gdb/testsuite/gdb.cp/maint.exp index 68576d55e4d..5b4fb449c68 100644 --- a/gdb/testsuite/gdb.cp/maint.exp +++ b/gdb/testsuite/gdb.cp/maint.exp @@ -25,11 +25,11 @@ proc test_help {} { set namespace_help "Deprecated placeholder for removed functionality\\." test_prefix_command_help {"maintenance cplus"} { - "C\\+\\+ maintenance commands\.\[\r\n\]+" + "C\\+\\+ maintenance commands\.\[\r\n\]+" } test_prefix_command_help {"maint cp" "maintenance cplus"} { - "C\\+\\+ maintenance commands.\r\n\r\n" + "C\\+\\+ maintenance commands.\r\n\r\n" } set multiple_help_body "List of \"maintenance cplus\" subcommands:.*Command name abbreviations are allowed if unambiguous." diff --git a/gdb/testsuite/gdb.cp/many-args.cc b/gdb/testsuite/gdb.cp/many-args.cc index bf249acde26..6885fadccb7 100644 --- a/gdb/testsuite/gdb.cp/many-args.cc +++ b/gdb/testsuite/gdb.cp/many-args.cc @@ -30,7 +30,7 @@ struct ss { return (memcmp (&this->static_field, &rhs.static_field, sizeof (this->static_field)) == 0 - && this->aa == rhs.aa); + && this->aa == rhs.aa); } }; @@ -40,25 +40,25 @@ ss ref_val = { 'a' }; bool check_val (ss v1, ss v2, ss v3, ss v4, ss v5, ss v6, ss v7, ss v8, - ss v9, ss v10, ss v11, ss v12, ss v13, ss v14, ss v15, - ss v16, ss v17, ss v18, ss v19, ss v20, ss v21, ss v22, - ss v23, ss v24, ss v25, ss v26, ss v27, ss v28, ss v29, - ss v30, ss v31, ss v32, ss v33, ss v34, ss v35, ss v36, - ss v37, ss v38, ss v39, ss v40) + ss v9, ss v10, ss v11, ss v12, ss v13, ss v14, ss v15, + ss v16, ss v17, ss v18, ss v19, ss v20, ss v21, ss v22, + ss v23, ss v24, ss v25, ss v26, ss v27, ss v28, ss v29, + ss v30, ss v31, ss v32, ss v33, ss v34, ss v35, ss v36, + ss v37, ss v38, ss v39, ss v40) { return (v1 == ref_val && v2 == ref_val && v3 == ref_val && v4 == ref_val - && v5 == ref_val && v6 == ref_val && v7 == ref_val - && v8 == ref_val && v9 == ref_val && v10 == ref_val - && v11 == ref_val && v12 == ref_val && v13 == ref_val - && v14 == ref_val && v15 == ref_val && v16 == ref_val - && v17 == ref_val && v18 == ref_val && v19 == ref_val - && v20 == ref_val && v21 == ref_val && v22 == ref_val - && v23 == ref_val && v24 == ref_val && v25 == ref_val - && v26 == ref_val && v27 == ref_val && v28 == ref_val - && v29 == ref_val && v30 == ref_val && v31 == ref_val - && v32 == ref_val && v33 == ref_val && v34 == ref_val - && v35 == ref_val && v36 == ref_val && v37 == ref_val - && v38 == ref_val && v39 == ref_val && v40 == ref_val); + && v5 == ref_val && v6 == ref_val && v7 == ref_val + && v8 == ref_val && v9 == ref_val && v10 == ref_val + && v11 == ref_val && v12 == ref_val && v13 == ref_val + && v14 == ref_val && v15 == ref_val && v16 == ref_val + && v17 == ref_val && v18 == ref_val && v19 == ref_val + && v20 == ref_val && v21 == ref_val && v22 == ref_val + && v23 == ref_val && v24 == ref_val && v25 == ref_val + && v26 == ref_val && v27 == ref_val && v28 == ref_val + && v29 == ref_val && v30 == ref_val && v31 == ref_val + && v32 == ref_val && v33 == ref_val && v34 == ref_val + && v35 == ref_val && v36 == ref_val && v37 == ref_val + && v38 == ref_val && v39 == ref_val && v40 == ref_val); } int diff --git a/gdb/testsuite/gdb.cp/mb-ctor.exp b/gdb/testsuite/gdb.cp/mb-ctor.exp index db1da6947ec..38971d58976 100644 --- a/gdb/testsuite/gdb.cp/mb-ctor.exp +++ b/gdb/testsuite/gdb.cp/mb-ctor.exp @@ -101,6 +101,3 @@ if {$using_clang} { gdb_test "continue" \ ".*exited normally.*" \ "run to exit" - - - diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp index b067cb073c1..a10993a42c6 100644 --- a/gdb/testsuite/gdb.cp/mb-templates.exp +++ b/gdb/testsuite/gdb.cp/mb-templates.exp @@ -53,7 +53,7 @@ gdb_test "continue" \ delete_breakpoints gdb_test "kill" "" "kill" \ - {Kill the program being debugged\? \(y or n\) } "y" + {Kill the program being debugged\? \(y or n\) } "y" gdb_test "break $srcfile:$bp_location" \ "Breakpoint.*at.*: $srcfile:$bp_location. \\(2 locations\\).*" \ diff --git a/gdb/testsuite/gdb.cp/method.cc b/gdb/testsuite/gdb.cp/method.cc index 9fea5fbf1d0..60a25b72a96 100644 --- a/gdb/testsuite/gdb.cp/method.cc +++ b/gdb/testsuite/gdb.cp/method.cc @@ -75,6 +75,3 @@ int main() f.getFunky(1, 2); return 0; } - - - diff --git a/gdb/testsuite/gdb.cp/method.exp b/gdb/testsuite/gdb.cp/method.exp index 410647a6f41..d7a0d347cee 100644 --- a/gdb/testsuite/gdb.cp/method.exp +++ b/gdb/testsuite/gdb.cp/method.exp @@ -160,4 +160,3 @@ gdb_test_multiple "cont" "finish program" { pass "finish program (exit wrapper)" } } - diff --git a/gdb/testsuite/gdb.cp/method2.exp b/gdb/testsuite/gdb.cp/method2.exp index 71cf0f01c89..e3db8f1ca04 100644 --- a/gdb/testsuite/gdb.cp/method2.exp +++ b/gdb/testsuite/gdb.cp/method2.exp @@ -41,17 +41,17 @@ proc test_break { lang } { set ovlds [lsort {"" "int" "A*"}] set items {"cancel" "all"} foreach ovld $ovlds { - lappend items "A::method($ovld)" + lappend items "A::method($ovld)" } set menu_items {} set idx 0 foreach item $items { - lappend menu_items ".$idx. .*[string_to_regexp $item]" - incr idx + lappend menu_items ".$idx. .*[string_to_regexp $item]" + incr idx } set expect [join $menu_items {.*[\r\n]*}] gdb_test_multiple "break A::method" "breaking in method, $lang" { - -re $expect { + -re $expect { gdb_test "0" \ "canceled" \ $gdb_test_name diff --git a/gdb/testsuite/gdb.cp/namespace-enum.exp b/gdb/testsuite/gdb.cp/namespace-enum.exp index 575ad3a5618..6db4498e844 100644 --- a/gdb/testsuite/gdb.cp/namespace-enum.exp +++ b/gdb/testsuite/gdb.cp/namespace-enum.exp @@ -23,4 +23,3 @@ if {[prepare_for_testing "failed to prepare" $testfile \ gdb_test "print foo::B::B_B" "`foo::B' is not defined as an aggregate type." gdb_test "print foo::B_B" "foo::B_B" gdb_test "print A_A" "A_A" - diff --git a/gdb/testsuite/gdb.cp/nested-types.cc b/gdb/testsuite/gdb.cp/nested-types.cc index 9db0deeefdd..0cd55b28b9f 100644 --- a/gdb/testsuite/gdb.cp/nested-types.cc +++ b/gdb/testsuite/gdb.cp/nested-types.cc @@ -43,8 +43,8 @@ struct S10 { struct S12 { enum E12 {A12, B12, C12}; union U12 { - int a; - char c; + int a; + char c; }; int i12; @@ -52,88 +52,88 @@ struct S10 { U12 u12; struct S13 { - enum E13 {A13, B13, C13}; - union U13 { - int a; - char c; - }; - - int i13; - E13 e13; - U13 u13; - - struct S14 { - enum E14 {A14, B14, C14}; - union U14 { - int a; - char c; - }; - - int i14; - E14 e14; - U14 u14; - - struct S15 { - enum E15 {A15, B15, C15}; - union U15 { - int a; - char c; - }; - - int i15; - E15 e15; - U15 u15; - - struct S16 { - enum E16 {A16, B16, C16}; - union U16 { - int a; - char c; - }; - - int i16; - E16 e16; - U16 u16; - - struct S17 { - enum E17 {A17, B17, C17}; - union U17 { - int a; - char c; - }; - - int i17; - E17 e17; - U17 u17; - - struct S18 { - enum E18 {A18, B18, C18}; - union U18 { - int a; - char c; - }; - - int i18; - E18 e18; - U18 u18; - - struct S19 { - enum E19 {A19, B19, C19}; - union U19 { - int a; - char c; - }; - - int i19; - E19 e19; - U19 u19; - - }; - }; - }; - }; - }; - }; + enum E13 {A13, B13, C13}; + union U13 { + int a; + char c; + }; + + int i13; + E13 e13; + U13 u13; + + struct S14 { + enum E14 {A14, B14, C14}; + union U14 { + int a; + char c; + }; + + int i14; + E14 e14; + U14 u14; + + struct S15 { + enum E15 {A15, B15, C15}; + union U15 { + int a; + char c; + }; + + int i15; + E15 e15; + U15 u15; + + struct S16 { + enum E16 {A16, B16, C16}; + union U16 { + int a; + char c; + }; + + int i16; + E16 e16; + U16 u16; + + struct S17 { + enum E17 {A17, B17, C17}; + union U17 { + int a; + char c; + }; + + int i17; + E17 e17; + U17 u17; + + struct S18 { + enum E18 {A18, B18, C18}; + union U18 { + int a; + char c; + }; + + int i18; + E18 e18; + U18 u18; + + struct S19 { + enum E19 {A19, B19, C19}; + union U19 { + int a; + char c; + }; + + int i19; + E19 e19; + U19 u19; + + }; + }; + }; + }; + }; + }; }; }; }; @@ -151,8 +151,8 @@ struct S10 { struct S22 { enum E22 {A22, B22, C22}; union U22 { - int a; - char c; + int a; + char c; }; int i22; @@ -160,88 +160,88 @@ struct S10 { U22 u22; struct S23 { - enum E23 {A23, B23, C23}; - union U23 { - int a; - char c; - }; - - int i23; - E23 e23; - U23 u23; - - struct S24 { - enum E24 {A24, B24, C24}; - union U24 { - int a; - char c; - }; - - int i24; - E24 e24; - U24 u24; - - struct S25 { - enum E25 {A25, B25, C25}; - union U25 { - int a; - char c; - }; - - int i25; - E25 e25; - U25 u25; - - struct S26 { - enum E26 {A26, B26, C26}; - union U26 { - int a; - char c; - }; - - int i26; - E26 e26; - U26 u26; - - struct S27 { - enum E27 {A27, B27, C27}; - union U27 { - int a; - char c; - }; - - int i27; - E27 e27; - U27 u27; - - struct S28 { - enum E28 {A28, B28, C28}; - union U28 { - int a; - char c; - }; - - int i28; - E28 e28; - U28 u28; - - struct S29 { - enum E29 {A29, B29, C29}; - union U29 { - int a; - char c; - }; - - int i29; - E29 e29; - U29 u29; - - }; - }; - }; - }; - }; - }; + enum E23 {A23, B23, C23}; + union U23 { + int a; + char c; + }; + + int i23; + E23 e23; + U23 u23; + + struct S24 { + enum E24 {A24, B24, C24}; + union U24 { + int a; + char c; + }; + + int i24; + E24 e24; + U24 u24; + + struct S25 { + enum E25 {A25, B25, C25}; + union U25 { + int a; + char c; + }; + + int i25; + E25 e25; + U25 u25; + + struct S26 { + enum E26 {A26, B26, C26}; + union U26 { + int a; + char c; + }; + + int i26; + E26 e26; + U26 u26; + + struct S27 { + enum E27 {A27, B27, C27}; + union U27 { + int a; + char c; + }; + + int i27; + E27 e27; + U27 u27; + + struct S28 { + enum E28 {A28, B28, C28}; + union U28 { + int a; + char c; + }; + + int i28; + E28 e28; + U28 u28; + + struct S29 { + enum E29 {A29, B29, C29}; + union U29 { + int a; + char c; + }; + + int i29; + E29 e29; + U29 u29; + + }; + }; + }; + }; + }; + }; }; }; }; @@ -259,8 +259,8 @@ struct S10 { struct S32 { enum E32 {A32, B32, C32}; union U32 { - int a; - char c; + int a; + char c; }; int i32; @@ -268,88 +268,88 @@ struct S10 { U32 u32; struct S33 { - enum E33 {A33, B33, C33}; - union U33 { - int a; - char c; - }; - - int i33; - E33 e33; - U33 u33; - - struct S34 { - enum E34 {A34, B34, C34}; - union U34 { - int a; - char c; - }; - - int i34; - E34 e34; - U34 u34; - - struct S35 { - enum E35 {A35, B35, C35}; - union U35 { - int a; - char c; - }; - - int i35; - E35 e35; - U35 u35; - - struct S36 { - enum E36 {A36, B36, C36}; - union U36 { - int a; - char c; - }; - - int i36; - E36 e36; - U36 u36; - - struct S37 { - enum E37 {A37, B37, C37}; - union U37 { - int a; - char c; - }; - - int i37; - E37 e37; - U37 u37; - - struct S38 { - enum E38 {A38, B38, C38}; - union U38 { - int a; - char c; - }; - - int i38; - E38 e38; - U38 u38; - - struct S39 { - enum E39 {A39, B39, C39}; - union U39 { - int a; - char c; - }; - - int i39; - E39 e39; - U39 u39; - - }; - }; - }; - }; - }; - }; + enum E33 {A33, B33, C33}; + union U33 { + int a; + char c; + }; + + int i33; + E33 e33; + U33 u33; + + struct S34 { + enum E34 {A34, B34, C34}; + union U34 { + int a; + char c; + }; + + int i34; + E34 e34; + U34 u34; + + struct S35 { + enum E35 {A35, B35, C35}; + union U35 { + int a; + char c; + }; + + int i35; + E35 e35; + U35 u35; + + struct S36 { + enum E36 {A36, B36, C36}; + union U36 { + int a; + char c; + }; + + int i36; + E36 e36; + U36 u36; + + struct S37 { + enum E37 {A37, B37, C37}; + union U37 { + int a; + char c; + }; + + int i37; + E37 e37; + U37 u37; + + struct S38 { + enum E38 {A38, B38, C38}; + union U38 { + int a; + char c; + }; + + int i38; + E38 e38; + U38 u38; + + struct S39 { + enum E39 {A39, B39, C39}; + union U39 { + int a; + char c; + }; + + int i39; + E39 e39; + U39 u39; + + }; + }; + }; + }; + }; + }; }; }; }; @@ -367,8 +367,8 @@ struct S10 { struct S42 { enum E42 {A42, B42, C42}; union U42 { - int a; - char c; + int a; + char c; }; int i42; @@ -376,88 +376,88 @@ struct S10 { U42 u42; struct S43 { - enum E43 {A43, B43, C43}; - union U43 { - int a; - char c; - }; - - int i43; - E43 e43; - U43 u43; - - struct S44 { - enum E44 {A44, B44, C44}; - union U44 { - int a; - char c; - }; - - int i44; - E44 e44; - U44 u44; - - struct S45 { - enum E45 {A45, B45, C45}; - union U45 { - int a; - char c; - }; - - int i45; - E45 e45; - U45 u45; - - struct S46 { - enum E46 {A46, B46, C46}; - union U46 { - int a; - char c; - }; - - int i46; - E46 e46; - U46 u46; - - struct S47 { - enum E47 {A47, B47, C47}; - union U47 { - int a; - char c; - }; - - int i47; - E47 e47; - U47 u47; - - struct S48 { - enum E48 {A48, B48, C48}; - union U48 { - int a; - char c; - }; - - int i48; - E48 e48; - U48 u48; - - struct S49 { - enum E49 {A49, B49, C49}; - union U49 { - int a; - char c; - }; - - int i49; - E49 e49; - U49 u49; - - }; - }; - }; - }; - }; - }; + enum E43 {A43, B43, C43}; + union U43 { + int a; + char c; + }; + + int i43; + E43 e43; + U43 u43; + + struct S44 { + enum E44 {A44, B44, C44}; + union U44 { + int a; + char c; + }; + + int i44; + E44 e44; + U44 u44; + + struct S45 { + enum E45 {A45, B45, C45}; + union U45 { + int a; + char c; + }; + + int i45; + E45 e45; + U45 u45; + + struct S46 { + enum E46 {A46, B46, C46}; + union U46 { + int a; + char c; + }; + + int i46; + E46 e46; + U46 u46; + + struct S47 { + enum E47 {A47, B47, C47}; + union U47 { + int a; + char c; + }; + + int i47; + E47 e47; + U47 u47; + + struct S48 { + enum E48 {A48, B48, C48}; + union U48 { + int a; + char c; + }; + + int i48; + E48 e48; + U48 u48; + + struct S49 { + enum E49 {A49, B49, C49}; + union U49 { + int a; + char c; + }; + + int i49; + E49 e49; + U49 u49; + + }; + }; + }; + }; + }; + }; }; }; }; @@ -475,8 +475,8 @@ struct S10 { struct S52 { enum E52 {A52, B52, C52}; union U52 { - int a; - char c; + int a; + char c; }; int i52; @@ -484,88 +484,88 @@ struct S10 { U52 u52; struct S53 { - enum E53 {A53, B53, C53}; - union U53 { - int a; - char c; - }; - - int i53; - E53 e53; - U53 u53; - - struct S54 { - enum E54 {A54, B54, C54}; - union U54 { - int a; - char c; - }; - - int i54; - E54 e54; - U54 u54; - - struct S55 { - enum E55 {A55, B55, C55}; - union U55 { - int a; - char c; - }; - - int i55; - E55 e55; - U55 u55; - - struct S56 { - enum E56 {A56, B56, C56}; - union U56 { - int a; - char c; - }; - - int i56; - E56 e56; - U56 u56; - - struct S57 { - enum E57 {A57, B57, C57}; - union U57 { - int a; - char c; - }; - - int i57; - E57 e57; - U57 u57; - - struct S58 { - enum E58 {A58, B58, C58}; - union U58 { - int a; - char c; - }; - - int i58; - E58 e58; - U58 u58; - - struct S59 { - enum E59 {A59, B59, C59}; - union U59 { - int a; - char c; - }; - - int i59; - E59 e59; - U59 u59; - - }; - }; - }; - }; - }; - }; + enum E53 {A53, B53, C53}; + union U53 { + int a; + char c; + }; + + int i53; + E53 e53; + U53 u53; + + struct S54 { + enum E54 {A54, B54, C54}; + union U54 { + int a; + char c; + }; + + int i54; + E54 e54; + U54 u54; + + struct S55 { + enum E55 {A55, B55, C55}; + union U55 { + int a; + char c; + }; + + int i55; + E55 e55; + U55 u55; + + struct S56 { + enum E56 {A56, B56, C56}; + union U56 { + int a; + char c; + }; + + int i56; + E56 e56; + U56 u56; + + struct S57 { + enum E57 {A57, B57, C57}; + union U57 { + int a; + char c; + }; + + int i57; + E57 e57; + U57 u57; + + struct S58 { + enum E58 {A58, B58, C58}; + union U58 { + int a; + char c; + }; + + int i58; + E58 e58; + U58 u58; + + struct S59 { + enum E59 {A59, B59, C59}; + union U59 { + int a; + char c; + }; + + int i59; + E59 e59; + U59 u59; + + }; + }; + }; + }; + }; + }; }; }; }; diff --git a/gdb/testsuite/gdb.cp/nsalias.cc b/gdb/testsuite/gdb.cp/nsalias.cc index c1ed9bfebff..e9a25fcaf65 100644 --- a/gdb/testsuite/gdb.cp/nsalias.cc +++ b/gdb/testsuite/gdb.cp/nsalias.cc @@ -20,4 +20,3 @@ main () { return 0; } - diff --git a/gdb/testsuite/gdb.cp/nsnoimports.cc b/gdb/testsuite/gdb.cp/nsnoimports.cc index e3ea8744fd7..e80c83ccb11 100644 --- a/gdb/testsuite/gdb.cp/nsnoimports.cc +++ b/gdb/testsuite/gdb.cp/nsnoimports.cc @@ -12,7 +12,7 @@ namespace A int abc = 33; int second(){ - return 0; + return 0; } } diff --git a/gdb/testsuite/gdb.cp/nsnoimports.exp b/gdb/testsuite/gdb.cp/nsnoimports.exp index 39a3480ef57..152da404561 100644 --- a/gdb/testsuite/gdb.cp/nsnoimports.exp +++ b/gdb/testsuite/gdb.cp/nsnoimports.exp @@ -63,4 +63,3 @@ with_test_prefix "A::B::C::second scope" { gdb_test "print ab" "= 22" gdb_test "print abc" "= 33" } - diff --git a/gdb/testsuite/gdb.cp/nsusing.cc b/gdb/testsuite/gdb.cp/nsusing.cc index dcf0ba99e22..ec98b3166c6 100644 --- a/gdb/testsuite/gdb.cp/nsusing.cc +++ b/gdb/testsuite/gdb.cp/nsusing.cc @@ -120,14 +120,14 @@ int marker1 () int total = 0; { int b = 1; - { - using namespace A; - int c = 2; - { - int d = 3; - total = _a + b + c + d + marker2 (); // marker1 stop - } - } + { + using namespace A; + int c = 2; + { + int d = 3; + total = _a + b + c + d + marker2 (); // marker1 stop + } + } } return marker2 () + total; } diff --git a/gdb/testsuite/gdb.cp/oranking.cc b/gdb/testsuite/gdb.cp/oranking.cc index c3f185b810a..d9b31f1dd5c 100644 --- a/gdb/testsuite/gdb.cp/oranking.cc +++ b/gdb/testsuite/gdb.cp/oranking.cc @@ -113,7 +113,7 @@ int test10 () { // - S1 is a subsequence of S2 int foo101 (volatile const char*) { return 217; } // array-to-pointer conversion - // plus qualification conversion + // plus qualification conversion int foo101 ( const char*) { return 218; } // array-to-pointer conversion int test101 () { @@ -136,7 +136,7 @@ int test11 () { Function F1 is better than function F2 if: */ // - F1 is a non-template function and F2 is a template function template int foo12(T) { return 41; } - int foo12(int) { return 42; } + int foo12(int) { return 42; } int test12 (){ return foo12(1); //42 } diff --git a/gdb/testsuite/gdb.cp/overload.cc b/gdb/testsuite/gdb.cp/overload.cc index 3fe2011b9b7..f403e8b3a89 100644 --- a/gdb/testsuite/gdb.cp/overload.cc +++ b/gdb/testsuite/gdb.cp/overload.cc @@ -41,9 +41,9 @@ int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7); int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8); int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9); int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9, int a10); + int a8, int a9, int a10); int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9, int a10, int a11); + int a8, int a9, int a10, int a11); }; @@ -221,26 +221,26 @@ int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7) return 7;} int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8) + int a8) { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = 0; return 8;} int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9) + int a8, int a9) { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = 0; return 9; } int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9, int a10) - { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = - a10 = 0; return 10;} + int a8, int a9, int a10) + { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = + a10 = 0; return 10;} int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9, int a10, int a11) - { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = - a10 = a11 = 0; return 11;} + int a8, int a9, int a10, int a11) + { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = + a10 = a11 = 0; return 11;} diff --git a/gdb/testsuite/gdb.cp/overload.exp b/gdb/testsuite/gdb.cp/overload.exp index aa1daa496fb..a1c6cc0e809 100644 --- a/gdb/testsuite/gdb.cp/overload.exp +++ b/gdb/testsuite/gdb.cp/overload.exp @@ -144,13 +144,13 @@ gdb_test "print foo_instance1.overloadfnarg(23, intintfunc)" " = 23" gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" { -re "#0 marker1.*$gdb_prompt $" { - setup_kfail "gdb/1155" s390-*-linux-gnu - fail "re-selected 'main' frame after inferior call" - gdb_test "finish" ".*main.*at .*overload.cc:.*// marker1-returns-here.*" \ - "finish call to marker1" + setup_kfail "gdb/1155" s390-*-linux-gnu + fail "re-selected 'main' frame after inferior call" + gdb_test "finish" ".*main.*at .*overload.cc:.*// marker1-returns-here.*" \ + "finish call to marker1" } -re "#1 ($hex in )?main.*$gdb_prompt $" { - pass "re-selected 'main' frame after inferior call" + pass "re-selected 'main' frame after inferior call" } } diff --git a/gdb/testsuite/gdb.cp/ovldbreak.cc b/gdb/testsuite/gdb.cp/ovldbreak.cc index adbaa16d239..b8020f44546 100644 --- a/gdb/testsuite/gdb.cp/ovldbreak.cc +++ b/gdb/testsuite/gdb.cp/ovldbreak.cc @@ -34,9 +34,9 @@ int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7); int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8); int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9); int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9, int a10); + int a8, int a9, int a10); int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9, int a10, int a11); + int a8, int a9, int a10, int a11); }; @@ -171,26 +171,26 @@ int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7) return 7;} int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8) + int a8) { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = 0; return 8;} int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9) + int a8, int a9) { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = 0; return 9; } int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9, int a10) - { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = - a10 = 0; return 10;} + int a8, int a9, int a10) + { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = + a10 = 0; return 10;} int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, - int a8, int a9, int a10, int a11) - { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = - a10 = a11 = 0; return 11;} + int a8, int a9, int a10, int a11) + { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = + a10 = a11 = 0; return 11;} void foo::foofunc (int a) @@ -200,4 +200,3 @@ void foo::foofunc (int a) void foo::foofunc (int b, signed char *c) { } - diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp index 9b8c6d19fa8..9165ca7f355 100644 --- a/gdb/testsuite/gdb.cp/ovldbreak.exp +++ b/gdb/testsuite/gdb.cp/ovldbreak.exp @@ -55,8 +55,8 @@ if {![runto_main]} { proc take_gdb_out_of_choice_menu {} { global gdb_prompt gdb_test_multiple " " " " { - -re ".*$gdb_prompt $" { - } + -re ".*$gdb_prompt $" { + } timeout { perror "could not resynchronize to command prompt (timeout)" continue @@ -119,24 +119,24 @@ proc set_bp_overloaded {name expectedmenu mychoice bpnumber linenumbers} { -re "$gdb_prompt $" { gdb_assert {!$bad_bp && $seen_bps == $expected_bps} \ $gdb_test_name - } - timeout { - fail "$gdb_test_name (timeout)" - take_gdb_out_of_choice_menu - } - } - } - -re ".*\r\n> " { - fail "$gdb_test_name (bad menu)" - take_gdb_out_of_choice_menu - } - -re ".*$gdb_prompt $" { - fail "$gdb_test_name (no menu)" - } - timeout { - fail "$gdb_test_name (timeout)" - take_gdb_out_of_choice_menu - } + } + timeout { + fail "$gdb_test_name (timeout)" + take_gdb_out_of_choice_menu + } + } + } + -re ".*\r\n> " { + fail "$gdb_test_name (bad menu)" + take_gdb_out_of_choice_menu + } + -re ".*$gdb_prompt $" { + fail "$gdb_test_name (no menu)" + } + timeout { + fail "$gdb_test_name (timeout)" + take_gdb_out_of_choice_menu + } } } @@ -186,18 +186,18 @@ foreach type $all_types { # Probe for the actual type. gdb_test_multiple "print &foo::overload1arg($types($type))" \ - "probe $types($type)" { - -re ".*\.*$gdb_prompt $" { - regexp {<.*>} $expect_out(0,string) func - regexp {\(.*\)} $func real_type - - # Store the real type into TYPES. - set types($type) [string trim $real_type {()}] - - # Create an inverse mapping of the actual type to - # the synthetic type. - set type_map("$types($type)") $type - pass "detect $type" + "probe $types($type)" { + -re ".*\.*$gdb_prompt $" { + regexp {<.*>} $expect_out(0,string) func + regexp {\(.*\)} $func real_type + + # Store the real type into TYPES. + set types($type) [string trim $real_type {()}] + + # Create an inverse mapping of the actual type to + # the synthetic type. + set type_map("$types($type)") $type + pass "detect $type" } } } @@ -256,35 +256,35 @@ gdb_test "info break" $bptable "breakpoint info, after setting one-by-one" send_gdb "break foo::overload1arg\n" gdb_expect { -re "$menu_overload1arg" { - pass "bp menu for foo::overload1arg choice cancel" - # Choose cancel. - send_gdb "0\n" - gdb_expect { - -re "canceled\r\n$gdb_prompt $" { - pass "set bp on overload1arg canceled" - } + pass "bp menu for foo::overload1arg choice cancel" + # Choose cancel. + send_gdb "0\n" + gdb_expect { + -re "canceled\r\n$gdb_prompt $" { + pass "set bp on overload1arg canceled" + } -re "cancelled\r\n$gdb_prompt $" { pass "set bp on overload1arg canceled" } - -re ".*$gdb_prompt $" { - fail "set bp on overload1arg canceled (bad message)" - } - timeout { - fail "set bp on overload1arg canceled (timeout)" - take_gdb_out_of_choice_menu - } - } + -re ".*$gdb_prompt $" { + fail "set bp on overload1arg canceled (bad message)" + } + timeout { + fail "set bp on overload1arg canceled (timeout)" + take_gdb_out_of_choice_menu + } + } } -re ".*\r\n> " { - fail "bp menu for foo::overload1arg choice cancel (bad menu)" - take_gdb_out_of_choice_menu + fail "bp menu for foo::overload1arg choice cancel (bad menu)" + take_gdb_out_of_choice_menu } -re ".*$gdb_prompt $" { - fail "bp menu for foo::overload1arg choice cancel (no menu)" + fail "bp menu for foo::overload1arg choice cancel (no menu)" } timeout { - fail "bp menu for foo::overload1arg choice cancel (timeout)" - take_gdb_out_of_choice_menu + fail "bp menu for foo::overload1arg choice cancel (timeout)" + take_gdb_out_of_choice_menu } } @@ -310,15 +310,15 @@ with_test_prefix "multiple breakpoints" { send_gdb "delete breakpoints\n" gdb_expect { -re "Delete all breakpoints, watchpoints, tracepoints, and catchpoints.* $" { - send_gdb "y\n" - gdb_expect { - -re ".*$gdb_prompt $" { + send_gdb "y\n" + gdb_expect { + -re ".*$gdb_prompt $" { pass "delete all breakpoints, watchpoints, tracepoints, and catchpoints" - } - timeout { + } + timeout { fail "delete all breakpoints, watchpoints, tracepoints, and catchpoints (timeout)" - } - } + } + } } timeout { fail "delete all breakpoints, watchpoints, tracepoints, and catchpoints (timeout)" @@ -336,32 +336,32 @@ incr bpnum send_gdb "break foo::overload1arg\n" gdb_expect { -re "$menu_overload1arg" { - pass "bp menu for foo::overload1arg choice all" - # Choose all. - send_gdb "1\n" - gdb_expect { + pass "bp menu for foo::overload1arg choice all" + # Choose all. + send_gdb "1\n" + gdb_expect { -re "Breakpoint $bpnum at $hex: foo::overload1arg. .12 locations.\r\n.*$gdb_prompt $" { - pass "set bp on overload1arg all" - } - -re ".*$gdb_prompt $" { - fail "set bp on overload1arg all (bad message)" - } - timeout { - fail "set bp on overload1arg all (timeout)" - take_gdb_out_of_choice_menu - } - } + pass "set bp on overload1arg all" + } + -re ".*$gdb_prompt $" { + fail "set bp on overload1arg all (bad message)" + } + timeout { + fail "set bp on overload1arg all (timeout)" + take_gdb_out_of_choice_menu + } + } } -re ".*\r\n> " { - fail "bp menu for foo::overload1arg choice all (bad menu)" - take_gdb_out_of_choice_menu + fail "bp menu for foo::overload1arg choice all (bad menu)" + take_gdb_out_of_choice_menu } -re ".*$gdb_prompt $" { - fail "bp menu for foo::overload1arg choice all (no menu)" + fail "bp menu for foo::overload1arg choice all (no menu)" } timeout { - fail "bp menu for foo::overload1arg choice all (timeout)" - take_gdb_out_of_choice_menu + fail "bp menu for foo::overload1arg choice all (timeout)" + take_gdb_out_of_choice_menu } } @@ -382,32 +382,32 @@ proc continue_to_bp_overloaded {bpnumber might_fail line argtype argument} { global gdb_prompt hex decimal srcfile bkptno_num_re if {$argument == ""} { - set actuals "" + set actuals "" } else { - set actuals "arg=$argument" - if {[regexp {char} $argtype]} { + set actuals "arg=$argument" + if {[regexp {char} $argtype]} { append actuals " \\'\\\\00$argument\\'" } } if {[string match $argtype "void"]} { - set body "return $decimal;" + set body "return $decimal;" } else { - set body "arg = 0; return $decimal;" + set body "arg = 0; return $decimal;" } gdb_test_multiple "continue" "continue to bp overloaded : $argtype" { - -re "Continuing.\r\n\r\nBreakpoint $bkptno_num_re, foo::overload1arg \\(this=${hex}(, )?$actuals\\) at .*$srcfile:$line\r\n$decimal\[\t \]+{ $body }.*$gdb_prompt $" { - pass "continue to bp overloaded : $argtype" - } - - -re "Continuing.\r\n\r\nBreakpoint $bkptno_num_re, foo::overload1arg \\(this=${hex}, arg=.*\\) at .*$srcfile:$line\r\n$decimal\[\t \]+{ $body }.*$gdb_prompt $" { - if {$might_kfail} { - kfail "c++/8130" "continue to bp overloaded : $argtype" - } else { - fail "continue to bp overloaded : $argtype" - } - } + -re "Continuing.\r\n\r\nBreakpoint $bkptno_num_re, foo::overload1arg \\(this=${hex}(, )?$actuals\\) at .*$srcfile:$line\r\n$decimal\[\t \]+{ $body }.*$gdb_prompt $" { + pass "continue to bp overloaded : $argtype" + } + + -re "Continuing.\r\n\r\nBreakpoint $bkptno_num_re, foo::overload1arg \\(this=${hex}, arg=.*\\) at .*$srcfile:$line\r\n$decimal\[\t \]+{ $body }.*$gdb_prompt $" { + if {$might_kfail} { + kfail "c++/8130" "continue to bp overloaded : $argtype" + } else { + fail "continue to bp overloaded : $argtype" + } + } } } diff --git a/gdb/testsuite/gdb.cp/ovsrch1.cc b/gdb/testsuite/gdb.cp/ovsrch1.cc index 6ed17587ecf..92664a9d1e1 100644 --- a/gdb/testsuite/gdb.cp/ovsrch1.cc +++ b/gdb/testsuite/gdb.cp/ovsrch1.cc @@ -38,4 +38,3 @@ main () p->foo (); return 0; } - diff --git a/gdb/testsuite/gdb.cp/pass-by-ref.exp b/gdb/testsuite/gdb.cp/pass-by-ref.exp index 4c1266663fb..70cb692ca5d 100644 --- a/gdb/testsuite/gdb.cp/pass-by-ref.exp +++ b/gdb/testsuite/gdb.cp/pass-by-ref.exp @@ -113,11 +113,11 @@ proc generate_member_function { classname signature length state } { explicit { set declaration "$signature;\n" set definition "$classname\:\:$signature - { - data\[0\] = $CUSTOM; - data\[[expr {$length - 1}]\] = $CUSTOM; - tracer = $TRACE; - }\n" + { + data\[0\] = $CUSTOM; + data\[[expr {$length - 1}]\] = $CUSTOM; + tracer = $TRACE; + }\n" } defaultedIn { set declaration "$signature = default;\n" @@ -168,16 +168,16 @@ proc generate_class { classname length states } { /*** C++ class $classname ***/ class ${classname} { public: - $classname (void); - $declarations + $classname (void); + $declarations - int data\[$length\]; + int data\[$length\]; }; $classname\:\:$classname (void) { - data\[0\] = $ORIGINAL; - data\[[expr {$length - 1}]\] = $ORIGINAL; + data\[0\] = $ORIGINAL; + data\[[expr {$length - 1}]\] = $ORIGINAL; } $definitions @@ -228,7 +228,7 @@ proc generate_container_class { states } { /*** Class that contains $contained ***/ class $classname { public: - $contained item; + $contained item; }; $classname ${classname}_var; /* global var */ diff --git a/gdb/testsuite/gdb.cp/pr-1210.cc b/gdb/testsuite/gdb.cp/pr-1210.cc index 5747e5da58d..19f9626544d 100644 --- a/gdb/testsuite/gdb.cp/pr-1210.cc +++ b/gdb/testsuite/gdb.cp/pr-1210.cc @@ -9,7 +9,7 @@ class B : virtual public A class C : public A { protected: - B myB; + B myB; }; int main() diff --git a/gdb/testsuite/gdb.cp/pr10687.exp b/gdb/testsuite/gdb.cp/pr10687.exp index 9ae840af8c4..26fa2eb60eb 100644 --- a/gdb/testsuite/gdb.cp/pr10687.exp +++ b/gdb/testsuite/gdb.cp/pr10687.exp @@ -27,4 +27,3 @@ gdb_breakpoint [gdb_get_line_number "marker"] gdb_continue_to_breakpoint "marker" gdb_test "p a" "{static axis = {{static axis = > = {> = {data = 0}, static DEFAULT_INSTANCE = }, }" - diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp index c7bad495552..5ca0425c43a 100644 --- a/gdb/testsuite/gdb.cp/ref-types.exp +++ b/gdb/testsuite/gdb.cp/ref-types.exp @@ -85,10 +85,10 @@ gdb_test "print as\[3\]" ".\[0-9\]* = 3" "print value of as\[3\]" gdb_test_multiple "print rs" "print value of rs" { -re ".\[0-9\]* = \\(short &\\) @$hex: -1.*$gdb_prompt $" { - pass "print value of rs" + pass "print value of rs" } -re ".\[0-9\]* = \\(short int &\\) @$hex: -1.*$gdb_prompt $" { - pass "print value of rs" + pass "print value of rs" } eof { fail "print rs ($GDB dumped core) (FIXME)" ; gdb_start_again ; } } @@ -216,19 +216,19 @@ gdb_test "print rUC" \ gdb_test_multiple "print rS" "print value of rS" { -re ".\[0-9\]* = \\(short &\\) @$hex: -14.*$gdb_prompt $" { - pass "print value of rS" + pass "print value of rS" } -re ".\[0-9\]* = \\(short int &\\) @$hex: -14.*$gdb_prompt $" { - pass "print value of rS" + pass "print value of rS" } } gdb_test_multiple "print rUS" "print value of rUS" { -re ".\[0-9\]* = \\(unsigned short &\\) @$hex: 7.*$gdb_prompt $" { - pass "print value of rUS" + pass "print value of rUS" } -re ".\[0-9\]* = \\(short unsigned int &\\) @$hex: 7.*$gdb_prompt $" { - pass "print value of rUS" + pass "print value of rUS" } } @@ -237,23 +237,23 @@ gdb_test "print rI" ".\[0-9\]* = \\(int &\\) @$hex: 102" \ gdb_test "print rUI" \ ".\[0-9\]* = \\(unsigned int &\\) @$hex: 1002" \ - "print value of rUI" + "print value of rUI" gdb_test_multiple "print rL" "print value of rL" { -re ".\[0-9\]* = \\(long &\\) @$hex: -234.*$gdb_prompt $" { - pass "print value of rL" + pass "print value of rL" } -re ".\[0-9\]* = \\(long int &\\) @$hex: -234.*$gdb_prompt $" { - pass "print value of rL" + pass "print value of rL" } } gdb_test_multiple "print rUL" "print value of rUL" { -re ".\[0-9\]* = \\(unsigned long &\\) @$hex: 234.*$gdb_prompt $" { - pass "print value of rUL" + pass "print value of rUL" } -re ".\[0-9\]* = \\(long unsigned int &\\) @$hex: 234.*$gdb_prompt $" { - pass "print value of rUL" + pass "print value of rUL" } } @@ -264,4 +264,3 @@ gdb_test "print rF" \ gdb_test "print rD" \ ".\[0-9\]* = \\(double &\\) @$hex: -1.375e-123.*" \ "print value of rD" - diff --git a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp b/gdb/testsuite/gdb.cp/rvalue-ref-types.exp index 596abe71362..90b91063352 100644 --- a/gdb/testsuite/gdb.cp/rvalue-ref-types.exp +++ b/gdb/testsuite/gdb.cp/rvalue-ref-types.exp @@ -95,22 +95,22 @@ gdb_test "print rrUC" \ "print value of rrUC" gdb_test "print rrS" "$decimal = \\(short( int)? &&\\) @$hex: -14" \ - "print value of rrS" + "print value of rrS" gdb_test "print rrUS" \ - "$decimal = \\(unsigned short( int)? &&\\) @$hex: 7" \ - "print value of rrUS" + "$decimal = \\(unsigned short( int)? &&\\) @$hex: 7" \ + "print value of rrUS" gdb_test "print rrI" "$decimal = \\(int &&\\) @$hex: 102" \ "print value of rrI" gdb_test "print rrUI" \ "$decimal = \\(unsigned int &&\\) @$hex: 1002" \ - "print value of rrUI" + "print value of rrUI" gdb_test "print rrL" \ "$decimal = \\(long( int)? &&\\) @$hex: -234" \ - "print value of rrL" + "print value of rrL" gdb_test "print rrUL" \ "$decimal = \\((unsigned long|long unsigned int)? &&\\) @$hex: 234" \ diff --git a/gdb/testsuite/gdb.cp/shadow.cc b/gdb/testsuite/gdb.cp/shadow.cc index 4c9fb12a7bb..5ffbed98a3d 100644 --- a/gdb/testsuite/gdb.cp/shadow.cc +++ b/gdb/testsuite/gdb.cp/shadow.cc @@ -18,23 +18,23 @@ public: y++; // marker1 { - int x = 44; - y++; // marker2 - - { - int x = 55; - y++; // marker3 - - { - using namespace A; - y++; // marker4 - - { - using A::x; - y++; // marker5 - } - } - } + int x = 44; + y++; // marker2 + + { + int x = 55; + y++; // marker3 + + { + using namespace A; + y++; // marker4 + + { + using A::x; + y++; // marker5 + } + } + } } return 0; } diff --git a/gdb/testsuite/gdb.cp/smartp.cc b/gdb/testsuite/gdb.cp/smartp.cc index 7141089fc15..c51177524ff 100644 --- a/gdb/testsuite/gdb.cp/smartp.cc +++ b/gdb/testsuite/gdb.cp/smartp.cc @@ -158,4 +158,3 @@ int main(){ return 0; // end of main } - diff --git a/gdb/testsuite/gdb.cp/smartp.exp b/gdb/testsuite/gdb.cp/smartp.exp index cc60aedc376..6a7a0b06be2 100644 --- a/gdb/testsuite/gdb.cp/smartp.exp +++ b/gdb/testsuite/gdb.cp/smartp.exp @@ -72,4 +72,3 @@ gdb_test "p c->foo()" "= 66" gdb_test "p c->inta" "= 77" gdb_test "p c2->inta" "= 77" - diff --git a/gdb/testsuite/gdb.cp/static-method.exp b/gdb/testsuite/gdb.cp/static-method.exp index b58bf71bdf4..10e18d03bdc 100644 --- a/gdb/testsuite/gdb.cp/static-method.exp +++ b/gdb/testsuite/gdb.cp/static-method.exp @@ -25,15 +25,15 @@ proc test_breakpoint {func result} { # Return to the top of the test function every time. delete_breakpoints if {![gdb_breakpoint test_function]} { - fail "set test_function breakpoint for $func" + fail "set test_function breakpoint for $func" } elseif {[gdb_test "continue" \ "Continuing.\r\n\r\nBreakpoint $DEC+,.*test_function.*" \ "continue to test_function for $func"] != 0} { } else { - gdb_breakpoint "$func" - gdb_test "continue" \ - "Continuing.\r\n\r\nBreakpoint $DEC+,.*$result.*" \ - "continue to $func" + gdb_breakpoint "$func" + gdb_test "continue" \ + "Continuing.\r\n\r\nBreakpoint $DEC+,.*$result.*" \ + "continue to $func" } } diff --git a/gdb/testsuite/gdb.cp/static-typedef-print.cc b/gdb/testsuite/gdb.cp/static-typedef-print.cc index d0500d142e3..5dc00e837b1 100644 --- a/gdb/testsuite/gdb.cp/static-typedef-print.cc +++ b/gdb/testsuite/gdb.cp/static-typedef-print.cc @@ -28,7 +28,7 @@ const A A::INSTANCE = {}; int main() { A a; if (a == A::INSTANCE) { - return -1; + return -1; } return 0; } diff --git a/gdb/testsuite/gdb.cp/static-typedef-print.exp b/gdb/testsuite/gdb.cp/static-typedef-print.exp index 1f06dee61b6..11653cf8029 100644 --- a/gdb/testsuite/gdb.cp/static-typedef-print.exp +++ b/gdb/testsuite/gdb.cp/static-typedef-print.exp @@ -26,5 +26,5 @@ if {![runto_main]} { } gdb_test "print a" \ - "static INSTANCE = }}.*" \ - "print static member" + "static INSTANCE = }}.*" \ + "print static member" diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp index 6dd4e660434..9aeb6a774c7 100644 --- a/gdb/testsuite/gdb.cp/templates.exp +++ b/gdb/testsuite/gdb.cp/templates.exp @@ -76,18 +76,18 @@ proc test_ptype_of_templates {} { } gdb_test_multiple "ptype/r t5i" "ptype t5i" { - -re "type = class T5 \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5\\(int\\);${ws}T5\\(T5 const ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\\}\r\n$gdb_prompt $" { + -re "type = class T5 \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5\\(int\\);${ws}T5\\(T5 const ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\\}\r\n$gdb_prompt $" { xfail "ptype T5 -- with several fixes from 4.17 -- without size_t" } - -re "type = class T5 \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5 \\(int\\);${ws}T5 \\(const class T5 &\\);${ws}void ~T5 \\(\\);${ws}static void \\* new \\(unsigned int\\);${ws}static void delete \\(void ?\\*\\);${ws}int value \\((void|)\\);${ws}\\}\r\n$gdb_prompt $" { + -re "type = class T5 \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5 \\(int\\);${ws}T5 \\(const class T5 &\\);${ws}void ~T5 \\(\\);${ws}static void \\* new \\(unsigned int\\);${ws}static void delete \\(void ?\\*\\);${ws}int value \\((void|)\\);${ws}\\}\r\n$gdb_prompt $" { xfail "ptype t5i -- new with unsigned int -- without size_t" } - -re "type = class T5 \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5 \\(int\\);${ws}T5 \\(const class T5 &\\);${ws}void ~T5 \\(\\);${ws}static void \\* new \\(unsigned long\\);${ws}static void delete \\(void ?\\*\\);${ws}int value \\((void|)\\);${ws}\\}\r\n$gdb_prompt $" { + -re "type = class T5 \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5 \\(int\\);${ws}T5 \\(const class T5 &\\);${ws}void ~T5 \\(\\);${ws}static void \\* new \\(unsigned long\\);${ws}static void delete \\(void ?\\*\\);${ws}int value \\((void|)\\);${ws}\\}\r\n$gdb_prompt $" { xfail "ptype t5i -- new with unsigned long -- without size_t" } - -re "type = class T5 \{.*public:.*static int X;.*int x;.*int val;.*.*T5 \\(int\\);.*.*void ~T5 \\(\\).*.*.*int value \\((void|)\\);.*\}.*$gdb_prompt $" { - xfail "ptype t5i -- without size_t" - } + -re "type = class T5 \{.*public:.*static int X;.*int x;.*int val;.*.*T5 \\(int\\);.*.*void ~T5 \\(\\).*.*.*int value \\((void|)\\);.*\}.*$gdb_prompt $" { + xfail "ptype t5i -- without size_t" + } -re "type = class T5 \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}T5 & operator=\\(T5 const ?&\\);${ws}T5\\(int\\);${ws}T5\\((T5 const|const T5) ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" { xfail "ptype t5i -- without size_t" } @@ -137,7 +137,7 @@ proc test_template_breakpoints {} { "nonsense intended to insure that this test fails" \ "constructor breakpoint" } - -re ".*\n> $" { + -re ".*\n> $" { gdb_test "0" \ "nonsense intended to insure that this test fails" \ "constructor breakpoint (bad menu choices)" @@ -160,7 +160,7 @@ proc test_template_breakpoints {} { "value method breakpoint" set bp_location [gdb_get_line_number \ - "set breakpoint on a line with no real code"] + "set breakpoint on a line with no real code"] gdb_test_multiple "break ${testfile}.cc:${bp_location}" \ "breakpoint on a line with no real code" { @@ -204,9 +204,9 @@ proc test_template_calls {} { -re "Cannot invoke functions on this machine.*$gdb_prompt $" { fail "print t5i.value()" } - -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" { + -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" { setup_xfail hppa*-*-* CLLbs16899 - xfail "print t5i.value" + xfail "print t5i.value" } } } diff --git a/gdb/testsuite/gdb.cp/typedef-base.exp b/gdb/testsuite/gdb.cp/typedef-base.exp index a6780da7e06..2a2164d314a 100644 --- a/gdb/testsuite/gdb.cp/typedef-base.exp +++ b/gdb/testsuite/gdb.cp/typedef-base.exp @@ -28,5 +28,5 @@ if {![runto_main]} { } gdb_test "ptype C::x" \ - "type = int" \ - "ptype typedef base struct member" + "type = int" \ + "ptype typedef base struct member" diff --git a/gdb/testsuite/gdb.cp/userdef.exp b/gdb/testsuite/gdb.cp/userdef.exp index 05ff8b710a5..2a89b706c31 100644 --- a/gdb/testsuite/gdb.cp/userdef.exp +++ b/gdb/testsuite/gdb.cp/userdef.exp @@ -49,13 +49,13 @@ gdb_test "print one + two" "\\\$\[0-9\]* = {x = 6, y = 8}" # that the rest of the tests can run undisturbed. gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" { -re "#0 marker1.*$gdb_prompt $" { - setup_kfail "gdb/1155" s390-*-linux-gnu - fail "re-selected 'main' frame after inferior call" - gdb_test "finish" ".*main.*at .*userdef.cc:.*// marker1-returns-here.*" \ - "finish call to marker1" + setup_kfail "gdb/1155" s390-*-linux-gnu + fail "re-selected 'main' frame after inferior call" + gdb_test "finish" ".*main.*at .*userdef.cc:.*// marker1-returns-here.*" \ + "finish call to marker1" } -re "#1 ($hex in )?main.*$gdb_prompt $" { - pass "re-selected 'main' frame after inferior call" + pass "re-selected 'main' frame after inferior call" } } diff --git a/gdb/testsuite/gdb.cp/virtbase2.exp b/gdb/testsuite/gdb.cp/virtbase2.exp index 4b6abd071d2..d18312be002 100644 --- a/gdb/testsuite/gdb.cp/virtbase2.exp +++ b/gdb/testsuite/gdb.cp/virtbase2.exp @@ -41,7 +41,7 @@ if {![runto_main]} { proc make_scope_list { scopes } { if { [llength $scopes] == 1 } { - return [list "" "${scopes}::"] + return [list "" "${scopes}::"] } # Pop the first element, save the first scope. @@ -55,7 +55,7 @@ proc make_scope_list { scopes } { # ... and a copy of the child's result with this scope. foreach r $child_result { - lappend result "${this_scope}::$r" + lappend result "${this_scope}::$r" } return $result diff --git a/gdb/testsuite/gdb.cp/virtfunc.cc b/gdb/testsuite/gdb.cp/virtfunc.cc index e83e9c908c5..e458809c8bc 100644 --- a/gdb/testsuite/gdb.cp/virtfunc.cc +++ b/gdb/testsuite/gdb.cp/virtfunc.cc @@ -175,10 +175,10 @@ void test_calls() TEST(pBe->vvb(), 411); TEST(pDe->vvb(), 411); - TEST(pEe->vd(), 282); - TEST(pEe->fvb(), 311); + TEST(pEe->vd(), 282); + TEST(pEe->fvb(), 311); - TEST(pEe->D::vg(), 102); + TEST(pEe->D::vg(), 102); printf("Did %d tests, of which %d failed.\n", all_count, failed_count); } diff --git a/gdb/testsuite/gdb.ctf/ctf-a.h b/gdb/testsuite/gdb.ctf/ctf-a.h index 9bb65562a02..d4c8eabc429 100644 --- a/gdb/testsuite/gdb.ctf/ctf-a.h +++ b/gdb/testsuite/gdb.ctf/ctf-a.h @@ -19,4 +19,3 @@ struct A { struct B *b; struct A *next; }; - diff --git a/gdb/testsuite/gdb.ctf/ctf-b.h b/gdb/testsuite/gdb.ctf/ctf-b.h index 59f7315bdc7..bdbcdab6fb3 100644 --- a/gdb/testsuite/gdb.ctf/ctf-b.h +++ b/gdb/testsuite/gdb.ctf/ctf-b.h @@ -19,4 +19,3 @@ struct B { struct C *c; int wombat; }; - diff --git a/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp b/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp index 35bb401f55e..7a0cfda627c 100644 --- a/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp +++ b/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp @@ -153,4 +153,3 @@ with_debuginfod_env $cache { stop_debuginfod # Spare debug files may confuse testsuite runs in the future. remote_exec build "rm -f $debugfile" - diff --git a/gdb/testsuite/gdb.disasm/sh3.exp b/gdb/testsuite/gdb.disasm/sh3.exp index fc591a743ff..7db70a25df4 100644 --- a/gdb/testsuite/gdb.disasm/sh3.exp +++ b/gdb/testsuite/gdb.disasm/sh3.exp @@ -105,4 +105,3 @@ clean_restart $::testfile all_fp_move_and_load_tests all_fp_arithmetic_tests all_fp_misc_tests - diff --git a/gdb/testsuite/gdb.dlang/circular.c b/gdb/testsuite/gdb.dlang/circular.c index d0ca68521fc..47379e07e19 100644 --- a/gdb/testsuite/gdb.dlang/circular.c +++ b/gdb/testsuite/gdb.dlang/circular.c @@ -27,4 +27,3 @@ main (void) found (); return 0; } - diff --git a/gdb/testsuite/gdb.dlang/circular.exp b/gdb/testsuite/gdb.dlang/circular.exp index cc79062ea6d..06fc0bca9ff 100644 --- a/gdb/testsuite/gdb.dlang/circular.exp +++ b/gdb/testsuite/gdb.dlang/circular.exp @@ -126,7 +126,7 @@ Dwarf::assemble $asm_file { } if { [prepare_for_testing "failed to prepare" ${testfile} \ - [list $srcfile $asm_file] {nodebug}] } { + [list $srcfile $asm_file] {nodebug}] } { return -1 } diff --git a/gdb/testsuite/gdb.dlang/watch-loc.exp b/gdb/testsuite/gdb.dlang/watch-loc.exp index d16b779b57c..8484b84f22f 100644 --- a/gdb/testsuite/gdb.dlang/watch-loc.exp +++ b/gdb/testsuite/gdb.dlang/watch-loc.exp @@ -68,7 +68,7 @@ Dwarf::assemble $asm_file { } if { [prepare_for_testing "failed to prepare" ${testfile} \ - [list $srcfile $asm_file] {nodebug}] } { + [list $srcfile $asm_file] {nodebug}] } { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp index 35203199147..7ee25c0e9d6 100644 --- a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp +++ b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp @@ -33,7 +33,7 @@ Dwarf::assemble $asm_file { DW_AT_language @DW_LANG_Ada95 DW_AT_name $srcfile DW_AT_comp_dir /tmp - } { + } { declare_labels b_l b_l: DW_TAG_base_type { @@ -42,13 +42,13 @@ Dwarf::assemble $asm_file { DW_AT_name bool } - DW_TAG_subprogram { + DW_TAG_subprogram { DW_AT_name pck__xtra__function.cold MACRO_AT_range {first} DW_AT_type :$b_l } - DW_TAG_subprogram { + DW_TAG_subprogram { DW_AT_name pck__xtra__function MACRO_AT_range {second} DW_AT_type :$b_l diff --git a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp index 915f47ebaaf..7ce13b8620f 100644 --- a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp +++ b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp @@ -35,7 +35,7 @@ Dwarf::assemble $asm_file { DW_AT_name $srcfile DW_AT_comp_dir /tmp - } { + } { declare_labels b_l b_l: DW_TAG_base_type { @@ -44,14 +44,14 @@ Dwarf::assemble $asm_file { DW_AT_name bool } # Here the name comes first and the linkage name second. - DW_TAG_subprogram { + DW_TAG_subprogram { DW_AT_name system__namefirst DW_AT_linkage_name __gnat_namefirst MACRO_AT_range {first} DW_AT_type :$b_l } # Here the linkage name comes first and the name second. - DW_TAG_subprogram { + DW_TAG_subprogram { DW_AT_linkage_name __gnat_namesecond DW_AT_name system__namesecond MACRO_AT_range {second} diff --git a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp index 0efb8cbf233..aa18d36780b 100644 --- a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp +++ b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp @@ -33,14 +33,14 @@ Dwarf::assemble $asm_file { DW_TAG_compile_unit { DW_AT_language @DW_LANG_Ada95 DW_AT_name $srcfile - } { + } { declare_labels integer array array_pointer bounds_pointer - integer: DW_TAG_base_type { + integer: DW_TAG_base_type { DW_AT_byte_size 8 DW_FORM_sdata DW_AT_encoding @DW_ATE_signed DW_AT_name integer - } + } array: DW_TAG_array_type { DW_AT_name array_type diff --git a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp index a4b6a956298..1bc9fbde643 100644 --- a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp +++ b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp @@ -39,35 +39,35 @@ Dwarf::assemble $asm_file { DW_AT_language @DW_LANG_Ada95 DW_AT_name fd.adb DW_AT_comp_dir /tmp - } { + } { declare_labels array_elt_label integer_label array_label \ - typedef_label ref_type_label - set ptr_size [get_sizeof "void *" 96] - set int_size [get_sizeof "int" 4] + typedef_label ref_type_label + set ptr_size [get_sizeof "void *" 96] + set int_size [get_sizeof "int" 4] - # A structure with no size attribute, to mimick structures - # in Ada that have a dynamic size... - array_elt_label: structure_type { + # A structure with no size attribute, to mimick structures + # in Ada that have a dynamic size... + array_elt_label: structure_type { DW_AT_name fd__Tints_doubledC DW_AT_artificial 1 DW_FORM_flag_present - } - - # ... and a corresponding XVZ variable, supposed to be there - # to provide the actual size. Except that, in this case, - # the variable has no address, to simulate the fact that - # it has been optimized out (which the compiler can do, - # even if it at the expense of debuggability). - DW_TAG_variable { + } + + # ... and a corresponding XVZ variable, supposed to be there + # to provide the actual size. Except that, in this case, + # the variable has no address, to simulate the fact that + # it has been optimized out (which the compiler can do, + # even if it at the expense of debuggability). + DW_TAG_variable { DW_AT_name fd__Tints_doubledC___XVZ DW_AT_type :$integer_label DW_AT_artificial 1 DW_FORM_flag_present - } + } - integer_label: DW_TAG_base_type { + integer_label: DW_TAG_base_type { DW_AT_byte_size $int_size DW_FORM_sdata DW_AT_encoding @DW_ATE_signed DW_AT_name integer - } + } array_label: DW_TAG_array_type { DW_AT_name fd__ints_doubled @@ -79,24 +79,24 @@ Dwarf::assemble $asm_file { } } - typedef_label: DW_TAG_typedef { + typedef_label: DW_TAG_typedef { DW_AT_name fd__ints_doubled DW_AT_type :$array_label - } + } - ref_type_label: DW_TAG_reference_type { + ref_type_label: DW_TAG_reference_type { DW_AT_byte_size $ptr_size DW_FORM_sdata DW_AT_type :$typedef_label - } + } - DW_TAG_variable { + DW_TAG_variable { DW_AT_name fd__global DW_AT_type :$ref_type_label DW_AT_location { DW_OP_addr [gdb_target_symbol fd__global] } SPECIAL_expr DW_AT_external 1 flag - } + } } } @@ -110,4 +110,4 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \ gdb_test_no_output "set language ada" gdb_test "print fd.global" \ - " = " + " = " diff --git a/gdb/testsuite/gdb.dwarf2/arr-stride.exp b/gdb/testsuite/gdb.dwarf2/arr-stride.exp index bad1ffe4e9b..fefd703c1b7 100644 --- a/gdb/testsuite/gdb.dwarf2/arr-stride.exp +++ b/gdb/testsuite/gdb.dwarf2/arr-stride.exp @@ -23,31 +23,31 @@ standard_testfile main.c -dw.S set asm_file [standard_output_file $srcfile2] Dwarf::assemble $asm_file { cu {} { - DW_TAG_compile_unit { + DW_TAG_compile_unit { DW_AT_language @DW_LANG_Ada95 DW_AT_name foo.adb DW_AT_comp_dir /tmp - } { + } { declare_labels integer_label array_elt_label array_label \ - big_array_label struct_label + big_array_label struct_label - integer_label: DW_TAG_base_type { + integer_label: DW_TAG_base_type { DW_AT_byte_size 4 DW_FORM_sdata DW_AT_encoding @DW_ATE_signed DW_AT_name integer - } + } - array_elt_label: DW_TAG_subrange_type { + array_elt_label: DW_TAG_subrange_type { DW_AT_lower_bound 0xe0 DW_FORM_data1 DW_AT_upper_bound 0x1f DW_FORM_data1 DW_AT_name pck__item DW_AT_type :$integer_label - } + } - DW_TAG_typedef { + DW_TAG_typedef { DW_AT_name pck__table DW_AT_type :$array_label - } + } array_label: DW_TAG_array_type { DW_AT_name pck__table @@ -61,10 +61,10 @@ Dwarf::assemble $asm_file { } } - DW_TAG_typedef { + DW_TAG_typedef { DW_AT_name pck__big_table DW_AT_type :$big_array_label - } + } big_array_label: DW_TAG_array_type { DW_AT_name pck__big_table @@ -117,10 +117,10 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ gdb_test_no_output "set language ada" gdb_test "ptype pck.table" \ - "type = array \\(0 \\.\\. 4\\) of pck\\.item " + "type = array \\(0 \\.\\. 4\\) of pck\\.item " gdb_test "ptype pck.big_table" \ - "type = array \\(0 \\.\\. 4\\) of pck\\.item " + "type = array \\(0 \\.\\. 4\\) of pck\\.item " gdb_test "print the_struct" \ "\\(intfield => 1, arrayfield => \\(0 => \\)\\)" diff --git a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp index 24d4600488d..34ef4a0cce8 100644 --- a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp +++ b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp @@ -82,4 +82,4 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ gdb_test_no_output "set language ada" gdb_test "ptype pck.table" \ - "type = array \\(enum_000 \\.\\. enum_128\\) of boolean" + "type = array \\(enum_000 \\.\\. enum_128\\) of boolean" diff --git a/gdb/testsuite/gdb.dwarf2/calling-convention.exp b/gdb/testsuite/gdb.dwarf2/calling-convention.exp index d3426b9c5f6..108e8405d39 100644 --- a/gdb/testsuite/gdb.dwarf2/calling-convention.exp +++ b/gdb/testsuite/gdb.dwarf2/calling-convention.exp @@ -85,9 +85,9 @@ gdb_test "return 35" \ "Not confirmed" \ "return 35" \ [multi_line \ - "Function 'foo' does not follow the target calling convention\\." \ - "If you continue, setting the return value will probably lead to unpredictable behaviors\\." \ - "Make foo return now\\? \\(y or n\\) $"] \ + "Function 'foo' does not follow the target calling convention\\." \ + "If you continue, setting the return value will probably lead to unpredictable behaviors\\." \ + "Make foo return now\\? \\(y or n\\) $"] \ "n" gdb_test "finish" [multi_line \ diff --git a/gdb/testsuite/gdb.dwarf2/data-loc.exp b/gdb/testsuite/gdb.dwarf2/data-loc.exp index 7630dcc20a1..32dbb4db5b6 100644 --- a/gdb/testsuite/gdb.dwarf2/data-loc.exp +++ b/gdb/testsuite/gdb.dwarf2/data-loc.exp @@ -133,118 +133,118 @@ gdb_test_no_output "set language ada" # foo.three gdb_test "print foo.three" \ - " = \\(1, 2, 3\\)" + " = \\(1, 2, 3\\)" gdb_test "ptype foo.three" \ - "type = array \\(<>\\) of integer" + "type = array \\(<>\\) of integer" gdb_test "print foo.three(1)" \ - " = 1" + " = 1" gdb_test "print foo.three(2)" \ - " = 2" + " = 2" gdb_test "print foo.three(3)" \ - " = 3" + " = 3" gdb_test "print foo.three'first" \ - " = 1" + " = 1" gdb_test "print foo.three'last" \ - " = 3" + " = 3" gdb_test "print foo.three'length" \ - " = 3" + " = 3" # foo.three_tdef gdb_test "print foo.three_tdef.all" \ - " = \\(1, 2, 3\\)" + " = \\(1, 2, 3\\)" gdb_test "ptype foo.three_tdef" \ - "type = access array \\(<>\\) of integer" + "type = access array \\(<>\\) of integer" gdb_test "print foo.three_tdef(1)" \ - " = 1" + " = 1" gdb_test "print foo.three_tdef(2)" \ - " = 2" + " = 2" gdb_test "print foo.three_tdef(3)" \ - " = 3" + " = 3" gdb_test "print foo.three_tdef'first" \ - " = 1" + " = 1" gdb_test "print foo.three_tdef'last" \ - " = 3" + " = 3" gdb_test "print foo.three_tdef'length" \ - " = 3" + " = 3" gdb_test "print foo.five" \ - " = \\(2 => 5, 8, 13, 21, 34\\)" + " = \\(2 => 5, 8, 13, 21, 34\\)" gdb_test "ptype foo.five" \ - "type = array \\(<>\\) of integer" + "type = array \\(<>\\) of integer" gdb_test "ptype foo.array_type" \ - "type = array \\(<>\\) of integer" + "type = array \\(<>\\) of integer" # foo.five gdb_test "print foo.five(2)" \ - " = 5" + " = 5" gdb_test "print foo.five(3)" \ - " = 8" + " = 8" gdb_test "print foo.five(4)" \ - " = 13" + " = 13" gdb_test "print foo.five(5)" \ - " = 21" + " = 21" gdb_test "print foo.five(6)" \ - " = 34" + " = 34" gdb_test "print foo.five'first" \ - " = 2" + " = 2" gdb_test "print foo.five'last" \ - " = 6" + " = 6" gdb_test "print foo.five'length" \ - " = 5" + " = 5" # foo.five_tdef gdb_test "print foo.five_tdef.all" \ - " = \\(2 => 5, 8, 13, 21, 34\\)" + " = \\(2 => 5, 8, 13, 21, 34\\)" gdb_test "ptype foo.five_tdef" \ - "type = access array \\(<>\\) of integer" + "type = access array \\(<>\\) of integer" gdb_test "print foo.five_tdef(2)" \ - " = 5" + " = 5" gdb_test "print foo.five_tdef(3)" \ - " = 8" + " = 8" gdb_test "print foo.five_tdef(4)" \ - " = 13" + " = 13" gdb_test "print foo.five_tdef(5)" \ - " = 21" + " = 21" gdb_test "print foo.five_tdef(6)" \ - " = 34" + " = 34" gdb_test "print foo.five_tdef'first" \ - " = 2" + " = 2" gdb_test "print foo.five_tdef'last" \ - " = 6" + " = 6" gdb_test "print foo.five_tdef'length" \ - " = 5" + " = 5" diff --git a/gdb/testsuite/gdb.dwarf2/dup-psym.S b/gdb/testsuite/gdb.dwarf2/dup-psym.S index 9a08edaedaf..73520ba8cf9 100644 --- a/gdb/testsuite/gdb.dwarf2/dup-psym.S +++ b/gdb/testsuite/gdb.dwarf2/dup-psym.S @@ -142,7 +142,7 @@ func_cu1: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.S b/gdb/testsuite/gdb.dwarf2/dw2-basic.S index e8ae42d60cc..11e5493eb11 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-basic.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.S @@ -143,7 +143,7 @@ func_cu1: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S index 598190fd9a1..a650fe1660e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S @@ -151,7 +151,7 @@ gcc43: .globl gcc43 .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 4 /* opcode_base */ /* Standard lengths */ @@ -200,7 +200,7 @@ gcc43: .globl gcc43 .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 4 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.S b/gdb/testsuite/gdb.dwarf2/dw2-compressed.S index e14ffc7dce5..4e0e551f827 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.S @@ -90,7 +90,7 @@ func_cu1: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-const.S b/gdb/testsuite/gdb.dwarf2/dw2-const.S index f9d96aa3161..44143ae2b08 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-const.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-const.S @@ -195,7 +195,7 @@ func_cu1: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp index 66adcc8c7ac..cbffbba01da 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp @@ -127,141 +127,141 @@ if {![runto_main]} { gdb_test_no_output "set lang ada" gdb_test "print pck.fp1_var" \ - " = 0.25" + " = 0.25" gdb_test "print /x pck.fp1_var" \ - " = 0x0" + " = 0x0" gdb_test "print pck.fp2_var" \ - " = -0.01" + " = -0.01" gdb_test "print /x pck.fp2_var" \ - " = 0x0" + " = 0x0" gdb_test "print pck.fp3_var" \ - " = 0.1" + " = 0.1" gdb_test "print /x pck.fp3_var" \ - " = 0x0" + " = 0x0" gdb_test "print pck.fp1_range_var" \ - " = 1" + " = 1" gdb_test "print /x pck.fp1_range_var" \ - " = 0x1" + " = 0x1" gdb_test "print pck.fp1_var + 0.25" \ - " = 0.5" + " = 0.5" gdb_test "print pck.fp2_var - pck.fp2_var" \ - " = 0" + " = 0" gdb_test "print pck.fp3_var * 1" \ - " = 0.1" + " = 0.1" gdb_test "print pck.fp3_var / pck.fp3_var" \ - " = 1" + " = 1" gdb_test "print pck.fp3_var / 0" \ - "Division by zero" + "Division by zero" gdb_test "print pck.fp1_range_var - 0.5" \ - " = 0.5" + " = 0.5" gdb_test "print -pck.fp1_var" \ - " = -0.25" + " = -0.25" gdb_test "print pck.fp1_var = pck.fp1_var" \ - " = true" + " = true" gdb_test "print pck.fp1_var = pck.fp1_var2" \ - " = false" + " = false" gdb_test "print pck.fp1_var /= pck.fp1_var" \ - " = false" + " = false" gdb_test "print pck.fp1_var /= pck.fp1_var2" \ - " = true" + " = true" gdb_test "print pck.fp1_var < pck.fp1_var" \ - " = false" + " = false" gdb_test "print pck.fp1_var < pck.fp1_var2" \ - " = true" + " = true" gdb_test "print pck.fp1_var <= pck.fp1_var2" \ - " = true" + " = true" gdb_test "print pck.fp1_var <= pck.fp1_var" \ - " = true" + " = true" gdb_test "print pck.fp1_var > pck.fp1_var2" \ - " = false" + " = false" gdb_test "print pck.fp1_var2 > pck.fp1_var" \ - " = true" + " = true" gdb_test "print pck.fp1_var >= pck.fp1_var" \ - " = true" + " = true" gdb_test "print pck.fp1_var >= pck.fp1_var2" \ - " = false" + " = false" # Same as above, but with litterals... gdb_test "print pck.fp1_var = 0.25" \ - " = true" + " = true" gdb_test "print pck.fp1_var = 0.5" \ - " = false" + " = false" gdb_test "print pck.fp1_var = 1" \ - " = false" + " = false" gdb_test "print pck.fp1_var /= 0.25" \ - " = false" + " = false" gdb_test "print pck.fp1_var /= 0.5" \ - " = true" + " = true" gdb_test "print pck.fp1_var /= 1" \ - " = true" + " = true" gdb_test "print pck.fp1_var < 0.25" \ - " = false" + " = false" gdb_test "print pck.fp1_var < 0.5" \ - " = true" + " = true" gdb_test "print pck.fp1_var < 1" \ - " = true" + " = true" gdb_test "print pck.fp1_var <= 0.25" \ - " = true" + " = true" gdb_test "print pck.fp1_var <= 0.5" \ - " = true" + " = true" gdb_test "print pck.fp1_var <= 1" \ - " = true" + " = true" gdb_test "print pck.fp1_var > 0.25" \ - " = false" + " = false" gdb_test "print pck.fp1_var > 0.5" \ - " = false" + " = false" gdb_test "print pck.fp1_var > 1" \ - " = false" + " = false" gdb_test "print pck.fp1_var >= 0.25" \ - " = true" + " = true" gdb_test "print pck.fp1_var >= 0.5" \ - " = false" + " = false" gdb_test "print pck.fp1_var >= 1" \ - " = false" + " = false" # Set the language to LANG and do a ptype test on pck__fp1_var, @@ -270,48 +270,47 @@ gdb_test "print pck.fp1_var >= 1" \ proc do_ptype_test {lang fp1_re fp2_re fp3_re fp1_range_re} { with_test_prefix "lang=$lang" { - gdb_test_no_output "set language $lang" \ - "set language to $lang for ptype test" + gdb_test_no_output "set language $lang" \ + "set language to $lang for ptype test" - gdb_test "ptype pck__fp1_var" $fp1_re + gdb_test "ptype pck__fp1_var" $fp1_re - gdb_test "ptype pck__fp2_var" $fp2_re + gdb_test "ptype pck__fp2_var" $fp2_re - gdb_test "ptype pck__fp3_var" $fp3_re + gdb_test "ptype pck__fp3_var" $fp3_re - gdb_test "ptype pck__fp1_range_var" $fp1_range_re + gdb_test "ptype pck__fp1_range_var" $fp1_range_re } } do_ptype_test "ada" \ - " = <1-byte fixed point \\(small = 1/16\\)>" \ - " = <1-byte fixed point \\(small = 1/100\\)>" \ - " = <1-byte fixed point \\(small = 1/30\\)>" \ - " = <1-byte fixed point \\(small = 1/16\\)>" + " = <1-byte fixed point \\(small = 1/16\\)>" \ + " = <1-byte fixed point \\(small = 1/100\\)>" \ + " = <1-byte fixed point \\(small = 1/30\\)>" \ + " = <1-byte fixed point \\(small = 1/16\\)>" foreach lang [list "c" "d" "go" "objective-c" "opencl" ] { do_ptype_test $lang \ - " = 1-byte fixed point \\(small = 1/16\\)" \ - " = 1-byte fixed point \\(small = 1/100\\)" \ - " = 1-byte fixed point \\(small = 1/30\\)" \ - " = " + " = 1-byte fixed point \\(small = 1/16\\)" \ + " = 1-byte fixed point \\(small = 1/100\\)" \ + " = 1-byte fixed point \\(small = 1/30\\)" \ + " = " } do_ptype_test "fortran" \ - " = pck__fp1_type" \ - " = pck__fp2_type" \ - " = pck__fp3_type" \ - " = " + " = pck__fp1_type" \ + " = pck__fp2_type" \ + " = pck__fp3_type" \ + " = " do_ptype_test "modula-2" \ - " = pck__fp1_type" \ - " = pck__fp2_type" \ - " = pck__fp3_type" \ - " = \\\[1-byte fixed point \\(small = 1/16\\)\\.\\.1-byte fixed point \\(small = 1/16\\)\\\]" + " = pck__fp1_type" \ + " = pck__fp2_type" \ + " = pck__fp3_type" \ + " = \\\[1-byte fixed point \\(small = 1/16\\)\\.\\.1-byte fixed point \\(small = 1/16\\)\\\]" do_ptype_test "pascal" \ - " = pck__fp1_type" \ - " = pck__fp2_type" \ - " = pck__fp3_type" \ - " = 1-byte fixed point \\(small = 1/16\\)\\.\\.1-byte fixed point \\(small = 1/16\\)" - + " = pck__fp1_type" \ + " = pck__fp2_type" \ + " = pck__fp3_type" \ + " = 1-byte fixed point \\(small = 1/16\\)\\.\\.1-byte fixed point \\(small = 1/16\\)" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.S b/gdb/testsuite/gdb.dwarf2/dw2-intercu.S index 879b4b07ea2..93e8fa49c5a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.S @@ -260,7 +260,7 @@ func_cu1: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.S b/gdb/testsuite/gdb.dwarf2/dw2-intermix.S index 04be4b6851b..1e27c26218a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.S @@ -144,7 +144,7 @@ func_cu1: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.c b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.c index 2a260ecccb6..a6e04248de8 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.c @@ -59,4 +59,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S index 653568187ec..dcd15ce4b25 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S @@ -125,7 +125,7 @@ inner: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S index 6ae68f91661..aba2e2bd9bc 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S @@ -149,7 +149,7 @@ outer_after: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp index 90941b29238..25b3c0ee2e3 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp @@ -37,7 +37,7 @@ clean_restart $executable_outer set host_binfile_inner [gdb_remote_download host $binfile_inner] gdb_test "add-symbol-file $host_binfile_inner outer_inner" \ - {Reading symbols from .*\.\.\.} "add-symbol-file" \ + {Reading symbols from .*\.\.\.} "add-symbol-file" \ "\r\n\t\\.text_addr = 0x\[0-9a-f\]+\r\n\\(y or n\\) \$" "y" # Expand symtab for ${binfile_outer}. diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S index d054fc5660a..f51d7f30a20 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S @@ -267,7 +267,7 @@ int_param_two_reg_pieces: .quad .Ltext5b /* start */ .quad .Ltext7-.Ltext5b /* length */ /* Instructions */ - .byte 0x4 + .byte 0x4 .long .Ltext6-.Ltext5b .byte 0xe .uleb128 0x10 @@ -282,7 +282,7 @@ int_param_two_reg_pieces: .quad .Ltext8 /* start */ .quad .Ltext10-.Ltext8 /* length */ /* Instructions */ - .byte 0x4 + .byte 0x4 .long .Ltext9-.Ltext8 .byte 0xe .uleb128 0x10 @@ -297,7 +297,7 @@ int_param_two_reg_pieces: .quad .Ltext11 /* start */ .quad .Ltext13-.Ltext11 /* length */ /* Instructions */ - .byte 0x4 + .byte 0x4 .long .Ltext12-.Ltext11 .byte 0xe .uleb128 0x10 @@ -312,7 +312,7 @@ int_param_two_reg_pieces: .quad .Ltext14 /* start */ .quad .Ltext16-.Ltext14 /* length */ /* Instructions */ - .byte 0x4 + .byte 0x4 .long .Ltext15-.Ltext14 .byte 0xe .uleb128 0x10 @@ -327,7 +327,7 @@ int_param_two_reg_pieces: .quad .Ltext1 /* start */ .quad .Ltext3-.Ltext1 /* length */ /* Instructions */ - .byte 0x4 + .byte 0x4 .long .Ltext2-.Ltext1 .byte 0xe .uleb128 0x10 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.S b/gdb/testsuite/gdb.dwarf2/dw2-producer.S index fd3d1a5d64f..6fc98c77617 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-producer.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.S @@ -144,7 +144,7 @@ func_cu1: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.c b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.c index 0f3a83eda38..6164c7abb0c 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.c @@ -33,4 +33,3 @@ main (void) asm ("main_label: .globl main_label"); frame2 (); } - diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func-hi-cold.c b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func-hi-cold.c index e0afaed1446..b0ca422cebf 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func-hi-cold.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func-hi-cold.c @@ -79,4 +79,3 @@ main (void) asm ("main_label2: .globl main_label2"); return 0; /* main return */ } /* main end */ - diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func-lo-cold.c b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func-lo-cold.c index 8b9eff1a7bd..d5acc2b36ed 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func-lo-cold.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func-lo-cold.c @@ -79,4 +79,3 @@ main (void) asm ("main_label2: .globl main_label2"); return 0; /* main return */ } /* main end */ - diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp index 5e452555a76..c5155f2d311 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp @@ -170,7 +170,7 @@ proc do_test {suffix} { DW_LNE_end_sequence DW_LNE_set_address $foo_cold_start - line [gdb_get_line_number "foo_cold prologue"] + line [gdb_get_line_number "foo_cold prologue"] DW_LNS_copy DW_LNE_set_address foo_cold_label line [gdb_get_line_number "foo_cold baz call"] @@ -351,7 +351,7 @@ proc do_test {suffix} { set test "x/2i foo_cold" gdb_test_multiple $test $test { -re " (?:$hex) .*?\n (?:$hex) .*${gdb_prompt}" { - set foo_cold_offset $expect_out(1,string) + set foo_cold_offset $expect_out(1,string) pass $test } } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp index 154023e8449..f51e695a664 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp @@ -19,10 +19,10 @@ require dwarf2_support standard_testfile .S -func.c -main.c lassign [function_range func_nofb \ - "${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}"] \ + "${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}"] \ func_nofb_start func_nofb_len lassign [function_range func_loopfb \ - "${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}"] \ + "${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}"] \ func_loopfb_start func_loopfb_len set flags {} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.c b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.c index fbaf193ee7e..753936ae29e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.c @@ -41,4 +41,3 @@ main (void) return 0; } - 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 e9c405ebf7d..e4eaf43ecbf 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 @@ -114,4 +114,3 @@ gdb_continue_to_breakpoint "bar" gdb_test "step" [multi_line \ "main \\(\\) at \[^\r\n\]*$srcfile:36" \ "36\t\[^\r\n\]*"] - diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.c b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.c index cb62f95da78..eda7b9a2c03 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.c @@ -29,4 +29,3 @@ main (void) { return obj.field; } - diff --git a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp index 11c63292ca0..5349cc4b00d 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp @@ -149,24 +149,24 @@ set dwarf_error "DWARF Error: DW_FORM_strp used without required section" # behavior). set pattern1 \ [multi_line \ - $line1 \ - $dwarf_error \ - "\\(No debugging symbols \[^\r\n\]+\\)"] + $line1 \ + $dwarf_error \ + "\\(No debugging symbols \[^\r\n\]+\\)"] # This pattern is hit when GDB does use -readnow (e.g. running with # --target_board=readnow). set pattern2 \ [multi_line \ - $line1 \ - "Expanding full symbols from \[^\r\n\]+" \ - $dwarf_error] + $line1 \ + "Expanding full symbols from \[^\r\n\]+" \ + $dwarf_error] # This pattern is hit when gcc adds an index (e.g. running with # --target_board=cc-with-gdb-index). set pattern3 \ [multi_line \ - $line1 \ - $dwarf_error] + $line1 \ + $dwarf_error] # Load the executable, we expect an error from the DWARF parser. gdb_test "file $binfile_no_debug_str" "($pattern1|$pattern2|$pattern3)" \ diff --git a/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.cc b/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.cc index 1df0da2424c..a9c9e0a6f3a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.cc +++ b/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.cc @@ -46,16 +46,16 @@ tree_insert (node *root, int val) if (val < root->id) { if (root->left) - tree_insert (root->left, val); + tree_insert (root->left, val); else - root->left = make_node(val); + root->left = make_node(val); } else if (val > root->id) { if (root->right) - tree_insert (root->right, val); + tree_insert (root->right, val); else - root->right = make_node(val); + root->right = make_node(val); } } @@ -69,16 +69,16 @@ inorder (node *root) node *curr = todo.back(); todo.pop_back(); /* break-here */ if (curr->visited) - std::cout << curr->id << " "; + std::cout << curr->id << " "; else - { - curr->visited = true; - if (curr->right) - todo.push_back (curr->right); - todo.push_back (curr); - if (curr->left) - todo.push_back (curr->left); - } + { + curr->visited = true; + if (curr->right) + todo.push_back (curr->right); + todo.push_back (curr); + if (curr->left) + todo.push_back (curr->left); + } } } diff --git a/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp b/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp index 9a34157e649..108042cca4b 100644 --- a/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp +++ b/gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp @@ -24,7 +24,7 @@ standard_testfile .cc # we let that be the test of whether the target supports it. if { [prepare_for_testing "failed to prepare" "${testfile}" \ - $srcfile {debug c++ dwarf5 additional_flags=-O0}] } { + $srcfile {debug c++ dwarf5 additional_flags=-O0}] } { return -1 } diff --git a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.c b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.c index 84f13b9a11d..54e331e36cf 100644 --- a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.c +++ b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.c @@ -37,4 +37,3 @@ main () return 0; } - diff --git a/gdb/testsuite/gdb.dwarf2/formdata16.exp b/gdb/testsuite/gdb.dwarf2/formdata16.exp index 96d82116367..49a334ffc71 100644 --- a/gdb/testsuite/gdb.dwarf2/formdata16.exp +++ b/gdb/testsuite/gdb.dwarf2/formdata16.exp @@ -46,7 +46,7 @@ Dwarf::assemble $asm_file { global pair pair2 negative cu { addr_size 4 } { - compile_unit {} { + compile_unit {} { declare_labels int_label sint_label int_label: DW_TAG_base_type { diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp index 3b0187682cf..87571efdedd 100644 --- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp +++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp @@ -28,7 +28,7 @@ Dwarf::assemble $asm_file { # Creating a CU with 4-byte addresses lets this test link on both # 32- and 64-bit machines. cu { addr_size 4 } { - compile_unit {} { + compile_unit {} { declare_labels byte_label size_type_label array_label declare_labels var_label ptr_label diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp index 18d3a348600..c588a73346d 100644 --- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp +++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp @@ -30,7 +30,7 @@ Dwarf::assemble $asm_file { # also check for a sign-extension bug in the # DW_OP_GNU_implicit_pointer code. cu { addr_size 2 } { - compile_unit {} { + compile_unit {} { declare_labels struct_label short_type_label declare_labels char_type_label ptr_label declare_labels var_label diff --git a/gdb/testsuite/gdb.dwarf2/implref-struct.exp b/gdb/testsuite/gdb.dwarf2/implref-struct.exp index b0ea0a1d722..1ae9587e673 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp @@ -117,7 +117,7 @@ Dwarf::assemble ${asm_file} { DW_AT_type :${int_label} DW_AT_external 1 DW_FORM_flag } { - DW_TAG_variable { + DW_TAG_variable { DW_AT_name "ref" DW_AT_type :${ref_label} DW_AT_location { diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp index b51c07aeb06..07841d7aeb8 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp +++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp @@ -70,7 +70,7 @@ Dwarf::assemble $asm_file { DW_AT_abstract_origin %$doit_self_label } } - DW_TAG_variable { + DW_TAG_variable { DW_AT_abstract_origin %$foo_label DW_AT_location 4 data1 } diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp index 1664e68a4fb..919840da9e3 100644 --- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp +++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp @@ -77,7 +77,7 @@ set asm_file [standard_output_file ${::srcfile3}] # symbols will be present for this compilation, because we want to print some # type information. if {[gdb_compile_shlib $libsrc $lib_so \ - {debug}] != ""} { + {debug}] != ""} { untested "failed to compile shared library" return } @@ -157,9 +157,9 @@ Dwarf::assemble ${asm_file} { DW_AT_language @DW_LANG_C_plus_plus DW_AT_name ${::srcfile} DW_AT_stmt_list $L DW_FORM_sec_offset - } { + } { declare_labels int_label class_A_label class_B_label \ - B_ptr_label + B_ptr_label int_label: DW_TAG_base_type { DW_AT_byte_size ${::long_size} DW_FORM_udata @@ -325,7 +325,7 @@ Dwarf::assemble ${asm_file} { # Any debugging information that we need will be provided by the DWARF info # created above. if {[gdb_compile_shlib [list $libsrc $asm_file] $lib_so \ - {nodebug}] != ""} { + {nodebug}] != ""} { untested "failed to compile shared library" return } diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.S b/gdb/testsuite/gdb.dwarf2/mac-fileno.S index 1a66895b5fd..aabf67ee1d5 100644 --- a/gdb/testsuite/gdb.dwarf2/mac-fileno.S +++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.S @@ -145,7 +145,7 @@ func_cu1: .byte 1 /* Minimum insn length */ .byte 1 /* default_is_stmt */ .byte 1 /* line_base */ - .byte 1 /* line_range */ + .byte 1 /* line_range */ .byte 0x10 /* opcode_base */ /* Standard lengths */ diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp index a3eaae90af1..aec18c27fcb 100644 --- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp +++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp @@ -25,7 +25,7 @@ standard_testfile main.c -dw4.S set asm_file [standard_output_file $srcfile2] Dwarf::assemble $asm_file { cu {} { - compile_unit {} { + compile_unit {} { declare_labels typedef_label # This signature is intentionally wrong. diff --git a/gdb/testsuite/gdb.dwarf2/multidictionary.exp b/gdb/testsuite/gdb.dwarf2/multidictionary.exp index 4fdf98572e7..1ea031503c8 100644 --- a/gdb/testsuite/gdb.dwarf2/multidictionary.exp +++ b/gdb/testsuite/gdb.dwarf2/multidictionary.exp @@ -155,4 +155,3 @@ gdb_load $binfile # multidictionaries, it will either crash, assert, or throw an # internal_error. gdb_test "p 1" "= 1" "GDB is alive" - diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp index 0d5943c5818..7c8b1e2e811 100644 --- a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp +++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp @@ -25,7 +25,7 @@ standard_testfile main.c .S set asm_file [standard_output_file $srcfile2] Dwarf::assemble $asm_file { cu {} { - compile_unit { + compile_unit { DW_AT_low_pc 0x104320 DW_FORM_addr DW_AT_high_pc 0x1045ed DW_FORM_addr } { diff --git a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c index 5f608be38d9..0877ec7966c 100644 --- a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c +++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.c @@ -44,4 +44,3 @@ main ( void ) v += foo (v); return v + 5 + s.a; } - diff --git a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp index 259e7e9e2e8..fa1f395c4a8 100644 --- a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp +++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp @@ -46,4 +46,3 @@ gdb_test "p s.b" " = " "print s.b" gdb_test "p s.c" " = " "print s.c" gdb_test "p s.d" " = " "print s.d" gdb_test "p s.d + 1" "value has been optimized out" "print s.d + 1" - diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp index 2826ba790ef..cf21a02f4c5 100644 --- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp +++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp @@ -30,7 +30,7 @@ Dwarf::assemble $asm_file { DW_AT_language @DW_LANG_C DW_AT_name symtab-producer-dw.c DW_AT_comp_dir /tmp - } { + } { declare_labels integer_label integer_label: DW_TAG_base_type { @@ -52,7 +52,7 @@ Dwarf::assemble $asm_file { DW_AT_language @DW_LANG_C DW_AT_name symtab-producer2-dw.c DW_AT_comp_dir /tmp - } { + } { declare_labels integer_label integer_label: DW_TAG_base_type { diff --git a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp index 507c344aeab..010be287289 100644 --- a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp +++ b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp @@ -36,7 +36,7 @@ Dwarf::assemble $asm_file { cu { label cu_start } { DW_TAG_compile_unit { DW_AT_language @DW_LANG_C_plus_plus - } { + } { declare_labels templated_subprogram int int: DW_TAG_base_type { diff --git a/gdb/testsuite/gdb.dwarf2/varval.exp b/gdb/testsuite/gdb.dwarf2/varval.exp index b8f532b2e65..e81eb5dd983 100644 --- a/gdb/testsuite/gdb.dwarf2/varval.exp +++ b/gdb/testsuite/gdb.dwarf2/varval.exp @@ -347,10 +347,10 @@ gdb_test "print *pointerval" "= 3" # referring to integral/pointer typed variables)." gdb_test "print structval" \ - "Type of DW_OP_GNU_variable_value DIE must be an integer or pointer\\." + "Type of DW_OP_GNU_variable_value DIE must be an integer or pointer\\." gdb_test "print untypedval" \ - "Type of DW_OP_GNU_variable_value DIE must be an integer or pointer\\." + "Type of DW_OP_GNU_variable_value DIE must be an integer or pointer\\." if { [setup_exec 1] == -1 } { return -1 @@ -364,4 +364,4 @@ gdb_test "print badval" "value has been optimized out" gdb_test "print bad_die_val1" \ {DWARF Error: could not find unit containing offset 0xabcdef11 \[in module .*/varval\]} gdb_test "print bad_die_val2" \ - "Bad DW_OP_GNU_variable_value DIE\\." + "Bad DW_OP_GNU_variable_value DIE\\." diff --git a/gdb/testsuite/gdb.fortran/array-bounds.f90 b/gdb/testsuite/gdb.fortran/array-bounds.f90 index ad389987e7b..9d2541ce386 100644 --- a/gdb/testsuite/gdb.fortran/array-bounds.f90 +++ b/gdb/testsuite/gdb.fortran/array-bounds.f90 @@ -23,4 +23,3 @@ print *, 'bounds of foo - ', lb, ':', ub stop end - diff --git a/gdb/testsuite/gdb.fortran/array-element.exp b/gdb/testsuite/gdb.fortran/array-element.exp index 7a579554b17..2c6889179c2 100644 --- a/gdb/testsuite/gdb.fortran/array-element.exp +++ b/gdb/testsuite/gdb.fortran/array-element.exp @@ -35,4 +35,3 @@ gdb_continue_to_breakpoint "return" gdb_test "print a(1)" ".*1 = 1.*" "print the first element of array a" gdb_test "print a(2)" ".*2 = 2.*" "print the second element of array a" - diff --git a/gdb/testsuite/gdb.fortran/array-element.f b/gdb/testsuite/gdb.fortran/array-element.f index bb19975cbc3..34e0dfa4e5d 100644 --- a/gdb/testsuite/gdb.fortran/array-element.f +++ b/gdb/testsuite/gdb.fortran/array-element.f @@ -25,7 +25,7 @@ c by Wu Zhou. (woodzltc@cn.ibm.com) subroutine sub(a,n) dimension a(n) - do 100 i = 1, n + do 100 i = 1, n a(i) = i 100 continue return diff --git a/gdb/testsuite/gdb.fortran/derived-type-function.f90 b/gdb/testsuite/gdb.fortran/derived-type-function.f90 index d5c8d29d4dc..a576126bc02 100644 --- a/gdb/testsuite/gdb.fortran/derived-type-function.f90 +++ b/gdb/testsuite/gdb.fortran/derived-type-function.f90 @@ -59,4 +59,3 @@ program rectangle_Test call aRec%print_area end program rectangle_Test - diff --git a/gdb/testsuite/gdb.fortran/derived-type.exp b/gdb/testsuite/gdb.fortran/derived-type.exp index 619c0e4636d..882b601736d 100644 --- a/gdb/testsuite/gdb.fortran/derived-type.exp +++ b/gdb/testsuite/gdb.fortran/derived-type.exp @@ -96,21 +96,21 @@ gdb_test "print this%a" " = 3\\.125" set test "print this%b" gdb_test_multiple $test $test { -re " = 'abcdefg'\r\n$gdb_prompt $" { - pass $test + pass $test } -re $result_line_2 { - setup_xfail "*-*-*" - fail $test + setup_xfail "*-*-*" + fail $test } } set test "print this" gdb_test_multiple $test $test { -re $result_line { - pass $test + pass $test } -re $result_line_2 { - setup_xfail "*-*-*" - fail $test + setup_xfail "*-*-*" + fail $test } } diff --git a/gdb/testsuite/gdb.fortran/dot-ops.exp b/gdb/testsuite/gdb.fortran/dot-ops.exp index 83f47f1293c..10247354d7a 100644 --- a/gdb/testsuite/gdb.fortran/dot-ops.exp +++ b/gdb/testsuite/gdb.fortran/dot-ops.exp @@ -158,4 +158,3 @@ if {[set_lang_fortran]} { } else { warning "$test_name tests suppressed." 0 } - diff --git a/gdb/testsuite/gdb.fortran/function-calls.exp b/gdb/testsuite/gdb.fortran/function-calls.exp index 405a1a1b953..dda948739b0 100644 --- a/gdb/testsuite/gdb.fortran/function-calls.exp +++ b/gdb/testsuite/gdb.fortran/function-calls.exp @@ -33,7 +33,7 @@ with_complaints 5 { -re -wrap "$re_kfail.*" { kfail symtab/27388 $gdb_test_name } - -re "^$cmd_regexp\r\n$gdb_prompt $" { + -re "^$cmd_regexp\r\n$gdb_prompt $" { pass $gdb_test_name } } diff --git a/gdb/testsuite/gdb.fortran/info-modules.exp b/gdb/testsuite/gdb.fortran/info-modules.exp index 5fc86b9d97d..dcfe9b7d1d3 100644 --- a/gdb/testsuite/gdb.fortran/info-modules.exp +++ b/gdb/testsuite/gdb.fortran/info-modules.exp @@ -168,4 +168,3 @@ GDBInfoModuleSymbols::check_entry "${srcfile}" "mod1" "21" \ "${real4} mod1::mod1_var_1;" GDBInfoModuleSymbols::check_no_entry "${srcfile}" ".*" GDBInfoModuleSymbols::check_no_entry "${srcfile2}" ".*" - diff --git a/gdb/testsuite/gdb.fortran/namelist.exp b/gdb/testsuite/gdb.fortran/namelist.exp index fce63142558..c045298a5a4 100644 --- a/gdb/testsuite/gdb.fortran/namelist.exp +++ b/gdb/testsuite/gdb.fortran/namelist.exp @@ -42,12 +42,12 @@ set supported [expr \ && [gcc_major_version {gfortran-*} f90] >= 4.9}] if { $supported } { gdb_test "ptype nml" \ - "type = Type nml\r\n *$int :: a\r\n *$int :: b\r\n *End Type nml" + "type = Type nml\r\n *$int :: a\r\n *$int :: b\r\n *End Type nml" gdb_test "print nml" \ - "\\$\[0-9\]+ = \\( a = 10, b = 20 \\)" + "\\$\[0-9\]+ = \\( a = 10, b = 20 \\)" } else { gdb_test "ptype nml" \ - "No symbol \"nml\" in current context\\." + "No symbol \"nml\" in current context\\." gdb_test "print nml" \ - "No symbol \"nml\" in current context\\." + "No symbol \"nml\" in current context\\." } diff --git a/gdb/testsuite/gdb.fortran/nested-funcs.f90 b/gdb/testsuite/gdb.fortran/nested-funcs.f90 index 0d170413457..d1d25d7beb4 100755 --- a/gdb/testsuite/gdb.fortran/nested-funcs.f90 +++ b/gdb/testsuite/gdb.fortran/nested-funcs.f90 @@ -1,107 +1,107 @@ -! Copyright 2016-2025 Free Software Foundation, Inc. -! -! This program is free software; you can redistribute it and/or modify -! it under the terms of the GNU General Public License as published by -! the Free Software Foundation; either version 3 of the License, or -! (at your option) any later version. -! -! This program is distributed in the hope that it will be useful, -! but WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -! GNU General Public License for more details. -! -! You should have received a copy of the GNU General Public License -! along with this program. If not, see . - -module mod1 - integer :: var_i = 1 - integer :: var_const - parameter (var_const = 20) - -CONTAINS - - SUBROUTINE sub_nested_outer - integer :: local_int - character (len=20) :: name - - name = 'sub_nested_outer_mod1' - local_int = 11 - - END SUBROUTINE sub_nested_outer -end module mod1 - -! Public sub_nested_outer -SUBROUTINE sub_nested_outer - integer :: local_int - character (len=16) :: name - - name = 'sub_nested_outer external' - local_int = 11 -END SUBROUTINE sub_nested_outer - -! Needed indirection to call public sub_nested_outer from main -SUBROUTINE sub_nested_outer_ind - character (len=20) :: name - - name = 'sub_nested_outer_ind' - CALL sub_nested_outer -END SUBROUTINE sub_nested_outer_ind - -! public routine with internal subroutine -SUBROUTINE sub_with_sub_nested_outer() - integer :: local_int - character (len=16) :: name - - name = 'subroutine_with_int_sub' - local_int = 1 - - CALL sub_nested_outer ! Should call the internal fct - -CONTAINS - - SUBROUTINE sub_nested_outer - integer :: local_int - local_int = 11 - END SUBROUTINE sub_nested_outer - -END SUBROUTINE sub_with_sub_nested_outer - -! Main -program TestNestedFuncs - USE mod1, sub_nested_outer_use_mod1 => sub_nested_outer - IMPLICIT NONE - - TYPE :: t_State - integer :: code - END TYPE t_State - - TYPE (t_State) :: v_state - integer index, local_int - - index = 13 - CALL sub_nested_outer ! Call internal sub_nested_outer - CALL sub_nested_outer_ind ! Call external sub_nested_outer via sub_nested_outer_ind - CALL sub_with_sub_nested_outer ! Call external routine with nested sub_nested_outer - CALL sub_nested_outer_use_mod1 ! Call sub_nested_outer imported via module - index = 11 ! BP_main - v_state%code = 27 - -CONTAINS - - SUBROUTINE sub_nested_outer - integer local_int - local_int = 19 - v_state%code = index + local_int ! BP_outer - call sub_nested_inner - local_int = 22 ! BP_outer_2 - RETURN - END SUBROUTINE sub_nested_outer - - SUBROUTINE sub_nested_inner - integer local_int - local_int = 17 - v_state%code = index + local_int ! BP_inner - RETURN - END SUBROUTINE sub_nested_inner - -end program TestNestedFuncs +! Copyright 2016-2025 Free Software Foundation, Inc. +! +! This program is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Public License as published by +! the Free Software Foundation; either version 3 of the License, or +! (at your option) any later version. +! +! This program is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU General Public License for more details. +! +! You should have received a copy of the GNU General Public License +! along with this program. If not, see . + +module mod1 + integer :: var_i = 1 + integer :: var_const + parameter (var_const = 20) + +CONTAINS + + SUBROUTINE sub_nested_outer + integer :: local_int + character (len=20) :: name + + name = 'sub_nested_outer_mod1' + local_int = 11 + + END SUBROUTINE sub_nested_outer +end module mod1 + +! Public sub_nested_outer +SUBROUTINE sub_nested_outer + integer :: local_int + character (len=16) :: name + + name = 'sub_nested_outer external' + local_int = 11 +END SUBROUTINE sub_nested_outer + +! Needed indirection to call public sub_nested_outer from main +SUBROUTINE sub_nested_outer_ind + character (len=20) :: name + + name = 'sub_nested_outer_ind' + CALL sub_nested_outer +END SUBROUTINE sub_nested_outer_ind + +! public routine with internal subroutine +SUBROUTINE sub_with_sub_nested_outer() + integer :: local_int + character (len=16) :: name + + name = 'subroutine_with_int_sub' + local_int = 1 + + CALL sub_nested_outer ! Should call the internal fct + +CONTAINS + + SUBROUTINE sub_nested_outer + integer :: local_int + local_int = 11 + END SUBROUTINE sub_nested_outer + +END SUBROUTINE sub_with_sub_nested_outer + +! Main +program TestNestedFuncs + USE mod1, sub_nested_outer_use_mod1 => sub_nested_outer + IMPLICIT NONE + + TYPE :: t_State + integer :: code + END TYPE t_State + + TYPE (t_State) :: v_state + integer index, local_int + + index = 13 + CALL sub_nested_outer ! Call internal sub_nested_outer + CALL sub_nested_outer_ind ! Call external sub_nested_outer via sub_nested_outer_ind + CALL sub_with_sub_nested_outer ! Call external routine with nested sub_nested_outer + CALL sub_nested_outer_use_mod1 ! Call sub_nested_outer imported via module + index = 11 ! BP_main + v_state%code = 27 + +CONTAINS + + SUBROUTINE sub_nested_outer + integer local_int + local_int = 19 + v_state%code = index + local_int ! BP_outer + call sub_nested_inner + local_int = 22 ! BP_outer_2 + RETURN + END SUBROUTINE sub_nested_outer + + SUBROUTINE sub_nested_inner + integer local_int + local_int = 17 + v_state%code = index + local_int ! BP_inner + RETURN + END SUBROUTINE sub_nested_inner + +end program TestNestedFuncs diff --git a/gdb/testsuite/gdb.fortran/oop_extend_type.exp b/gdb/testsuite/gdb.fortran/oop_extend_type.exp index 9f443d9fe2d..f4f1aeb47c1 100755 --- a/gdb/testsuite/gdb.fortran/oop_extend_type.exp +++ b/gdb/testsuite/gdb.fortran/oop_extend_type.exp @@ -63,9 +63,9 @@ set output_pass_wp [multi_line "type = Type, extends\\(point\\) :: waypoint" \ " $real :: angle" \ "End Type waypoint(, allocatable)?"] set output_kfail_wp [multi_line "type = Type waypoint" \ - " Type point :: point" \ - " $real :: angle" \ - "End Type waypoint(, allocatable)?"] + " Type point :: point" \ + " $real :: angle" \ + "End Type waypoint(, allocatable)?"] set test "ptype wp" gdb_test_multiple "$test" "$test" { diff --git a/gdb/testsuite/gdb.fortran/print_type.exp b/gdb/testsuite/gdb.fortran/print_type.exp index 6d2457f13ee..9996e3eeb02 100755 --- a/gdb/testsuite/gdb.fortran/print_type.exp +++ b/gdb/testsuite/gdb.fortran/print_type.exp @@ -84,9 +84,9 @@ gdb_breakpoint [gdb_get_line_number "Before value assignment"] gdb_continue_to_breakpoint "Before value assignment" gdb_test "ptype twop" \ [multi_line "type = PTR TO -> \\( Type two" \ - " $int, allocatable :: ivla1\\(:\\)" \ - " $int, allocatable :: ivla2\\(:,:\\)" \ - "End Type two \\)"] + " $int, allocatable :: ivla1\\(:\\)" \ + " $int, allocatable :: ivla2\\(:,:\\)" \ + "End Type two \\)"] gdb_breakpoint [gdb_get_line_number "After value assignment"] gdb_continue_to_breakpoint "After value assignment" @@ -106,10 +106,10 @@ gdb_test "ptype intp" "type = PTR TO -> \\( $int \\)" set test "ptype intap" gdb_test_multiple $test $test { -re "type = $int \\(10,2\\)\r\n$gdb_prompt $" { - pass $test + pass $test } -re "type = PTR TO -> \\( $int \\(10,2\\)\\)\r\n$gdb_prompt $" { - pass $test + pass $test } } gdb_test "ptype realp" "type = PTR TO -> \\( $real \\)" diff --git a/gdb/testsuite/gdb.fortran/ptr-indentation.exp b/gdb/testsuite/gdb.fortran/ptr-indentation.exp index 1671627bd03..8f336fe09f6 100644 --- a/gdb/testsuite/gdb.fortran/ptr-indentation.exp +++ b/gdb/testsuite/gdb.fortran/ptr-indentation.exp @@ -35,6 +35,6 @@ gdb_continue_to_breakpoint "BP1" # Check the indentation when using ptype on pointers in user-defined types. gdb_test "ptype tinsta" \ [multi_line "type = Type tuserdef" \ - " $int :: i" \ - " PTR TO -> \\( $real :: ptr \\)" \ - "End Type tuserdef"] + " $int :: i" \ + " PTR TO -> \\( $real :: ptr \\)" \ + "End Type tuserdef"] diff --git a/gdb/testsuite/gdb.fortran/subarray.f b/gdb/testsuite/gdb.fortran/subarray.f index 2ced37c3190..3b475d68a1e 100644 --- a/gdb/testsuite/gdb.fortran/subarray.f +++ b/gdb/testsuite/gdb.fortran/subarray.f @@ -21,7 +21,7 @@ c by Wu Zhou. (woodzltc@cn.ibm.com) character *7 str integer array(7) -c Initialize character array "str" and integer array "array". +c Initialize character array "str" and integer array "array". str = 'abcdefg' do i = 1, 7 array(i) = i diff --git a/gdb/testsuite/gdb.fortran/vla-type.exp b/gdb/testsuite/gdb.fortran/vla-type.exp index b560d46b2c3..1f7b1c52851 100755 --- a/gdb/testsuite/gdb.fortran/vla-type.exp +++ b/gdb/testsuite/gdb.fortran/vla-type.exp @@ -45,9 +45,9 @@ gdb_test "print onev%ivla(5, 11, 23)" " = 1" gdb_test "print onev%ivla(1, 2, 3)" " = 123" gdb_test "print onev%ivla(3, 2, 1)" " = 321" gdb_test "ptype onev" \ - [multi_line "type = Type one" \ - "\\s+$int, allocatable :: ivla\\\(11,22,33\\\)" \ - "End Type one" ] + [multi_line "type = Type one" \ + "\\s+$int, allocatable :: ivla\\\(11,22,33\\\)" \ + "End Type one" ] # Check type with two VLA's inside gdb_breakpoint [gdb_get_line_number "twov-filled"] @@ -56,10 +56,10 @@ gdb_test "print twov%ivla1(5, 11, 23)" " = 1" gdb_test "print twov%ivla1(1, 2, 3)" " = 123" gdb_test "print twov%ivla1(3, 2, 1)" " = 321" gdb_test "ptype twov" \ - [multi_line "type = Type two" \ - "\\s+$int, allocatable :: ivla1\\\(5,12,99\\\)" \ - "\\s+$int, allocatable :: ivla2\\\(9,12\\\)" \ - "End Type two" ] + [multi_line "type = Type two" \ + "\\s+$int, allocatable :: ivla1\\\(5,12,99\\\)" \ + "\\s+$int, allocatable :: ivla2\\\(9,12\\\)" \ + "End Type two" ] gdb_test "print twov" " = \\\( ivla1 = \\\(\\\(\\\(1, 1, 1, 1, 1\\\)\ \\\(1, 1, 321, 1, 1\\\)\ \\\(1, 1, 1, 1, 1\\\) .*" @@ -72,10 +72,10 @@ gdb_test "print threev%ivla(5)" " = 42" gdb_test "print threev%ivla(14)" " = 24" gdb_test "print threev%ivar" " = 3" gdb_test "ptype threev" \ - [multi_line "type = Type three" \ - "\\s+$int :: ivar" \ - "\\s+$int, allocatable :: ivla\\\(20\\\)" \ - "End Type three" ] + [multi_line "type = Type three" \ + "\\s+$int :: ivar" \ + "\\s+$int, allocatable :: ivla\\\(20\\\)" \ + "End Type three" ] # Check type with attribute at end of type gdb_breakpoint [gdb_get_line_number "fourv-filled"] @@ -86,10 +86,10 @@ gdb_test "print fourv%ivla(7)" " = 7" gdb_test "print fourv%ivla(12)" "no such vector element" gdb_test "print fourv%ivar" " = 3" gdb_test "ptype fourv" \ - [multi_line "type = Type four" \ - "\\s+$int, allocatable :: ivla\\\(10\\\)" \ - "\\s+$int :: ivar" \ - "End Type four" ] + [multi_line "type = Type four" \ + "\\s+$int, allocatable :: ivla\\\(10\\\)" \ + "\\s+$int :: ivar" \ + "End Type four" ] # Check nested types containing a VLA gdb_breakpoint [gdb_get_line_number "fivev-filled"] @@ -98,13 +98,13 @@ gdb_test "print fivev%tone%ivla(5, 5, 1)" " = 1" gdb_test "print fivev%tone%ivla(1, 2, 3)" " = 123" gdb_test "print fivev%tone%ivla(3, 2, 1)" " = 321" gdb_test "ptype fivev" \ - [multi_line "type = Type five" \ - "\\s+Type one :: tone" \ - "End Type five" ] + [multi_line "type = Type five" \ + "\\s+Type one :: tone" \ + "End Type five" ] gdb_test "ptype fivev%tone" \ - [multi_line "type = Type one" \ - " $int, allocatable :: ivla\\(10,10,10\\)" \ - "End Type one" ] + [multi_line "type = Type one" \ + " $int, allocatable :: ivla\\(10,10,10\\)" \ + "End Type one" ] # Check array of types containing a VLA gdb_breakpoint [gdb_get_line_number "fivearr-filled"] @@ -115,38 +115,38 @@ gdb_test "print fivearr(1)%tone%ivla(2, 2, 3)" " = 223" gdb_test "print fivearr(2)%tone%ivla(12, 14, 16)" " = 2" gdb_test "print fivearr(2)%tone%ivla(6, 7, 8)" " = 678" gdb_test "ptype fivearr(1)" \ - [multi_line "type = Type five" \ - "\\s+Type one :: tone" \ - "End Type five" ] + [multi_line "type = Type five" \ + "\\s+Type one :: tone" \ + "End Type five" ] gdb_test "ptype fivearr(1)%tone" \ - [multi_line "type = Type one" \ - " $int, allocatable :: ivla\\(2,4,6\\)" \ - "End Type one" ] + [multi_line "type = Type one" \ + " $int, allocatable :: ivla\\(2,4,6\\)" \ + "End Type one" ] gdb_test "ptype fivearr(2)" \ - [multi_line "type = Type five" \ - "\\s+Type one :: tone" \ - "End Type five" ] + [multi_line "type = Type five" \ + "\\s+Type one :: tone" \ + "End Type five" ] gdb_test "ptype fivearr(2)%tone" \ - [multi_line "type = Type one" \ - " $int, allocatable :: ivla\\(12,14,16\\)" \ - "End Type one" ] + [multi_line "type = Type one" \ + " $int, allocatable :: ivla\\(12,14,16\\)" \ + "End Type one" ] # Check allocation status of dynamic array and it's dynamic members gdb_test "ptype fivedynarr" \ - [multi_line "type = Type five" \ - " Type one :: tone" \ - "End Type five, allocatable \\(:\\)" ] + [multi_line "type = Type five" \ + " Type one :: tone" \ + "End Type five, allocatable \\(:\\)" ] gdb_test "next" "" gdb_test "ptype fivedynarr(2)" \ - [multi_line "type = Type five" \ - "\\s+Type one :: tone" \ - "End Type five" ] \ - "ptype fivedynarr(2), tone is not allocated" + [multi_line "type = Type five" \ + "\\s+Type one :: tone" \ + "End Type five" ] \ + "ptype fivedynarr(2), tone is not allocated" gdb_test "ptype fivedynarr(2)%tone" \ - [multi_line "type = Type one" \ - " $int, allocatable :: ivla\\(:,:,:\\)" \ - "End Type one" ] \ - "ptype fivedynarr(2)%tone, not allocated" + [multi_line "type = Type one" \ + " $int, allocatable :: ivla\\(:,:,:\\)" \ + "End Type one" ] \ + "ptype fivedynarr(2)%tone, not allocated" # Check dynamic array of types containing a VLA gdb_breakpoint [gdb_get_line_number "fivedynarr-filled"] @@ -157,18 +157,18 @@ gdb_test "print fivedynarr(1)%tone%ivla(2, 2, 3)" " = 223" gdb_test "print fivedynarr(2)%tone%ivla(12, 14, 16)" " = 2" gdb_test "print fivedynarr(2)%tone%ivla(6, 7, 8)" " = 678" gdb_test "ptype fivedynarr(1)" \ - [multi_line "type = Type five" \ - "\\s+Type one :: tone" \ - "End Type five" ] + [multi_line "type = Type five" \ + "\\s+Type one :: tone" \ + "End Type five" ] gdb_test "ptype fivedynarr(1)%tone" \ - [multi_line "type = Type one" \ - " $int, allocatable :: ivla\\(2,4,6\\)" \ - "End Type one" ] + [multi_line "type = Type one" \ + " $int, allocatable :: ivla\\(2,4,6\\)" \ + "End Type one" ] gdb_test "ptype fivedynarr(2)" \ - [multi_line "type = Type five" \ - "\\s+Type one :: tone" \ - "End Type five" ] + [multi_line "type = Type five" \ + "\\s+Type one :: tone" \ + "End Type five" ] gdb_test "ptype fivedynarr(2)%tone" \ - [multi_line "type = Type one" \ - " $int, allocatable :: ivla\\(12,14,16\\)" \ - "End Type one" ] + [multi_line "type = Type one" \ + " $int, allocatable :: ivla\\(12,14,16\\)" \ + "End Type one" ] diff --git a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp index ef40dffc5a3..7bf544dd361 100644 --- a/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp +++ b/gdb/testsuite/gdb.fortran/vla-value-sub-finish.exp @@ -52,4 +52,3 @@ gdb_test "p sub_arr1(5, 7)" " = 5" "sub_arr1(5, 7) after finish" gdb_test "p sub_arr1(1, 1)" " = 30" "sub_arr1(1, 1) after finish" gdb_test "p sub_arr2(1, 1, 1)" " = 30" "sub_arr2(1, 1, 1) after finish" gdb_test "p sub_arr2(2, 1, 1)" " = 20" "sub_arr2(2, 1, 1) after finish" - diff --git a/gdb/testsuite/gdb.fortran/whatis_type.exp b/gdb/testsuite/gdb.fortran/whatis_type.exp index 8891eac3959..e3640935443 100644 --- a/gdb/testsuite/gdb.fortran/whatis_type.exp +++ b/gdb/testsuite/gdb.fortran/whatis_type.exp @@ -19,7 +19,7 @@ standard_testfile type.f90 load_lib "fortran.exp" if { [prepare_for_testing "failed to prepare" ${testfile} \ - ${srcfile} {debug f90}] } { + ${srcfile} {debug f90}] } { return -1 } @@ -47,29 +47,29 @@ gdb_test "whatis t3p" "type = PTR TO -> \\( Type t3 \\)" gdb_test "ptype t1" \ [multi_line "type = Type t1" \ - " $t1_i" \ - " $t1_r" \ - "End Type t1"] + " $t1_i" \ + " $t1_r" \ + "End Type t1"] gdb_test "ptype t1v" \ [multi_line "type = Type t1" \ - " $t1_i" \ - " $t1_r" \ - "End Type t1"] + " $t1_i" \ + " $t1_r" \ + "End Type t1"] gdb_test "ptype t2v" \ [multi_line "type = Type t2" \ - " $int :: t2_i" \ - " Type t1 :: t1_n" \ - "End Type t2"] + " $int :: t2_i" \ + " Type t1 :: t1_n" \ + "End Type t2"] gdb_test "ptype t3v" \ [multi_line "type = Type t3" \ - " $int :: t3_i" \ - " Type t2 :: t2_n" \ - "End Type t3"] + " $int :: t3_i" \ + " Type t2 :: t2_n" \ + "End Type t3"] gdb_test "ptype t3p" \ [multi_line "type = PTR TO -> \\( Type t3" \ - " $int :: t3_i" \ - " Type t2 :: t2_n" \ - "End Type t3 \\)"] + " $int :: t3_i" \ + " Type t2 :: t2_n" \ + "End Type t3 \\)"] diff --git a/gdb/testsuite/gdb.guile/scm-pretty-print.scm b/gdb/testsuite/gdb.guile/scm-pretty-print.scm index 9388bcaff0a..399321ca40b 100644 --- a/gdb/testsuite/gdb.guile/scm-pretty-print.scm +++ b/gdb/testsuite/gdb.guile/scm-pretty-print.scm @@ -248,13 +248,13 @@ (hash-set! dict "ss" make-pp_ss-printer) (hash-set! dict "const S &" make-pp_s-printer) (hash-set! dict "SSS" make-pp_sss-printer) - + (hash-set! dict "VirtualTest" make-pp_multiple_virtual-printer) (hash-set! dict "Vbase1" make-pp_vbase1-printer) (hash-set! dict "struct nullstr" make-pp_nullstr-printer) (hash-set! dict "nullstr" make-pp_nullstr-printer) - + ;; Note that we purposely omit the typedef names here. ;; Printer lookup is based on canonical name. ;; However, we do need both tagged and untagged variants, to handle diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp index ea77d8fca54..98a4196e4d8 100644 --- a/gdb/testsuite/gdb.guile/scm-value.exp +++ b/gdb/testsuite/gdb.guile/scm-value.exp @@ -409,7 +409,7 @@ proc test_value_hash {} { "(define one (make-value 1))" "" \ "(define two (make-value 2))" "" \ "(define three (make-value 3))" "" \ - "(define vdict (make-hash-table 5))" "" \ + "(define vdict (make-hash-table 5))" "" \ "(hash-set! vdict one \"one str\")" "" \ "(hash-set! vdict two \"two str\")" "" \ "(hash-set! vdict three \"three str\")" "" \ diff --git a/gdb/testsuite/gdb.linespec/break-asm-file.exp b/gdb/testsuite/gdb.linespec/break-asm-file.exp index 989b1a56043..cfda6b0fc5f 100644 --- a/gdb/testsuite/gdb.linespec/break-asm-file.exp +++ b/gdb/testsuite/gdb.linespec/break-asm-file.exp @@ -63,4 +63,3 @@ gdb_test "delete 2" gdb_test "break $asm_file0:func" \ "Breakpoint 3 at 0x\[0-9a-fA-F\]+: .*$asm_file0.*(2 locations).*" \ "set a break-point at function in all instances for a selected ASM file." - diff --git a/gdb/testsuite/gdb.linespec/linespec.exp b/gdb/testsuite/gdb.linespec/linespec.exp index 86b55bb9497..531986fed86 100644 --- a/gdb/testsuite/gdb.linespec/linespec.exp +++ b/gdb/testsuite/gdb.linespec/linespec.exp @@ -49,12 +49,12 @@ if { [is_remote host] } { untested "breakpoints using dir/file:line" } else { gdb_test "break one/thefile.cc:$l1" \ - "Breakpoint $decimal at $hex: file .*thefile.cc, line $l1." \ - "single-location break using dir/file:line" + "Breakpoint $decimal at $hex: file .*thefile.cc, line $l1." \ + "single-location break using dir/file:line" gdb_test "clear one/thefile.cc:$l1" \ - "Deleted breakpoint $decimal *" \ - "clear breakpoint using dir/file:line" + "Deleted breakpoint $decimal *" \ + "clear breakpoint using dir/file:line" if { [readline_is_used] } { # There are functions named 'twodup' in both source files. diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp b/gdb/testsuite/gdb.linespec/ls-errs.exp index 56f946720bb..f8be32f9a8b 100644 --- a/gdb/testsuite/gdb.linespec/ls-errs.exp +++ b/gdb/testsuite/gdb.linespec/ls-errs.exp @@ -25,7 +25,7 @@ proc do_test {lang} { if {[info exists compiler_info]} { # Unsetting compiler_info allows us to switch compilers # used by prepare_for_testing. - unset compiler_info + unset compiler_info } set options {debug} diff --git a/gdb/testsuite/gdb.mi/ChangeLog-1999-2003 b/gdb/testsuite/gdb.mi/ChangeLog-1999-2003 index 6f263c33056..6170b85d698 100644 --- a/gdb/testsuite/gdb.mi/ChangeLog-1999-2003 +++ b/gdb/testsuite/gdb.mi/ChangeLog-1999-2003 @@ -211,7 +211,7 @@ * mi-stack.exp: Update. Output for args=... and locals=... changed to a list. - + 2001-06-26 Andrew Cagney * mi-stack.exp: Update. Output for stack=..., args=... and @@ -315,7 +315,7 @@ * mi0-var-cmd.exp: Copy mi-var-cmd.exp. * mi0-var-display.exp: Copy mi-var-display.exp. * mi0-watch.exp: Copy mi-watch.exp. - + 2001-05-11 Fernando Nasser * mi-var-child.exp: Adjust for the fact that now (char *) can be @@ -341,7 +341,7 @@ Tue Apr 18 15:36:07 2000 Andrew Cagney Tue Mar 14 15:54:57 2000 Andrew Cagney * basics.c: Add EMACS local variable pointing change-log at this - file. + file. * Makefile.in: Ditto 2000-03-13 James Ingham @@ -355,50 +355,50 @@ Tue Mar 14 15:54:57 2000 Andrew Cagney 2000-03-06 Elena Zannoni * mi-disassemble.exp: Don't assume numbers for the offset - values. They can be different depending on the architecture. + values. They can be different depending on the architecture. * mi-watch.exp (test_watchpoint_triggering): In same cases the - type can be 'hw wathcpoint' not just 'watchpoint'. Adjust for that. + type can be 'hw wathcpoint' not just 'watchpoint'. Adjust for that. * basics.c (callee4): Make the function return something, - otherwise the return value is undefined. + otherwise the return value is undefined. 2000-03-06 Elena Zannoni * mi-basics.exp: Comment out test for a still unimplemented operation. * mi-disassemble.exp: Rewrite most of the tests to conform to new - disassemble interface. + disassemble interface. Sat Mar 4 13:55:08 2000 Andrew Cagney From Fri 3 Mar 2000 Peter Schauer: * mi-support.exp (mi_gdb_start): When GDB doesn't recongize -i=mi - option, assume no MI support present. + option, assume no MI support present. 2000-02-01 Elena Zannoni * mi-support.exp (mi_gdb_start): Update to recognize start up - message with 'UI_OUT' instead of 'HEADLESS'. + message with 'UI_OUT' instead of 'HEADLESS'. 2000-01-27 Elena Zannoni * mi-regs.exp (test_running_the_program): Add global var 'hex'. * mi-stack.exp, mi-stepi.exp, mi-until.exp, mi-watch.exp, - mi-var-display.exp, mi-var-cmd.exp, mi-var-child.exp, - mi-var-block.exp: Update all stopped messages. + mi-var-display.exp, mi-var-cmd.exp, mi-var-child.exp, + mi-var-block.exp: Update all stopped messages. 2000-01-17 Elena Zannoni * mi-console.exp, mi-disassemble.exp, mi-eval.exp, - mi-read-memory.exp, mi-regs.exp, mi-return.exp, mi-simplerun.exp: - Update stopped messages, update copyright. - + mi-read-memory.exp, mi-regs.exp, mi-return.exp, mi-simplerun.exp: + Update stopped messages, update copyright. + * mi-disassemble.exp: Update error messages output. - + * mi-support.exp (proc mi_step): Make gdb do a 'step' command, not - a 'next'. Update stopped message. + a 'next'. Update stopped message. (proc mi_next): Update stop message. (proc mi_run_to_main): Update stopped message. Update copyright. @@ -410,27 +410,27 @@ Sat Mar 4 13:55:08 2000 Andrew Cagney * mi-stack.exp: New file, tests for stack commands. * mi-support.exp (mi_run_to_main, mi_next, mi_step) : Update to - include thread-id in stopped message. + include thread-id in stopped message. * mi-regs.exp: Update break-insert output. * (mi-console.exp, mi-disassemble.exp, mi-eval.exp, - mi-read-memory.exp, mi-regs.exp, mi-return.exp, mi-simplerun.exp, - mi-stepi.exp, mi-until.exp, mi-var-block.exp, mi-var-child.exp, - mi-var-cmd.exp, mi-var-display.exp, mi-watch.exp): Update stopped - message to include thread-id. + mi-read-memory.exp, mi-regs.exp, mi-return.exp, mi-simplerun.exp, + mi-stepi.exp, mi-until.exp, mi-var-block.exp, mi-var-child.exp, + mi-var-cmd.exp, mi-var-display.exp, mi-watch.exp): Update stopped + message to include thread-id. Wed Dec 29 22:06:05 1999 Andrew Cagney * mi-watch.exp, mi-var-display.exp, mi-var-cmd.exp, - mi-var-child.exp, mi-var-block.exp, mi-until.exp, mi-stepi.exp, - mi-simplerun.exp, mi-return.exp, mi-support.exp, mi-eval.exp, - mi-console.exp, mi-disassemble.exp, mi-break.exp: Update to - reflect extended output from -break-insert command. - + mi-var-child.exp, mi-var-block.exp, mi-until.exp, mi-stepi.exp, + mi-simplerun.exp, mi-return.exp, mi-support.exp, mi-eval.exp, + mi-console.exp, mi-disassemble.exp, mi-break.exp: Update to + reflect extended output from -break-insert command. + * mi-break.exp (test_rbreak_creation_and_listing): XFAIL regexp - tests. -r flag broken by above. - + tests. -r flag broken by above. + Sun Dec 19 19:28:13 1999 Andrew Cagney * cpp_variable.cc, cpp_variable.h, c_variable.c: Delete. @@ -454,7 +454,7 @@ Fri Dec 17 20:59:55 1999 Andrew Cagney * mi-var-block.exp: Set up xfails fro known problems. * mi-var-display.exp: Set up printing of values of 'e' and 'anone' - as xfails. + as xfails. * mi-var-child.exp: Fix typos. @@ -465,41 +465,41 @@ Fri Dec 17 20:59:55 1999 Andrew Cagney Wed Dec 15 19:23:38 1999 Andrew Cagney * mi-read-memory.exp: Add test for ``-o ''. Update checks - and match next-row et.al. + and match next-row et.al. 1999-12-14 Elena Zannoni * mi-var-display.exp : New file. Tests for format and type, with - unions, structs and enums. - + unions, structs and enums. + * mi-var-cmd.exp: Add some var-assign tests. -1999-12-14 Elena Zannoni +1999-12-14 Elena Zannoni * mi-var-cmd.exp, mi-var-block.exp, mi-var-child.exp: New files - some tests for -var* commands. + some tests for -var* commands. * var-cmd.c: New source file for var-* commands tests. * gdb.mi/Makefile.in (PROGS): Add var-cmd. - + Mon Dec 13 18:06:09 1999 Andrew Cagney * mi-break.exp: Fix quoting. Changed "srcfile.c":6 to - "\"srcfile.c\":6". + "\"srcfile.c\":6". * mi-simplerun.exp: Fix quoting. Sat Dec 11 21:33:37 1999 Andrew Cagney * mi-simplerun.exp (exec-finish): Fix return value was zero, - should have been three. + should have been three. * mi-disassemble.exp: Reduce number of wild card matches in - * patterns. Remove all numeric constants. + * patterns. Remove all numeric constants. 1999-12-09 Elena Zannoni * mi-eval.exp: New file. Some initial tests for - -data-evaluate-expression. + -data-evaluate-expression. 1999-12-09 Fernando Nasser @@ -510,20 +510,20 @@ Sat Dec 11 21:33:37 1999 Andrew Cagney 1999-12-08 Elena Zannoni * mi-regs.exp: Fix test for format 'N' for - data-list-register-values. + data-list-register-values. 1999-12-07 Elena Zannoni * mi-disassemble.exp: Update expected output. Break test of - disassembly in mixed mode into 2 functions. + disassembly in mixed mode into 2 functions. * mi-regs.exp: Initial register tests. Works only on sparc right - now. + now. 1999-12-02 Elena Zannoni * mi-stepi.exp: New file. Tests exec-step-instruction and - exec-next-instruction. + exec-next-instruction. * mi-until.exp: New file. Tests exec-until. * until.c: New file. * mi-return.exp: New file. Tests exec-return. @@ -531,52 +531,52 @@ Sat Dec 11 21:33:37 1999 Andrew Cagney Thu Dec 2 09:38:23 1999 Andrew Cagney * mi-hack-cli.exp: New test. Check the hacked up access to the - CLI. + CLI. Wed Dec 1 16:47:40 1999 Andrew Cagney * mi-basics.exp: Delete calls to mi_delete_breakpoints, - mi_gdb_reinitialize_dir and mi_gdb_load. This test is checking - that these can work. + mi_gdb_reinitialize_dir and mi_gdb_load. This test is checking + that these can work. * mi-support.exp (mi_step, mi_next, mi_run_to_main): New procedures. * mi-read-memory.exp, mi-read-memory.c: New files. Test - data-read-memory command. - + data-read-memory command. + Tue Nov 30 23:54:16 1999 Andrew Cagney * mi-support.exp: Don't start SID until after GDB has been started - and verified. - + and verified. + Tue Nov 30 22:21:33 1999 Andrew Cagney * mi-support.exp (mi_uncatched_gdb_exit): When SID, call sid_exit. (mi_gdb_start): When SID, call sid_start. (mi_gdb_start): Add MIFLAGS to spawn-GDB command. Check for - HEADLESS gdb. Return non-zero when GDB fails to start. + HEADLESS gdb. Return non-zero when GDB fails to start. (mi_gdb_load): When SID or SIM, download program. (mi_run_cmd): Don't do download here. Assume target supports the - 00-exec-run command. + 00-exec-run command. (skip_mi_tests, setup_gdbmi, unset_gdbmi): Delete. Merged into - mi_gdb_start. + mi_gdb_start. * mi-basics.exp, mi-break.exp, mi-console.exp, mi-disassemble.exp, - mi-simplerun.exp, mi-watch.exp: Update. Check status from - mi_gdb_start indicating that GDB started correctly. + mi-simplerun.exp, mi-watch.exp: Update. Check status from + mi_gdb_start indicating that GDB started correctly. Tue Nov 30 15:22:08 1999 Andrew Cagney * mi-support.exp (setup_gdbmi, unset_gdbmi): New - procedures. Setup/unset dejagnu for mi tests. + procedures. Setup/unset dejagnu for mi tests. * mi-basics.exp, mi-console.exp, mi-simplerun.exp, mi-break.exp, - mi-disassemble.exp, mi-watch.exp: Update. + mi-disassemble.exp, mi-watch.exp: Update. 1999-11-29 Elena Zannoni * mi-simplerun.exp (test_running_the_program): Remove XFAIL. The - output is fixed now. + output is fixed now. (test_program_termination): Update output pattern. Tue Nov 30 00:19:10 1999 Andrew Cagney @@ -586,26 +586,26 @@ Tue Nov 30 00:19:10 1999 Andrew Cagney Mon Nov 29 17:59:13 1999 Andrew Cagney * mi-support.exp (mi_run_command): Check for exec-run command - failure due to MI not having an active target. + failure due to MI not having an active target. (mi_run_command): Check for and handle a builtin simulator target. (mi_run_command): Don't check/handle for ``The program has been - started already'', not a valid MI response. - + started already'', not a valid MI response. + * mi-simplerun.exp (test_running_the_program): Update all patterns - to match async output. + to match async output. (test_running_the_program): Mark ``step to callee4'' as XFAIL. MI - output contains {,reason="end-stepping-range"}+. + output contains {,reason="end-stepping-range"}+. * mi-simplerun.exp: Limit the timeout for ``step to callee4'' to - 30 seconds. + 30 seconds. Mon Nov 29 17:30:00 1999 Andrew Cagney * mi-support.exp (skip_mi_tests): Print UNTESTED when MI interface - isn't available. Start/stop instead of assuming GDB is running. + isn't available. Start/stop instead of assuming GDB is running. (MIFLAGS): Define. * mi-simplerun.exp, mi-disassemble.exp, mi-break.exp, - mi-basics.exp, mi-watch.exp: Update. + mi-basics.exp, mi-watch.exp: Update. 1999-11-26 Elena Zannoni @@ -620,8 +620,8 @@ Wed Nov 24 17:42:07 1999 Andrew Cagney Wed Nov 24 17:31:04 1999 Andrew Cagney * gdb.mi/mi-basics.exp, gdb.mi/mi-disassemble.exp, - gdb.mi/mi-simplerun.exp: Print warning message when test isn't - run. + gdb.mi/mi-simplerun.exp: Print warning message when test isn't + run. 1999-11-23 Elena Zannoni @@ -637,18 +637,18 @@ Wed Nov 24 17:31:04 1999 Andrew Cagney 1999-11-04 Elena Zannoni * gdb.mi/mi-disassemble.exp: Update output of execution commands - to reflect new 'reason' field. + to reflect new 'reason' field. * gdb.mi/mi-simplerun.exp: Ditto. 1999-10-25 Elena Zannoni * gdb.mi/mi-simplerun.exp: Add more stack-list-frames tests. - * gdb.mi/mi-disassemble.exp: Update 'run to main' output. + * gdb.mi/mi-disassemble.exp: Update 'run to main' output. * gdb.mi/mi-simplerun.exp: Update execution commands - output. Update backtrace output. - + output. Update backtrace output. + 1999-10-18 Elena Zannoni * gdb.mi/mi-disassemble.exp: Add new tests for the new @@ -657,9 +657,9 @@ Wed Nov 24 17:31:04 1999 Andrew Cagney Mon Oct 11 13:57:21 1999 Andrew Cagney * lib/mi-support.exp: Break complicated gdb_expect containing - exp_continue into a while within an expect. Don't attempt a start - more than three times. Check return value from gdb_load. - + exp_continue into a while within an expect. Don't attempt a start + more than three times. Check return value from gdb_load. + 1999-10-06 Elena Zannoni * gdb.mi/mi-disassemble.exp: New file. @@ -667,7 +667,7 @@ Mon Oct 11 13:57:21 1999 Andrew Cagney Wed Oct 6 12:05:58 1999 Andrew Cagney * lib/mi-support.exp (mi_run_cmd): Give up after two restart - attempts. + attempts. 1999-09290 Fernando Nasser @@ -707,7 +707,7 @@ Wed Oct 6 12:05:58 1999 Andrew Cagney 1999-06-24 Fernando Nasser * lib/mi-support.exp (mi_run_cmd): Fix pattern and add a timeout - clause. + clause. 1999-06-24 Fernando Nasser @@ -742,7 +742,7 @@ Wed Oct 6 12:05:58 1999 Andrew Cagney 1999-06-22 Fernando Nasser - * gdb.mi/mi-simplerun.exp: New file. Tests simple debugging tasks. + * gdb.mi/mi-simplerun.exp: New file. Tests simple debugging tasks. * gdb.mi/mi-basics.exp: Remove tests moved to above new file. * lib/mi-support.exp: New file. Support procedures for mi tests. diff --git a/gdb/testsuite/gdb.mi/gdb669.exp b/gdb/testsuite/gdb.mi/gdb669.exp index da1db640346..eae0b59197b 100644 --- a/gdb/testsuite/gdb.mi/gdb669.exp +++ b/gdb/testsuite/gdb.mi/gdb669.exp @@ -40,4 +40,3 @@ for {set i 0} {$i < 4} {incr i} { } mi_gdb_exit - diff --git a/gdb/testsuite/gdb.mi/interrupt-thread-group.c b/gdb/testsuite/gdb.mi/interrupt-thread-group.c index a8392c70b4d..18b8527f52d 100644 --- a/gdb/testsuite/gdb.mi/interrupt-thread-group.c +++ b/gdb/testsuite/gdb.mi/interrupt-thread-group.c @@ -62,4 +62,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-no-inferior.exp b/gdb/testsuite/gdb.mi/list-thread-groups-no-inferior.exp index 867eb26a51a..cdc8d3c5230 100644 --- a/gdb/testsuite/gdb.mi/list-thread-groups-no-inferior.exp +++ b/gdb/testsuite/gdb.mi/list-thread-groups-no-inferior.exp @@ -32,15 +32,15 @@ if {[mi_clean_restart]} { set test "-list-thread-groups --available" gdb_test_multiple $test $test { -re "\}" { - exp_continue + exp_continue } -re "\r\n$gdb_prompt " { - pass $test + pass $test } } # Verify that GDB is still alive. mi_gdb_test "-data-evaluate-expression 1" \ - ".*\\^done,value=\"1\"" \ - "GDB is still alive" + ".*\\^done,value=\"1\"" \ + "GDB is still alive" diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp index 3038a2cbadf..c813e99803e 100644 --- a/gdb/testsuite/gdb.mi/mi-basics.exp +++ b/gdb/testsuite/gdb.mi/mi-basics.exp @@ -106,12 +106,12 @@ proc test_exec_and_symbol_mi_operatons {} { # "file-clear operation" mi_gdb_test "-file-exec-file ${filename}" \ - "\\\^done" \ - "file-exec-file operation" + "\\\^done" \ + "file-exec-file operation" mi_gdb_test "-file-symbol-file ${filename}" \ - "\\\^done" \ - "file-symbol-file operation" + "\\\^done" \ + "file-symbol-file operation" # We need to return != 0. return 1 @@ -128,12 +128,12 @@ proc test_breakpoints_deletion {} { # The all parameter is actually no parameter. mi_gdb_test "200-break-delete" \ - "200\\\^done" \ - "break-delete (all) operation" + "200\\\^done" \ + "break-delete (all) operation" mi_gdb_test "201-break-list" \ - ".*\\\^done,BreakpointTable=\\\{.*,body=\\\[\\\]\\\}" \ - "all breakpoints removed" + ".*\\\^done,BreakpointTable=\\\{.*,body=\\\[\\\]\\\}" \ + "all breakpoints removed" } proc test_dir_specification {} { @@ -148,16 +148,16 @@ proc test_dir_specification {} { # -environment-directory -r mi_gdb_test "202-environment-directory ${testsubdir}" \ - "202\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \ - "environment-directory arg operation" + "202\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \ + "environment-directory arg operation" mi_gdb_test "203-environment-directory" \ - "203\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \ - "environment-directory empty-string operation" + "203\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \ + "environment-directory empty-string operation" mi_gdb_test "204-environment-directory -r" \ - "204\\\^done,source-path=\"\\\$cdir.\\\$cwd\"" \ - "environment-directory operation" + "204\\\^done,source-path=\"\\\$cdir.\\\$cwd\"" \ + "environment-directory operation" } proc test_cwd_specification {} { @@ -171,15 +171,15 @@ proc test_cwd_specification {} { # -environment-pwd mi_gdb_test "205-environment-cd ${objdir}" \ - "205\\\^done" \ - "environment-cd arg operation" + "205\\\^done" \ + "environment-cd arg operation" # The canonical name of the working directory may differ on a # remote host from that on the build system. if {![is_remote host]} { mi_gdb_test "206-environment-pwd" \ - "206\\\^done,cwd=\"${escapedobjdir}\"" \ - "environment-pwd operation" + "206\\\^done,cwd=\"${escapedobjdir}\"" \ + "environment-pwd operation" } } @@ -205,20 +205,20 @@ proc test_path_specification {} { set orig_path [string_to_regexp ${orig_path}] mi_gdb_test "207-environment-path" \ - "207\\\^done,path=\"$orig_path\"" \ - "environment-path no-args operation" + "207\\\^done,path=\"$orig_path\"" \ + "environment-path no-args operation" mi_gdb_test "208-environment-path $objdir ${testsubdir}" \ - "208\\\^done,path=\"$escapedobjdir.${envirodir}.$orig_path\"" \ - "environment-path dir1 dir2 operation" + "208\\\^done,path=\"$escapedobjdir.${envirodir}.$orig_path\"" \ + "environment-path dir1 dir2 operation" mi_gdb_test "209-environment-path -r $objdir" \ - "209\\\^done,path=\"$escapedobjdir.$orig_path\"" \ - "environment-path -r dir operation" + "209\\\^done,path=\"$escapedobjdir.$orig_path\"" \ + "environment-path -r dir operation" mi_gdb_test "210-environment-path -r" \ - "210\\\^done,path=\"$orig_path\"" \ - "environment-path -r operation" + "210\\\^done,path=\"$orig_path\"" \ + "environment-path -r operation" } diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-script.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-script.exp index e4242a3f1b6..698a3ea1b7e 100644 --- a/gdb/testsuite/gdb.mi/mi-breakpoint-script.exp +++ b/gdb/testsuite/gdb.mi/mi-breakpoint-script.exp @@ -59,14 +59,14 @@ proc do_test { mi_version use_fix_flag expect_fixed_output } { "send -fix-multi-location-breakpoint-output" } - # Create a breakpoint. + # Create a breakpoint. mi_gdb_test "-break-insert main" ".*" "add breakpoint on main" - set pattern [make_pattern $expect_fixed_output] + set pattern [make_pattern $expect_fixed_output] - # Add commands. Use the CLI command, so we can verify the - # =breakpoint-modified output. - mi_gdb_test "commands\nabc\ndef\nend" ".*=breakpoint-modified,$pattern\r\n\\^done" "add breakpoint commands" + # Add commands. Use the CLI command, so we can verify the + # =breakpoint-modified output. + mi_gdb_test "commands\nabc\ndef\nend" ".*=breakpoint-modified,$pattern\r\n\\^done" "add breakpoint commands" # Check the -break-info output. mi_gdb_test "-break-info" \ diff --git a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc index 7fefcfc2eaf..7d6c1fd4d0d 100644 --- a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc +++ b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc @@ -68,4 +68,3 @@ main () return 0; } - diff --git a/gdb/testsuite/gdb.mi/mi-complete.exp b/gdb/testsuite/gdb.mi/mi-complete.exp index ad29b3f80b2..c2e50449308 100644 --- a/gdb/testsuite/gdb.mi/mi-complete.exp +++ b/gdb/testsuite/gdb.mi/mi-complete.exp @@ -32,27 +32,27 @@ mi_clean_restart $::testfile # debug info of shared libraries like glibc, libgcc, etc. mi_gdb_test "1-complete br" \ - "1\\^done,completion=\"break\",matches=\\\[.*\"break\",.*\"break-range\".*\\\],max_completions_reached=\"0\"" \ - "-complete br" + "1\\^done,completion=\"break\",matches=\\\[.*\"break\",.*\"break-range\".*\\\],max_completions_reached=\"0\"" \ + "-complete br" # Check empty completion list. mi_gdb_test "5-complete bogus" \ - "5\\^done,matches=\\\[\\\],max_completions_reached=\"0\"" \ - "-complete bogus" + "5\\^done,matches=\\\[\\\],max_completions_reached=\"0\"" \ + "-complete bogus" # Check completions for commands with space. mi_gdb_test "4-complete \"b mai\"" \ - "4\\^done,completion=\"b main\",matches=\\\[.*\"b main\".*\\\],max_completions_reached=\"0\"" \ - "-complete \"b mai\"" + "4\\^done,completion=\"b main\",matches=\\\[.*\"b main\".*\\\],max_completions_reached=\"0\"" \ + "-complete \"b mai\"" # Check wildmatching. mi_gdb_test "5-complete \"b push_ba\"" \ - "5\\^done,completion=\"b push_back\\(\",matches=\\\[.*\"b A::push_back\\(void\\*\\)\".*\\\],max_completions_reached=\"0\"" \ - "-complete \"b push_ba\", wildmatching" + "5\\^done,completion=\"b push_back\\(\",matches=\\\[.*\"b A::push_back\\(void\\*\\)\".*\\\],max_completions_reached=\"0\"" \ + "-complete \"b push_ba\", wildmatching" mi_gdb_test "-info-gdb-mi-command complete" \ - "\\^done,command=\{exists=\"true\"\}" \ - "-info-gdb-mi-command complete" + "\\^done,command=\{exists=\"true\"\}" \ + "-info-gdb-mi-command complete" # Limit max completions and check that max_completions_reached=\"0\" is set # to 1. @@ -60,13 +60,13 @@ mi_gdb_test "set max-completions 1" ".*=cmd-param-changed.*\\^done" \ "set max-completions 1" mi_gdb_test "2-complete br" \ - ".*2\\^done,completion=\"br\[A-Za-z0-9-\]+\",matches=\\\[\"br\[A-Za-z0-9-\]+\"\\\],max_completions_reached=\"1\"" \ - "-complete br, max-completions 1" + ".*2\\^done,completion=\"br\[A-Za-z0-9-\]+\",matches=\\\[\"br\[A-Za-z0-9-\]+\"\\\],max_completions_reached=\"1\"" \ + "-complete br, max-completions 1" # Disable completions and check an error is returned mi_gdb_test "set max-completions 0" ".*=cmd-param-changed.*\\^done" \ "set max-completions 0" mi_gdb_test "3-complete br" \ - ".*3\\^error,msg=\".*" \ - "-complete br, max-completions 0" + ".*3\\^error,msg=\".*" \ + "-complete br, max-completions 0" diff --git a/gdb/testsuite/gdb.mi/mi-disassemble.exp b/gdb/testsuite/gdb.mi/mi-disassemble.exp index 6c6d05dbda6..49951e52342 100644 --- a/gdb/testsuite/gdb.mi/mi-disassemble.exp +++ b/gdb/testsuite/gdb.mi/mi-disassemble.exp @@ -117,15 +117,15 @@ proc test_disassembly_lines_limit {} { mi_gdb_test "print/x \$pc" "" "" mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 20 -- 0" \ "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \ - "data-disassemble file, line, number assembly only" + "data-disassemble file, line, number assembly only" mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 0 -- 0" \ "222\\^done,asm_insns=\\\[\\\]" \ - "data-disassemble file, line, number (zero lines) assembly only" + "data-disassemble file, line, number (zero lines) assembly only" mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 50 -- 0" \ "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \ - "data-disassemble file, line, number (more than main lines) assembly only" + "data-disassemble file, line, number (more than main lines) assembly only" } @@ -145,7 +145,7 @@ proc test_disassembly_mixed {} { mi_gdb_test "002-data-disassemble -f basics.c -l $line_callee2_open_brace -- 1" \ "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_callee2_open_brace\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \ - "data-disassemble file, line assembly mixed" + "data-disassemble file, line assembly mixed" # # In mixed mode, the lowest level of granularity is the source line. @@ -154,7 +154,7 @@ proc test_disassembly_mixed {} { # mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 1" \ "003\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \ - "data-disassemble range assembly mixed" + "data-disassemble range assembly mixed" } proc test_disassembly_mixed_with_opcodes {} { @@ -172,8 +172,8 @@ proc test_disassembly_mixed_with_opcodes {} { # -data-disassembly -s $pc -e "$pc+8" -- 3 mi_gdb_test "002-data-disassemble -f basics.c -l $line_callee2_open_brace -- 3" \ - "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_callee2_open_brace\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",opcodes=\".*\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}\\\]\}\\\]" \ - "data-disassemble file, line assembly mixed with opcodes" + "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_callee2_open_brace\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",opcodes=\".*\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}\\\]\}\\\]" \ + "data-disassemble file, line assembly mixed with opcodes" # # In mixed mode, the lowest level of granularity is the source line. @@ -181,8 +181,8 @@ proc test_disassembly_mixed_with_opcodes {} { # which we are now, even if we have specified that the range is only 2 insns. # mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 3" \ - "003\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}\\\]\}\\\]" \ - "data-disassemble range assembly mixed with opcodes" + "003\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",opcodes=\".*\",inst=\".*\"\}\\\]\}\\\]" \ + "data-disassemble range assembly mixed with opcodes" } proc test_disassembly_mixed_lines_limit {} { @@ -204,15 +204,15 @@ proc test_disassembly_mixed_lines_limit {} { mi_gdb_test "print/x \$pc" "" "" mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 20 -- 1" \ "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \ - "data-disassemble file, line, number assembly mixed" + "data-disassemble file, line, number assembly mixed" mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 0 -- 1" \ "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$line_main_open_brace\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \ - "data-disassemble file, line, number (zero lines) assembly mixed" + "data-disassemble file, line, number (zero lines) assembly mixed" mi_gdb_test "222-data-disassemble -f basics.c -l $line_main_body -n 50 -- 1" \ "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",fullname=\"${fullname_syntax}basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\}.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \ - "data-disassemble file, line, number (more than main lines) assembly mixed" + "data-disassemble file, line, number (more than main lines) assembly mixed" } proc test_disassembly_bogus_args {} { @@ -231,23 +231,23 @@ proc test_disassembly_bogus_args {} { # -data-disassembly -f basics.c -l 32 -- 9 mi_gdb_test "123-data-disassemble -f foo -l abc -n 0 -- 0" \ - "123\\^error,msg=\"-data-disassemble: Invalid filename.\"" \ - "data-disassemble bogus filename" + "123\\^error,msg=\"-data-disassemble: Invalid filename.\"" \ + "data-disassemble bogus filename" mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \ - "321\\^error,msg=\"No symbol \\\\\"foo\\\\\" in current context.\"" \ - "data-disassemble bogus address, -s -e" + "321\\^error,msg=\"No symbol \\\\\"foo\\\\\" in current context.\"" \ + "data-disassemble bogus address, -s -e" mi_gdb_test "322-data-disassemble -a foo -- 0" \ - "322\\^error,msg=\"No symbol \\\\\"foo\\\\\" in current context.\"" \ - "data-disassemble bogus address, -a" + "322\\^error,msg=\"No symbol \\\\\"foo\\\\\" in current context.\"" \ + "data-disassemble bogus address, -a" mi_gdb_test "456-data-disassemble -s \$pc -f basics.c -- 0" \ "456\\^error,msg=\"-data-disassemble: Usage: \\( -f filename -l linenum .-n howmany. \\| -s startaddr -e endaddr \\| -a addr \\) . --opcodes mode . . --source . . .--. mode .\\.\"" \ "data-disassemble mix different args" mi_gdb_test "789-data-disassemble -f basics.c -l $line_main_body -- 9" \ - "789\\^error,msg=\"-data-disassemble: Mode argument must be in the range 0-5.\"" \ + "789\\^error,msg=\"-data-disassemble: Mode argument must be in the range 0-5.\"" \ "data-disassemble wrong mode arg" foreach mode { 1 2 3 4 5 } { diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp index 9b039365d95..d881c4b3744 100644 --- a/gdb/testsuite/gdb.mi/mi-file.exp +++ b/gdb/testsuite/gdb.mi/mi-file.exp @@ -49,7 +49,7 @@ proc test_file_list_exec_source_file {} { mi_gdb_test "111-file-list-exec-source-file" \ "111\\\^done,line=\"$line_default\",file=\"${srcfilepath}\",fullname=\"$fullname_syntax${srcfile}\",macro-info=\"0\"" \ - "request path info of current source file (${srcfile})" + "request path info of current source file (${srcfile})" } proc test_file_list_exec_source_files {} { @@ -59,7 +59,7 @@ proc test_file_list_exec_source_files {} { # get the path and absolute path to the current executable mi_gdb_test "222-file-list-exec-source-files" \ "222\\\^done,files=\\\[\{file=\".*${srcfile}\",fullname=\"$fullname_syntax${srcfile}\",debug-fully-read=\"\[^\"\]+\"\}.*]" \ - "Getting a list of source files." + "Getting a list of source files." } test_file_list_exec_source_file diff --git a/gdb/testsuite/gdb.mi/mi-i-cmd.exp b/gdb/testsuite/gdb.mi/mi-i-cmd.exp index be7d1848796..bba75f0c226 100644 --- a/gdb/testsuite/gdb.mi/mi-i-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi-i-cmd.exp @@ -23,23 +23,23 @@ if {[mi_clean_restart]} { # First, verify that the debugger correctly advertises support # for the -info-gdb-mi-command command. mi_gdb_test "-list-features" \ - "\\^done,features=\\\[.*\"info-gdb-mi-command\".*\\\]" \ - "-list-features includes \"info-gdb-mi-command\"" + "\\^done,features=\\\[.*\"info-gdb-mi-command\".*\\\]" \ + "-list-features includes \"info-gdb-mi-command\"" mi_gdb_test "-info-gdb-mi-command unsupported-command" \ - "\\^done,command=\\\{exists=\"false\"\\\}" \ - "-info-gdb-mi-command unsupported-command" + "\\^done,command=\\\{exists=\"false\"\\\}" \ + "-info-gdb-mi-command unsupported-command" # Same test as above, but including the leading '-' in the command name. mi_gdb_test "-info-gdb-mi-command -unsupported-command" \ - "\\^done,command=\\\{exists=\"false\"\\\}" \ - "-info-gdb-mi-command -unsupported-command" + "\\^done,command=\\\{exists=\"false\"\\\}" \ + "-info-gdb-mi-command -unsupported-command" mi_gdb_test "-info-gdb-mi-command symbol-list-lines" \ - "\\^done,command=\\\{exists=\"true\"\\\}" \ - "-info-gdb-mi-command symbol-list-lines" + "\\^done,command=\\\{exists=\"true\"\\\}" \ + "-info-gdb-mi-command symbol-list-lines" # Same test as above, but including the leading '-' in the command name. mi_gdb_test "-info-gdb-mi-command -symbol-list-lines" \ - "\\^done,command=\\\{exists=\"true\"\\\}" \ - "-info-gdb-mi-command -symbol-list-lines" + "\\^done,command=\\\{exists=\"true\"\\\}" \ + "-info-gdb-mi-command -symbol-list-lines" diff --git a/gdb/testsuite/gdb.mi/mi-language.exp b/gdb/testsuite/gdb.mi/mi-language.exp index 2d64fa408b4..c6f8f01e31c 100644 --- a/gdb/testsuite/gdb.mi/mi-language.exp +++ b/gdb/testsuite/gdb.mi/mi-language.exp @@ -23,43 +23,43 @@ if {[mi_clean_restart]} { # First, verify that the debugger correctly advertises support # for the --language option. mi_gdb_test "-list-features" \ - "\\^done,features=\\\[.*\"language-option\".*\\\]" \ - "-list-features should include \"language-option\"" + "\\^done,features=\\\[.*\"language-option\".*\\\]" \ + "-list-features should include \"language-option\"" mi_gdb_test "set lang ada" \ - ".*=cmd-param-changed,param=\"language\",value=\"ada\".*" + ".*=cmd-param-changed,param=\"language\",value=\"ada\".*" # Evaluate an expression that the Ada language is unable to parse. mi_gdb_test "-data-evaluate-expression \"sizeof (void*)\"" \ - "\\^error,.*" \ - "sizeof expression using current language" + "\\^error,.*" \ + "sizeof expression using current language" # Now, ask for the same expression to be parsed, but using the C # language. mi_gdb_test "-data-evaluate-expression --language c \"sizeof (void*)\"" \ - "\\^done,value=\"$decimal\"" \ - "sizeof expression using C language" + "\\^done,value=\"$decimal\"" \ + "sizeof expression using C language" # Double-check that the current language has not changed. mi_gdb_test "show lang ada" \ - ".*The current source language is \\\\\"ada\\\\\".*" + ".*The current source language is \\\\\"ada\\\\\".*" # Test what happens when specifying an invalid language name... mi_gdb_test "-data-evaluate-expression --language invlang \"sizeof (void*)\"" \ - "\\^error,msg=\"Invalid --language argument: invlang\"" \ - "data-evaluate-expression with invalid language name" + "\\^error,msg=\"Invalid --language argument: invlang\"" \ + "data-evaluate-expression with invalid language name" # Make sure that "--language auto" is also rejected. mi_gdb_test "-data-evaluate-expression --language auto \"sizeof (void*)\"" \ - "\\^error,msg=\"Invalid --language argument: auto\"" \ - "data-evaluate-expression with language auto" + "\\^error,msg=\"Invalid --language argument: auto\"" \ + "data-evaluate-expression with language auto" # Make sure that "--language local" is also rejected. mi_gdb_test "-data-evaluate-expression --language local \"sizeof (void*)\"" \ - "\\^error,msg=\"Invalid --language argument: local\"" \ - "data-evaluate-expression with language local" + "\\^error,msg=\"Invalid --language argument: local\"" \ + "data-evaluate-expression with language local" # Make sure that "--language unknown" is also rejected. mi_gdb_test "-data-evaluate-expression --language unknown \"sizeof (void*)\"" \ - "\\^error,msg=\"Invalid --language argument: unknown\"" \ - "data-evaluate-expression with language unknown" + "\\^error,msg=\"Invalid --language argument: unknown\"" \ + "data-evaluate-expression with language unknown" diff --git a/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp b/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp index 4729033347a..741af8fa63f 100644 --- a/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp +++ b/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp @@ -39,7 +39,7 @@ mi_detect_async foreach_with_prefix iteration {1 2} { mi_delete_breakpoints if { [mi_runto_main] < 0 } { - continue + continue } mi_send_resuming_command "exec-continue" "continue" diff --git a/gdb/testsuite/gdb.mi/mi-pthreads.exp b/gdb/testsuite/gdb.mi/mi-pthreads.exp index 13ea6ba58a5..79904ed136e 100644 --- a/gdb/testsuite/gdb.mi/mi-pthreads.exp +++ b/gdb/testsuite/gdb.mi/mi-pthreads.exp @@ -70,4 +70,3 @@ if {[mi_clean_restart $::testfile]} { check_mi_thread_command_set mi_gdb_exit - diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp index 5f6eb3fbf72..5ddb386e1f4 100644 --- a/gdb/testsuite/gdb.mi/mi-reverse.exp +++ b/gdb/testsuite/gdb.mi/mi-reverse.exp @@ -98,46 +98,46 @@ proc test_controlled_execution_reverse {} { # Test exec-reverse-next mi_execute_to "exec-next --reverse" \ - "end-stepping-range" "main" "" \ - "basics.c" $line_main_hello "" \ - "reverse next to get over the call to do_nothing" + "end-stepping-range" "main" "" \ + "basics.c" $line_main_hello "" \ + "reverse next to get over the call to do_nothing" # Test exec-reverse-step mi_execute_to "exec-step --reverse" \ - "end-stepping-range" "callee1" \ + "end-stepping-range" "callee1" \ "\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\[0-9\]*\"\}" \ - "basics.c" $line_callee1_close "" \ - "reverse step to callee1" + "basics.c" $line_callee1_close "" \ + "reverse step to callee1" mi_execute_to "exec-step --reverse" \ - "end-stepping-range" "callee2" \ + "end-stepping-range" "callee2" \ "\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\}" \ - "basics.c" $line_callee2_close "" \ - "reverse step to callee2" + "basics.c" $line_callee2_close "" \ + "reverse step to callee2" mi_execute_to "exec-step --reverse" \ - "end-stepping-range" "callee3" \ + "end-stepping-range" "callee3" \ "\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\}" \ - "basics.c" $line_callee3_close "" \ - "reverse step to callee3" + "basics.c" $line_callee3_close "" \ + "reverse step to callee3" mi_execute_to "exec-step --reverse" \ - "end-stepping-range" "callee4" "" \ - "basics.c" "\[0-9\]+" "" \ - "reverse step to callee4" + "end-stepping-range" "callee4" "" \ + "basics.c" "\[0-9\]+" "" \ + "reverse step to callee4" # Test exec-reverse-[step|next]-instruction mi_execute_to "exec-step-instruction --reverse" \ - "end-stepping-range" "callee4" "" \ - "basics.c" "\[0-9\]+" "" \ - "reverse-step-instruction at callee4" + "end-stepping-range" "callee4" "" \ + "basics.c" "\[0-9\]+" "" \ + "reverse-step-instruction at callee4" mi_execute_to "exec-next-instruction --reverse" \ - "end-stepping-range" "callee4" "" \ - "basics.c" "\[0-9\]+" "" \ - "reverse-next-instruction at callee4" + "end-stepping-range" "callee4" "" \ + "basics.c" "\[0-9\]+" "" \ + "reverse-next-instruction at callee4" # Test exec-reverse-continue @@ -147,16 +147,16 @@ proc test_controlled_execution_reverse {} { -line $line_callee3_body mi_execute_to "exec-continue --reverse" \ - "breakpoint-hit" "callee3" \ + "breakpoint-hit" "callee3" \ "\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\}" \ - "basics.c" "\[0-9\]+" \ + "basics.c" "\[0-9\]+" \ { "" "disp=\"del\""} \ - "reverse-continue at callee3" + "reverse-continue at callee3" mi_execute_to "exec-continue --reverse" \ - "no-history" "main" "" \ - "basics.c" $line_main_body "" \ - "reverse-continue at main" + "no-history" "main" "" \ + "basics.c" $line_main_body "" \ + "reverse-continue at main" } test_controlled_execution_reverse diff --git a/gdb/testsuite/gdb.mi/mi-simplerun.exp b/gdb/testsuite/gdb.mi/mi-simplerun.exp index b34097ef669..3b0d4af0186 100644 --- a/gdb/testsuite/gdb.mi/mi-simplerun.exp +++ b/gdb/testsuite/gdb.mi/mi-simplerun.exp @@ -85,8 +85,8 @@ proc test_breakpoints_creation_and_listing {} { "list of breakpoints" mi_gdb_test "205-break-disable 2 3 4" \ - "205\\^done.*" \ - "disabling of breakpoints" + "205\\^done.*" \ + "disabling of breakpoints" set bp2 [mi_make_breakpoint -number 2 -enabled n] mi_gdb_test "206-break-info 2" \ diff --git a/gdb/testsuite/gdb.mi/mi-start.exp b/gdb/testsuite/gdb.mi/mi-start.exp index d384230bf06..0ab5bee0730 100644 --- a/gdb/testsuite/gdb.mi/mi-start.exp +++ b/gdb/testsuite/gdb.mi/mi-start.exp @@ -35,10 +35,9 @@ if {[mi_clean_restart $::testfile]} { # First, verify that the debugger correctly advertises support # for the --start option of the -exec-run command. mi_gdb_test "-list-features" \ - "\\^done,features=\\\[.*\"exec-run-start-option\".*\\\]" \ - "-list-features includes \"exec-run-start-option\"" + "\\^done,features=\\\[.*\"exec-run-start-option\".*\\\]" \ + "-list-features includes \"exec-run-start-option\"" mi_run_cmd "--start" mi_expect_stop "breakpoint-hit" "main" "" ".*mi-start.c" "$decimal" \ { "" "disp=\"del\"" } "run to main" - diff --git a/gdb/testsuite/gdb.mi/mi-stepi.exp b/gdb/testsuite/gdb.mi/mi-stepi.exp index f2871dca256..5dffabac0b7 100644 --- a/gdb/testsuite/gdb.mi/mi-stepi.exp +++ b/gdb/testsuite/gdb.mi/mi-stepi.exp @@ -39,7 +39,7 @@ proc test_stepi_nexti {} { set line_main_hello [gdb_get_line_number "Hello, World!"] set line [mi_execute_to "exec-step-instruction" "end-stepping-range" "main" "" \ - ".*basics.c" "\[0-9\]+" "" "step-instruction at main"] + ".*basics.c" "\[0-9\]+" "" "step-instruction at main"] if { $line >= $line_main_body && $line <= $line_main_hello } { pass "step-instruction at main, line check" } else { @@ -47,7 +47,7 @@ proc test_stepi_nexti {} { } set line [mi_execute_to "exec-next-instruction" "end-stepping-range" "main" "" \ - ".*basics.c" "\[0-9\]+" "" "next-instruction at main"] + ".*basics.c" "\[0-9\]+" "" "next-instruction at main"] if { $line >= $line_main_body && $line <= $line_main_hello } { pass "next-instruction at main, line check" } else { @@ -55,7 +55,7 @@ proc test_stepi_nexti {} { } set line [mi_execute_to "exec-next-instruction" "end-stepping-range" "main" "" \ - ".*basics.c" "\[0-9\]+" "" "next-instruction at main 2"] + ".*basics.c" "\[0-9\]+" "" "next-instruction at main 2"] if { $line >= $line_main_body && $line <= $line_main_hello } { pass "next-instruction at main 2, line check" } else { diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.c b/gdb/testsuite/gdb.mi/mi-syn-frame.c index e3c9b743f71..6af0cc29098 100644 --- a/gdb/testsuite/gdb.mi/mi-syn-frame.c +++ b/gdb/testsuite/gdb.mi/mi-syn-frame.c @@ -66,4 +66,3 @@ have_a_very_merry_interrupt (void) alarm (1); sleep (2); /* We'll receive that signal while sleeping */ } - diff --git a/gdb/testsuite/gdb.mi/mi-undefined-cmd.exp b/gdb/testsuite/gdb.mi/mi-undefined-cmd.exp index be90e365909..6c0d43cdecc 100644 --- a/gdb/testsuite/gdb.mi/mi-undefined-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi-undefined-cmd.exp @@ -23,9 +23,9 @@ if {[mi_clean_restart]} { # First, verify that the debugger correctly advertises support # for the "undefined-command" error code... mi_gdb_test "-list-features" \ - "\\^done,features=\\\[.*\"undefined-command-error-code\".*\\\]" \ - "-list-features should include \"undefined-command-error-code\"" + "\\^done,features=\\\[.*\"undefined-command-error-code\".*\\\]" \ + "-list-features should include \"undefined-command-error-code\"" mi_gdb_test "-undefined-command" \ - "\\^error,.*,code=\"undefined-command\"" \ - "error code when executing undefined command" + "\\^error,.*,code=\"undefined-command\"" \ + "error code when executing undefined command" diff --git a/gdb/testsuite/gdb.mi/mi-until.exp b/gdb/testsuite/gdb.mi/mi-until.exp index b027c769a6b..bf670db2cef 100644 --- a/gdb/testsuite/gdb.mi/mi-until.exp +++ b/gdb/testsuite/gdb.mi/mi-until.exp @@ -53,22 +53,22 @@ proc test_until {} { setup_kfail gdb/2104 "*-*-*" set line [gdb_get_line_number "after-loop"] mi_execute_to "exec-until" "end-stepping-range" "foo" "" ".*until.c" $line "" \ - "until after while loop" + "until after while loop" set line [gdb_get_line_number "until-here"] mi_execute_to "exec-until $line" "location-reached" "foo" "" ".*until.c" $line ""\ - "until line number" + "until line number" set line [gdb_get_line_number "until-there"] mi_execute_to "exec-until until.c:$line" "location-reached" "foo" "" ".*until.c" $line ""\ - "until line number:file" + "until line number:file" # This is supposed to NOT stop at the return statement, but right # after foo is over. set line [gdb_get_line_number "at-return"] mi_execute_to "exec-until until.c:$line" "location-reached" "main" ""\ ".*until.c" "([expr {$line-2}]|[expr {$line-1}])" ""\ - "until after current function" + "until after current function" } test_running_to_foo diff --git a/gdb/testsuite/gdb.mi/mi-var-child.c b/gdb/testsuite/gdb.mi/mi-var-child.c index 6d173d16686..09167aa5db0 100644 --- a/gdb/testsuite/gdb.mi/mi-var-child.c +++ b/gdb/testsuite/gdb.mi/mi-var-child.c @@ -65,16 +65,16 @@ typedef struct _struct_decl { struct { union { struct { - int d; - char e[10]; - int *(*func) (void); - efoo foo; + int d; + char e[10]; + int *(*func) (void); + efoo foo; } u1s1; long f; struct { - char array_ptr[2]; - int (*func) (int, char *); + char array_ptr[2]; + int (*func) (int, char *); } u1s2; } u2; @@ -194,8 +194,8 @@ do_block_tests () int foo2; foo2 = 123; { - int foo; - foo = 321; + int foo; + foo = 321; } foo2 = 0; } @@ -359,5 +359,3 @@ main (int argc, char *argv []) do_child_deletion (); exit (0); } - - diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp index c69b72a374e..1483e731336 100644 --- a/gdb/testsuite/gdb.mi/mi-var-child.exp +++ b/gdb/testsuite/gdb.mi/mi-var-child.exp @@ -63,9 +63,9 @@ mi_list_varobj_children "struct_declarations" { {struct_declarations.long_array long_array 12 "long \\[12\\]"} {struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"} {struct_declarations.func_ptr_struct func_ptr_struct 0 \ - "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} + "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} {struct_declarations.func_ptr_ptr func_ptr_ptr 0 \ - "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} + "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} {struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"} {struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"} } "get children of struct_declarations" @@ -451,7 +451,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \ # Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr mi_list_varobj_children "struct_declarations.int_ptr_ptr.*int_ptr_ptr" { {{struct_declarations.int_ptr_ptr.\*int_ptr_ptr.\*\*int_ptr_ptr} \ - {\*\*int_ptr_ptr} 0 int} + {\*\*int_ptr_ptr} 0 int} } "get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr" # Test: c_variable-4.80 @@ -481,9 +481,9 @@ mi_list_varobj_children "weird" { {weird.long_array long_array 12 "long \\[12\\]"} {weird.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"} {weird.func_ptr_struct func_ptr_struct 0 \ - "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} + "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} {weird.func_ptr_ptr func_ptr_ptr 0 \ - "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} + "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} {weird.u1 u1 4 "union \\{\\.\\.\\.\\}"} {weird.s2 s2 4 "struct \\{\\.\\.\\.\\}"} } "get children of weird" @@ -560,7 +560,7 @@ mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \ # Desc: children of *(weird->int_ptr_ptr) mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr" { {{weird->int_ptr_ptr.\*weird->int_ptr_ptr.\*\*weird->int_ptr_ptr} \ - {\*\*weird->int_ptr_ptr} 0 int} + {\*\*weird->int_ptr_ptr} 0 int} } "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr" # Test: c_variable-4.94 @@ -807,19 +807,19 @@ mi_list_varobj_children {struct_declarations.long_array --all-values} { mi_list_varobj_children {struct_declarations --simple-values} \ [list \ - {struct_declarations.integer integer 0 int 123} \ - {struct_declarations.character character 0 char {0 '\\\\000'}} \ - [list struct_declarations.char_ptr char_ptr 1 "char \\*" "$hex \\\\\"hello\\\\\""] \ - {struct_declarations.long_int long_int 0 "long" 0} \ - [list struct_declarations.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*" "$hex"] \ - {struct_declarations.long_array long_array 12 "long \\[12\\]"} \ - [list struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)" "(@$hex: |)$hex "] \ - [list struct_declarations.func_ptr_struct func_ptr_struct 0 \ - "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?" "$hex "] \ - [list struct_declarations.func_ptr_ptr func_ptr_ptr 0 \ - "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)" "$hex "] \ - {struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"} \ - {struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"} \ + {struct_declarations.integer integer 0 int 123} \ + {struct_declarations.character character 0 char {0 '\\\\000'}} \ + [list struct_declarations.char_ptr char_ptr 1 "char \\*" "$hex \\\\\"hello\\\\\""] \ + {struct_declarations.long_int long_int 0 "long" 0} \ + [list struct_declarations.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*" "$hex"] \ + {struct_declarations.long_array long_array 12 "long \\[12\\]"} \ + [list struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)" "(@$hex: |)$hex "] \ + [list struct_declarations.func_ptr_struct func_ptr_struct 0 \ + "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?" "$hex "] \ + [list struct_declarations.func_ptr_ptr func_ptr_ptr 0 \ + "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)" "$hex "] \ + {struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"} \ + {struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"} \ ] "listing of children, simple types: names, type and values, complex types: names and types" # Delete all variables @@ -860,7 +860,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr" \ # Desc: children of *(psnp->char_ptr) mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr" { {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr} \ - {\*\*psnp->char_ptr} 1 {char \*\*}} + {\*\*psnp->char_ptr} 1 {char \*\*}} } "get children of psnp->char_ptr.*psnp->char_ptr" # Test: c_variable-5.14 @@ -873,14 +873,14 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \ # Desc: children of *(*(psnp->char_ptr)) mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" { {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr} \ - {\*\*\*psnp->char_ptr} 1 {char \*}} + {\*\*\*psnp->char_ptr} 1 {char \*}} } "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" # Test: c_variable-5.15B # Desc: children of *(*(*(psnp->char_ptr))) mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" { {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \ - {\*\*\*\*psnp->char_ptr} 0 char} + {\*\*\*\*psnp->char_ptr} 0 char} } "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" # Test: c_variable-5.16 @@ -893,7 +893,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ # Desc: children of *(*(*(psnp->char_ptr))) mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" { {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \ - {\*\*\*\*psnp->char_ptr} 0 char} + {\*\*\*\*psnp->char_ptr} 0 char} } "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr after counting children" # Test: c_variable-5.18 @@ -947,7 +947,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \ # Desc: children of *(*(psnp->long_ptr)) mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" { {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr} \ - {\*\*\*psnp->long_ptr} 1 {long \*}} + {\*\*\*psnp->long_ptr} 1 {long \*}} } "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" # Test: c_variable-5.25 @@ -960,7 +960,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ # Desc: children of *(*(*(psnp->long_ptr))) mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" { {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr.\*\*\*\*psnp->long_ptr} - {\*\*\*\*psnp->long_ptr} 0 {long}} + {\*\*\*\*psnp->long_ptr} 0 {long}} } "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" # Test: c_variable-5.27 @@ -1064,14 +1064,14 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \ # Desc: children of **psnp->ptrs[0]->next->char_ptr mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" { {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr} \ - {\*\*\*char_ptr} 1 {char \*}} + {\*\*\*char_ptr} 1 {char \*}} } "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" # Test: c_variable-5.41B # Desc: children of ***psnp->ptrs[0]->next->char_ptr mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" { {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \ - {\*\*\*\*char_ptr} 0 char} + {\*\*\*\*char_ptr} 0 char} } "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" # Test: c_variable-5.42 @@ -1084,7 +1084,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ # Desc: children of ***psnp->ptrs[0]->next->char_ptr mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" { {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \ - {\*\*\*\*char_ptr} 0 char} + {\*\*\*\*char_ptr} 0 char} } "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr after counting children" # Test: c_variable-5.44 diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp index 850cb995cdb..a7fc9554684 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp @@ -574,9 +574,9 @@ mi_delete_varobj array_ptr "delete array_ptr" proc set_frozen {varobjs flag} { foreach v $varobjs { - mi_gdb_test "-var-set-frozen $v $flag" \ - "\\^done" \ - "-var-set-frozen $v $flag" + mi_gdb_test "-var-set-frozen $v $flag" \ + "\\^done" \ + "-var-set-frozen $v $flag" } } diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.cc b/gdb/testsuite/gdb.mi/mi-var-cp.cc index 3f99e1e3ff2..357b7537ebd 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cp.cc +++ b/gdb/testsuite/gdb.mi/mi-var-cp.cc @@ -146,7 +146,7 @@ int path_expression () /*: mi_create_varobj IP ip "create varobj for ip" mi_list_varobj_children IP {{IP.\\*ip \\*ip 0 int}} "list children of IP" mi_gdb_test "-var-info-path-expression IP.*ip" \ - "\\^done,path_expr=\"\\*\\(ip\\)\"" \ + "\\^done,path_expr=\"\\*\\(ip\\)\"" \ "-var-info-path-expression IP.*ip" :*/ Derived d; @@ -157,26 +157,26 @@ int path_expression () {DP.Base2 Base2 1 Base2} \ {DP.public public 1}} "list children of DP" mi_gdb_test "-var-info-path-expression DP.Base1" \ - "\\^done,path_expr=\"\\(\\*\\(class Base1\\*\\) dp\\)\"" \ + "\\^done,path_expr=\"\\(\\*\\(class Base1\\*\\) dp\\)\"" \ "-var-info-path-expression DP.Base1" mi_list_varobj_children DP.public { \ - {DP.public.i i 0 int} \ + {DP.public.i i 0 int} \ } "list children of DP.public" mi_gdb_test "-var-info-path-expression DP.public.i" \ - "\\^done,path_expr=\"\\(\\(dp\\)->i\\)\"" \ + "\\^done,path_expr=\"\\(\\(dp\\)->i\\)\"" \ "-var-info-path-expression DP.public.i" mi_list_varobj_children DP.Base1 { \ - {DP.Base1.public public 1} \ + {DP.Base1.public public 1} \ } "list children of DP.Base1" mi_list_varobj_children DP.Base1.public { \ - {DP.Base1.public.i i 0 int} \ + {DP.Base1.public.i i 0 int} \ } "list children of DP.Base1.public" mi_gdb_test "-var-info-path-expression DP.Base1.public.i" \ - "\\^done,path_expr=\"\\(\\(\\(\\*\\(class Base1\\*\\) dp\\)\\).i\\)\"" \ + "\\^done,path_expr=\"\\(\\(\\(\\*\\(class Base1\\*\\) dp\\)\\).i\\)\"" \ "-var-info-path-expression DP.Base1.public.i" mi_gdb_test "-var-info-path-expression DP.public" \ - "\\^done,path_expr=\"\"" \ + "\\^done,path_expr=\"\"" \ "-var-info-path-expression DP.public" mi_create_varobj D d "create varobj for d" @@ -185,19 +185,19 @@ int path_expression () {D.Base2 Base2 1 Base2} \ {D.public public 1}} "list children of D" mi_gdb_test "-var-info-path-expression D.Base1" \ - "\\^done,path_expr=\"\\(\\(class Base1\\) d\\)\"" \ + "\\^done,path_expr=\"\\(\\(class Base1\\) d\\)\"" \ "-var-info-path-expression D.Base1" :*/ int array[4] = {1,2,3}; array[3] = 10; /*: mi_create_varobj A array "create varobj for array" mi_list_varobj_children A { \ - {A.0 0 0 int} - {A.1 1 0 int} - {A.2 2 0 int} - {A.3 3 0 int}} "list children of A" + {A.0 0 0 int} + {A.1 1 0 int} + {A.2 2 0 int} + {A.3 3 0 int}} "list children of A" mi_gdb_test "-var-info-path-expression A.2" \ - "\\^done,path_expr=\"\\(array\\)\\\[2\\\]\"" \ + "\\^done,path_expr=\"\\(array\\)\\\[2\\\]\"" \ "-var-info-path-expression A.2" :*/ @@ -219,15 +219,15 @@ public: struct { /* index: 1 */ int e; struct { /* index: 0 */ - int f; - union { /* index: 0 */ - int g; - char h; - }; + int f; + union { /* index: 0 */ + int g; + char h; + }; }; union { /* index: 0 */ - int i; - char j; + int i; + char j; }; }; }; diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.exp b/gdb/testsuite/gdb.mi/mi-var-cp.exp index eee10078ebd..c1a31b2fe6b 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cp.exp +++ b/gdb/testsuite/gdb.mi/mi-var-cp.exp @@ -58,32 +58,32 @@ set tree { Anonymous a { {} public { anonymous struct { - {} public { - int b {} - } + {} public { + int b {} + } } anonymous struct { - {} public { - int c {} - } + {} public { + int c {} + } } anonymous struct { - {} public { - int d {} - anonymous struct { - {} public { - int e {} - anonymous struct { - {} public { - int f {} - anonymous union { - {} public { - int g {} - char h {} - } - } - } - } + {} public { + int d {} + anonymous struct { + {} public { + int e {} + anonymous struct { + {} public { + int f {} + anonymous union { + {} public { + int g {} + char h {} + } + } + } + } anonymous union { {} public { int i {} diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp index 52a52763445..4dc3b0ccf29 100644 --- a/gdb/testsuite/gdb.mi/mi-var-display.exp +++ b/gdb/testsuite/gdb.mi/mi-var-display.exp @@ -217,19 +217,19 @@ mi_gdb_test "-var-delete foo" \ mi_create_varobj weird weird "create local variable weird" mi_list_varobj_children weird { - {weird.integer integer 0 int} - {weird.character character 0 char} - {weird.char_ptr char_ptr 1 "char \\*"} - {weird.long_int long_int 0 "long"} - {weird.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*"} - {weird.long_array long_array 10 "long \\[10\\]"} - {weird.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"} - {weird.func_ptr_struct func_ptr_struct 0 \ - "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} - {weird.func_ptr_ptr func_ptr_ptr 0 \ - "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} - {weird.u1 u1 4 "union \\{\\.\\.\\.\\}"} - {weird.s2 s2 4 "struct \\{\\.\\.\\.\\}"} + {weird.integer integer 0 int} + {weird.character character 0 char} + {weird.char_ptr char_ptr 1 "char \\*"} + {weird.long_int long_int 0 "long"} + {weird.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*"} + {weird.long_array long_array 10 "long \\[10\\]"} + {weird.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"} + {weird.func_ptr_struct func_ptr_struct 0 \ + "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} + {weird.func_ptr_ptr func_ptr_ptr 0 \ + "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} + {weird.u1 u1 4 "union \\{\\.\\.\\.\\}"} + {weird.s2 s2 4 "struct \\{\\.\\.\\.\\}"} } "get children local variable weird" @@ -429,8 +429,8 @@ mi_gdb_test "-var-info-num-children u" \ # Test: c_variable-7.15 # Desc: children of u mi_list_varobj_children u { - {u.integer integer 0 int} - {u.char_ptr char_ptr 1 {char \*}} + {u.integer integer 0 int} + {u.char_ptr char_ptr 1 {char \*}} } "get children of u" # Test: c_variable-7.20 @@ -464,9 +464,9 @@ mi_gdb_test "-var-info-num-children anonu" \ # Test: c_variable-7.25 # Desc: children of anonu mi_list_varobj_children "anonu" { - {anonu.a a 0 int} - {anonu.b b 0 char} - {anonu.c c 0 "long"} + {anonu.a a 0 int} + {anonu.b b 0 char} + {anonu.c c 0 "long"} } "get children of anonu" # Test: c_variable-7.30 @@ -501,12 +501,12 @@ mi_gdb_test "-var-info-num-children s" \ # Test: c_variable-7.35 # Desc: children of s mi_list_varobj_children s { - {s.integer integer 0 int} - {s.unsigned_integer unsigned_integer 0 "unsigned int"} - {s.character character 0 char} - {s.signed_character signed_character 0 "signed char"} - {s.char_ptr char_ptr 1 {char \*}} - {s.array_of_10 array_of_10 10 {int \[10\]}} + {s.integer integer 0 int} + {s.unsigned_integer unsigned_integer 0 "unsigned int"} + {s.character character 0 char} + {s.signed_character signed_character 0 "signed char"} + {s.char_ptr char_ptr 1 {char \*}} + {s.array_of_10 array_of_10 10 {int \[10\]}} } "get children of s" #} {integer unsigned_integer character signed_character char_ptr array_of_10} @@ -541,9 +541,9 @@ mi_gdb_test "-var-info-num-children anons" \ # Test: c_variable-7.45 # Desc: children of anons mi_list_varobj_children anons { - {anons.a a 0 int} - {anons.b b 0 char} - {anons.c c 0 "long"} + {anons.a a 0 int} + {anons.b b 0 char} + {anons.c c 0 "long"} } "get children of anons" # Test: c_variable-7.50 diff --git a/gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp b/gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp index 597e2e0369d..2d09c462e5e 100644 --- a/gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp +++ b/gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp @@ -55,4 +55,3 @@ mi_continue_to_line $line_valid_pointer_value "continue to valid pointer value" mi_gdb_test "-var-update var1" "\\^done,changelist=\\\[{name=\"var1\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"},{name=\"var1.inner\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"}\\\]" "update variable object" mi_gdb_test "-var-list-children var1" "\\^done,numchild=\"1\",children=\\\[child={name=\"var1.inner\",exp=\"inner\",numchild=\"1\",type=\"struct inner \\*\",thread-id=\"1\"}\\\],has_more=\"0\"" "list children #2" - diff --git a/gdb/testsuite/gdb.mi/mi-var-rtti.cc b/gdb/testsuite/gdb.mi/mi-var-rtti.cc index c0c3973bcea..f8470f4d2d9 100644 --- a/gdb/testsuite/gdb.mi/mi-var-rtti.cc +++ b/gdb/testsuite/gdb.mi/mi-var-rtti.cc @@ -327,7 +327,7 @@ void skip_type_update_when_not_use_rtti_test () ptr = &d; s.ptr = &d; /*: - with_test_prefix "ptr points at d" { + with_test_prefix "ptr points at d" { mi_varobj_update PTR {PTR PTR.public.A} \ "update ptr to derived type in $testname" check_derived_without_rtti PTR ptr $testname @@ -341,7 +341,7 @@ void skip_type_update_when_not_use_rtti_test () ptr = 0; s.ptr = 0; /*: - with_test_prefix "ptr is nullptr again" { + with_test_prefix "ptr is nullptr again" { mi_varobj_update PTR {PTR PTR.public.A} \ "update ptr back to base type in $testname" mi_delete_varobj PTR "delete varobj for ptr in $testname" diff --git a/gdb/testsuite/gdb.mi/mi-var-rtti.exp b/gdb/testsuite/gdb.mi/mi-var-rtti.exp index 2482df7c403..f25d2013496 100644 --- a/gdb/testsuite/gdb.mi/mi-var-rtti.exp +++ b/gdb/testsuite/gdb.mi/mi-var-rtti.exp @@ -35,21 +35,21 @@ mi_prepare_inline_tests $srcfile proc set_print_object {state testname} { mi_gdb_test "-interpreter-exec console \"set print object ${state}\"" \ "(.*=cmd-param-changed,param=\"print object\",value=\"${state}\".*|)\\^done" \ - "-interpreter-exec console \"set print object ${state}\" in $testname" + "-interpreter-exec console \"set print object ${state}\" in $testname" } proc check_derived_children_without_rtti {varobj_name var_name testname} { mi_list_varobj_children ${varobj_name} " - { ${varobj_name}.public public 1 } + { ${varobj_name}.public public 1 } " "list children of ${var_name} (without RTTI) in $testname" mi_list_varobj_children "${varobj_name}.public" " - { ${varobj_name}.public.A A 0 int } + { ${varobj_name}.public.A A 0 int } " "list children of ${var_name}.public (without RTTI) in $testname" } proc check_derived_content_without_rtti {varobj_name var_name testname} { mi_check_varobj_value ${varobj_name}.public.A 1 \ - "check ${var_name}->A (without RTTI) in $testname" + "check ${var_name}->A (without RTTI) in $testname" } proc check_derived_without_rtti {varobj_name var_name testname} { @@ -60,36 +60,36 @@ proc check_derived_without_rtti {varobj_name var_name testname} { proc check_new_derived_without_rtti {var_name var_type testname} { set varobj_name VAR mi_create_varobj_checked ${varobj_name} ${var_name} ${var_type} \ - "create varobj for ${var_name} (without RTTI) in ${testname}" + "create varobj for ${var_name} (without RTTI) in ${testname}" check_derived_without_rtti ${varobj_name} ${var_name} ${testname} mi_delete_varobj ${varobj_name} \ - "delete varobj for ${var_name} (without RTTI) in ${testname}" + "delete varobj for ${var_name} (without RTTI) in ${testname}" } proc check_derived_children_with_rtti {varobj_name var_name testname} { mi_list_varobj_children ${varobj_name} " - { ${varobj_name}.Base Base 1 Base } - { ${varobj_name}.public public 2 } + { ${varobj_name}.Base Base 1 Base } + { ${varobj_name}.public public 2 } " "list children of ${var_name} (with RTTI) in $testname" mi_list_varobj_children "${varobj_name}.Base" " - { ${varobj_name}.Base.public public 1 } + { ${varobj_name}.Base.public public 1 } " "list children of ${var_name}.Base (with RTTI) in $testname" mi_list_varobj_children "${varobj_name}.Base.public" " - { ${varobj_name}.Base.public.A A 0 int } + { ${varobj_name}.Base.public.A A 0 int } " "list children of ${var_name}.Base.public (with RTTI) in $testname" mi_list_varobj_children "${varobj_name}.public" " - { ${varobj_name}.public.B B 0 int } - { ${varobj_name}.public.C C 0 int } + { ${varobj_name}.public.B B 0 int } + { ${varobj_name}.public.C C 0 int } " "list children of ${var_name}.public (with RTTI) in $testname" } proc check_derived_content_with_rtti {varobj_name var_name testname} { mi_check_varobj_value ${varobj_name}.Base.public.A 1 \ - "check ${var_name}->A (with RTTI) in $testname" + "check ${var_name}->A (with RTTI) in $testname" mi_check_varobj_value ${varobj_name}.public.B 2 \ - "check ${var_name}->B (with RTTI) in $testname" + "check ${var_name}->B (with RTTI) in $testname" mi_check_varobj_value ${varobj_name}.public.C 3 \ - "check ${var_name}->C (with RTTI) in $testname" + "check ${var_name}->C (with RTTI) in $testname" } proc check_derived_with_rtti {varobj_name var_name testname} { @@ -100,10 +100,10 @@ proc check_derived_with_rtti {varobj_name var_name testname} { proc check_new_derived_with_rtti {var_name var_type testname} { set varobj_name VAR mi_create_varobj_checked ${varobj_name} ${var_name} ${var_type} \ - "create varobj for ${var_name} (with RTTI) in $testname" + "create varobj for ${var_name} (with RTTI) in $testname" check_derived_with_rtti ${varobj_name} ${var_name} $testname mi_delete_varobj ${varobj_name} \ - "delete varobj for ${var_name} (with RTTI) in $testname" + "delete varobj for ${var_name} (with RTTI) in $testname" } set inline_tests { diff --git a/gdb/testsuite/gdb.mi/mi-vla-c99.exp b/gdb/testsuite/gdb.mi/mi-vla-c99.exp index 5f23d059d88..5c81620d4de 100644 --- a/gdb/testsuite/gdb.mi/mi-vla-c99.exp +++ b/gdb/testsuite/gdb.mi/mi-vla-c99.exp @@ -24,7 +24,7 @@ set MIFLAGS "-i=mi" standard_testfile vla.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" \ - "${binfile}" executable {debug}] != "" } { + "${binfile}" executable {debug}] != "" } { untested "failed to compile" return -1 } @@ -41,8 +41,8 @@ mi_create_breakpoint "-t vla.c:$bp_lineno" \ mi_run_cmd mi_expect_stop "breakpoint-hit" "func" "\{name=\"n\",value=\"5\"\}" \ - ".*vla.c" "$bp_lineno" { "" "disp=\"del\"" } \ - "run to breakpoint at line $bp_lineno" + ".*vla.c" "$bp_lineno" { "" "disp=\"del\"" } \ + "run to breakpoint at line $bp_lineno" mi_gdb_test "500-data-evaluate-expression vla" \ "500\\^done,value=\"\\{0, 1, 2, 3, 4\\}\"" "evaluate complete vla" @@ -57,7 +57,7 @@ mi_gdb_test "503-data-evaluate-expression vla\[4\]" \ "503\\^done,value=\"4\"" "evaluate vla\[4\]" mi_create_varobj_checked vla vla "int \\\[5\\\]" \ - "create local variable vla" + "create local variable vla" mi_gdb_test "504-var-info-type vla" \ "504\\^done,type=\"int \\\[5\\\]\"" \ diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp index 1ddd94eff20..2973208e59d 100644 --- a/gdb/testsuite/gdb.mi/mi-watch.exp +++ b/gdb/testsuite/gdb.mi/mi-watch.exp @@ -52,12 +52,12 @@ proc test_watchpoint_creation_and_listing {} { # -break-list mi_gdb_test "111-break-watch C" \ - "111\\^done,wpt=\{number=\"2\",exp=\"C\"\}" \ - "break-watch operation" + "111\\^done,wpt=\{number=\"2\",exp=\"C\"\}" \ + "break-watch operation" mi_gdb_test "222-break-list" \ "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",what=\"C\",thread-groups=\\\[\"i1\"\\\],times=\"0\",original-location=\"C\"\}\\\]\}" \ - "list of watchpoints" + "list of watchpoints" } @@ -76,12 +76,12 @@ proc test_awatch_creation_and_listing {} { # -break-list mi_gdb_test "333-break-watch -a A" \ - "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_main_body\"\}" \ - "break-watch -a operation" + "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_main_body\"\}" \ + "break-watch -a operation" mi_gdb_test "444-break-list" \ "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",thread-groups=\\\[\"i1\"\\\],times=\"0\"\},.*\}\\\]\}" \ - "list of watchpoints awatch" + "list of watchpoints awatch" mi_gdb_test "777-break-delete 3" \ "777\\^done" \ @@ -103,12 +103,12 @@ proc test_rwatch_creation_and_listing {} { # -break-list mi_gdb_test "200-break-watch -r C" \ - "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \ - "break-watch -r operation" + "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \ + "break-watch -r operation" mi_gdb_test "300-break-list" \ "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",thread-groups=\\\[\"i1\"\\\],times=\"0\"\},.*\}\\\}\}" \ - "list of breakpoints" + "list of breakpoints" mi_gdb_test "177-break-delete 4" \ "177\\^done" \ @@ -130,14 +130,14 @@ proc test_watchpoint_triggering {} { # -exec-continue (Here wp goes out of scope) mi_execute_to "exec-continue" "watchpoint-trigger" "callee4" "" \ - ".*basics.c" $line_callee4_return_0 \ - {"" "wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\}"} \ - "watchpoint trigger" + ".*basics.c" $line_callee4_return_0 \ + {"" "wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\}"} \ + "watchpoint trigger" mi_execute_to "exec-continue" "watchpoint-scope" "callee3" ".*" \ - ".*basics.c" $line_callee3_close_brace \ - {"" "wpnum=\"2\""} \ - "watchpoint scope" + ".*basics.c" $line_callee3_close_brace \ + {"" "wpnum=\"2\""} \ + "watchpoint scope" } proc test_watchpoint_all {mi_mode type} { diff --git a/gdb/testsuite/gdb.mi/mi2-var-child.exp b/gdb/testsuite/gdb.mi/mi2-var-child.exp index 4ee19f04641..54733594394 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-child.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-child.exp @@ -63,9 +63,9 @@ mi_list_varobj_children "struct_declarations" { {struct_declarations.long_array long_array 10 "long \\[10\\]"} {struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"} {struct_declarations.func_ptr_struct func_ptr_struct 0 \ - "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} + "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} {struct_declarations.func_ptr_ptr func_ptr_ptr 0 \ - "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} + "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} {struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"} {struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"} } "get children of struct_declarations" @@ -451,7 +451,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \ # Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr mi_list_varobj_children "struct_declarations.int_ptr_ptr.*int_ptr_ptr" { {{struct_declarations.int_ptr_ptr.\*int_ptr_ptr.\*\*int_ptr_ptr} \ - {\*\*int_ptr_ptr} 0 int} + {\*\*int_ptr_ptr} 0 int} } "get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr" # Test: c_variable-4.80 @@ -481,9 +481,9 @@ mi_list_varobj_children "weird" { {weird.long_array long_array 10 "long \\[10\\]"} {weird.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"} {weird.func_ptr_struct func_ptr_struct 0 \ - "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} + "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long\\))?"} {weird.func_ptr_ptr func_ptr_ptr 0 \ - "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} + "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long)?\\)"} {weird.u1 u1 4 "union \\{\\.\\.\\.\\}"} {weird.s2 s2 4 "struct \\{\\.\\.\\.\\}"} } "get children of weird" @@ -560,7 +560,7 @@ mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \ # Desc: children of *(weird->int_ptr_ptr) mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr" { {{weird->int_ptr_ptr.\*weird->int_ptr_ptr.\*\*weird->int_ptr_ptr} \ - {\*\*weird->int_ptr_ptr} 0 int} + {\*\*weird->int_ptr_ptr} 0 int} } "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr" # Test: c_variable-4.94 @@ -800,7 +800,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr" \ # Desc: children of *(psnp->char_ptr) mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr" { {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr} \ - {\*\*psnp->char_ptr} 1 {char \*\*}} + {\*\*psnp->char_ptr} 1 {char \*\*}} } "get children of psnp->char_ptr.*psnp->char_ptr" # Test: c_variable-5.14 @@ -813,14 +813,14 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \ # Desc: children of *(*(psnp->char_ptr)) mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" { {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr} \ - {\*\*\*psnp->char_ptr} 1 {char \*}} + {\*\*\*psnp->char_ptr} 1 {char \*}} } "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" # Test: c_variable-5.15B # Desc: children of *(*(*(psnp->char_ptr))) mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" { {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \ - {\*\*\*\*psnp->char_ptr} 0 char} + {\*\*\*\*psnp->char_ptr} 0 char} } "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" # Test: c_variable-5.16 @@ -833,7 +833,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ # Desc: children of *(*(*(psnp->char_ptr))) mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" { {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \ - {\*\*\*\*psnp->char_ptr} 0 char} + {\*\*\*\*psnp->char_ptr} 0 char} } "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr after counting children" # Test: c_variable-5.18 @@ -887,7 +887,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \ # Desc: children of *(*(psnp->long_ptr)) mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" { {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr} \ - {\*\*\*psnp->long_ptr} 1 {long \*}} + {\*\*\*psnp->long_ptr} 1 {long \*}} } "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" # Test: c_variable-5.25 @@ -900,7 +900,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ # Desc: children of *(*(*(psnp->long_ptr))) mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" { {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr.\*\*\*\*psnp->long_ptr} - {\*\*\*\*psnp->long_ptr} 0 {long}} + {\*\*\*\*psnp->long_ptr} 0 {long}} } "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" # Test: c_variable-5.27 @@ -1005,14 +1005,14 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \ # Desc: children of **psnp->ptrs[0]->next->char_ptr mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" { {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr} \ - {\*\*\*char_ptr} 1 {char \*}} + {\*\*\*char_ptr} 1 {char \*}} } "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" # Test: c_variable-5.41B # Desc: children of ***psnp->ptrs[0]->next->char_ptr mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" { {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \ - {\*\*\*\*char_ptr} 0 char} + {\*\*\*\*char_ptr} 0 char} } "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" # Test: c_variable-5.42 @@ -1025,7 +1025,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ # Desc: children of ***psnp->ptrs[0]->next->char_ptr mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" { {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \ - {\*\*\*\*char_ptr} 0 char} + {\*\*\*\*char_ptr} 0 char} } "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr after counting children" # Test: c_variable-5.44 @@ -1260,26 +1260,26 @@ set struct_ss_tree { } {union u_ab} u1 { {struct s_a} a { - int a {} + int a {} } {struct s_b} b { - int b {} + int b {} } } anonymous union { {struct s_a} a2 { - int a {} + int a {} } {struct s_b} b2 { - int b {} + int b {} } } {union {...}} u2 { {struct s_a} a3 { - int a {} + int a {} } {struct s_b} b3 { - int b {} + int b {} } } } diff --git a/gdb/testsuite/gdb.mi/non-stop.c b/gdb/testsuite/gdb.mi/non-stop.c index 0f31dad9cca..83df09131e6 100644 --- a/gdb/testsuite/gdb.mi/non-stop.c +++ b/gdb/testsuite/gdb.mi/non-stop.c @@ -77,4 +77,3 @@ main (int argc, char *argv[]) return 0; } - diff --git a/gdb/testsuite/gdb.mi/nsintrall.c b/gdb/testsuite/gdb.mi/nsintrall.c index 36bef7e1845..760ed673900 100644 --- a/gdb/testsuite/gdb.mi/nsintrall.c +++ b/gdb/testsuite/gdb.mi/nsintrall.c @@ -36,7 +36,7 @@ int main() { { args[i] = 1; res = pthread_create(&threads[i - 1], - NULL, + NULL, thread_function, (void *) i); } diff --git a/gdb/testsuite/gdb.mi/pthreads.c b/gdb/testsuite/gdb.mi/pthreads.c index 8a6c5e8a5a3..2ba86984ed1 100644 --- a/gdb/testsuite/gdb.mi/pthreads.c +++ b/gdb/testsuite/gdb.mi/pthreads.c @@ -72,4 +72,3 @@ main (int argc, char *argv[]) printf ("hello\n"); return 0; } - diff --git a/gdb/testsuite/gdb.mi/run-with-two-mi-uis.exp b/gdb/testsuite/gdb.mi/run-with-two-mi-uis.exp index c9e352df40a..7ce7115611c 100644 --- a/gdb/testsuite/gdb.mi/run-with-two-mi-uis.exp +++ b/gdb/testsuite/gdb.mi/run-with-two-mi-uis.exp @@ -68,4 +68,3 @@ proc do_test { ui_to_run } { foreach_with_prefix ui_to_run {first second} { do_test $ui_to_run } - diff --git a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp index 8a4827fd4a8..618bed48ea8 100644 --- a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp +++ b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp @@ -208,7 +208,7 @@ proc make_mi_re { mode thread frame type } { # details. proc make_cli_in_mi_re { command cli_in_mi_mode mode event inf cli_thread - mi_thread frame } { + mi_thread frame } { global srcfile global thread_loop_line global main_break_line diff --git a/gdb/testsuite/gdb.mi/var-cmd.c b/gdb/testsuite/gdb.mi/var-cmd.c index fa17f69b0d2..dc7caddde2f 100644 --- a/gdb/testsuite/gdb.mi/var-cmd.c +++ b/gdb/testsuite/gdb.mi/var-cmd.c @@ -65,16 +65,16 @@ typedef struct _struct_decl { struct { union { struct { - int d; - char e[10]; - int *(*func) (void); - efoo foo; + int d; + char e[10]; + int *(*func) (void); + efoo foo; } u1s1; long f; struct { - char array_ptr[2]; - int (*func) (int, char *); + char array_ptr[2]; + int (*func) (int, char *); } u1s2; } u2; @@ -217,8 +217,8 @@ do_block_tests () int foo2; foo2 = 123; { - int foo; - foo = 321; + int foo; + foo = 321; } foo2 = 0; } @@ -529,7 +529,7 @@ struct Data { /* Accessing a value of a bitfield whose type is a typed used to result in division by zero. See: - http://sourceware.org/bugzilla/show_bug.cgi?id=10884 + http://sourceware.org/bugzilla/show_bug.cgi?id=10884 This tests for this bug. */ @@ -540,8 +540,8 @@ void do_bitfield_tests () /*: mi_create_varobj V d "create varobj for Data" mi_list_varobj_children "V" { - {"V.alloc" "alloc" "0" "int"} - {"V.sharable" "sharable" "0" "uint_for_mi_testing"} + {"V.alloc" "alloc" "0" "int"} + {"V.sharable" "sharable" "0" "uint_for_mi_testing"} } "list children of Data" mi_check_varobj_value V.sharable 3 "access bitfield" :*/ @@ -662,5 +662,3 @@ main (int argc, char *argv []) do_nested_struct_union_tests (); exit (0); } - - diff --git a/gdb/testsuite/gdb.multi/base.exp b/gdb/testsuite/gdb.multi/base.exp index 4268149b586..de47b99b60f 100644 --- a/gdb/testsuite/gdb.multi/base.exp +++ b/gdb/testsuite/gdb.multi/base.exp @@ -190,4 +190,3 @@ gdb_test_multiple "info inferiors" "check remove-inferiors" { } } } - diff --git a/gdb/testsuite/gdb.multi/bkpt-multi-exec.c b/gdb/testsuite/gdb.multi/bkpt-multi-exec.c index eb002fb2545..db943676544 100644 --- a/gdb/testsuite/gdb.multi/bkpt-multi-exec.c +++ b/gdb/testsuite/gdb.multi/bkpt-multi-exec.c @@ -18,6 +18,6 @@ int main (int argc, char ** argv) printf ("foll-exec is about to execl(crashme)...\n"); execl (prog, - prog, - (char *)0); + prog, + (char *)0); } diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.c b/gdb/testsuite/gdb.multi/multi-arch-exec.c index 98f6b150890..50a061c087d 100644 --- a/gdb/testsuite/gdb.multi/multi-arch-exec.c +++ b/gdb/testsuite/gdb.multi/multi-arch-exec.c @@ -68,8 +68,8 @@ main (int argc, char ** argv) pthread_barrier_wait (&barrier); execl (prog, - prog, - (char *) NULL); + prog, + (char *) NULL); perror ("execl failed"); exit (1); } diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.exp b/gdb/testsuite/gdb.multi/multi-arch-exec.exp index 435efc59e5d..3096c7ae5c5 100644 --- a/gdb/testsuite/gdb.multi/multi-arch-exec.exp +++ b/gdb/testsuite/gdb.multi/multi-arch-exec.exp @@ -146,7 +146,7 @@ proc build_executables { first_arch } { } proc do_test { first_arch mode selected_thread } { - global bkptno_numopt_re + global bkptno_numopt_re set from_exec "$first_arch-multi-arch-exec" clean_restart ${from_exec} diff --git a/gdb/testsuite/gdb.multi/remove-inferiors.c b/gdb/testsuite/gdb.multi/remove-inferiors.c index 4c037df9cb8..6d906ec306c 100644 --- a/gdb/testsuite/gdb.multi/remove-inferiors.c +++ b/gdb/testsuite/gdb.multi/remove-inferiors.c @@ -20,4 +20,3 @@ main (void) { return 0; } - diff --git a/gdb/testsuite/gdb.objc/basicclass.exp b/gdb/testsuite/gdb.objc/basicclass.exp index 9e40c7138dc..b5fb4d70302 100644 --- a/gdb/testsuite/gdb.objc/basicclass.exp +++ b/gdb/testsuite/gdb.objc/basicclass.exp @@ -170,5 +170,3 @@ gdb_test "print-object object" \ gdb_test "po self" \ "BasicClass gdb test object" \ "use of the po (print-object) command" - - diff --git a/gdb/testsuite/gdb.objc/nondebug.exp b/gdb/testsuite/gdb.objc/nondebug.exp index 9ca86ff8189..2cd25b19315 100644 --- a/gdb/testsuite/gdb.objc/nondebug.exp +++ b/gdb/testsuite/gdb.objc/nondebug.exp @@ -55,4 +55,3 @@ gdb_test_multiple "break someMethod" $name \ -re "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+.*$gdb_prompt $" { pass $name } -re ".*$gdb_prompt $" { kfail "gdb/1236" $name } } - diff --git a/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp b/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp index c6457c73253..c00edb5d88f 100644 --- a/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp +++ b/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp @@ -41,4 +41,3 @@ gdb_test_multiple "print operand1" "print operand1" { -re "\\\$$decimal = \r\n$gdb_prompt $" { pass "print operand1"} -re "$hex\r\n$gdb_prompt $" { gdb_test "print *operand1" "14" "print operand1" } } - diff --git a/gdb/testsuite/gdb.opt/inline-break.exp b/gdb/testsuite/gdb.opt/inline-break.exp index 0805f693e69..672d7e1f72b 100644 --- a/gdb/testsuite/gdb.opt/inline-break.exp +++ b/gdb/testsuite/gdb.opt/inline-break.exp @@ -20,7 +20,7 @@ standard_testfile if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ - {debug additional_flags=-Winline}] } { + {debug additional_flags=-Winline}] } { return -1 } diff --git a/gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas b/gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas index cb6755d38e2..b71356aee17 100644 --- a/gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas +++ b/gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas @@ -60,4 +60,3 @@ begin else writeln('check OK'); end. - diff --git a/gdb/testsuite/gdb.pascal/gdb11492.exp b/gdb/testsuite/gdb.pascal/gdb11492.exp index 67764c5f465..d1a52af6331 100644 --- a/gdb/testsuite/gdb.pascal/gdb11492.exp +++ b/gdb/testsuite/gdb.pascal/gdb11492.exp @@ -51,4 +51,3 @@ with_test_prefix "after assignment" { gdb_test "print char_array" " = '2345X789'" } gdb_exit - diff --git a/gdb/testsuite/gdb.pascal/gdb11492.pas b/gdb/testsuite/gdb.pascal/gdb11492.pas index ffaa52e9922..2579fdd837b 100644 --- a/gdb/testsuite/gdb.pascal/gdb11492.pas +++ b/gdb/testsuite/gdb.pascal/gdb11492.pas @@ -37,4 +37,3 @@ begin Writeln('integer array, index 5 is ',integer_array[5]); Writeln('char array, index 5 is ',char_array[5]); end. - diff --git a/gdb/testsuite/gdb.pascal/hello.exp b/gdb/testsuite/gdb.pascal/hello.exp index ac102805a18..bb28e2b529f 100644 --- a/gdb/testsuite/gdb.pascal/hello.exp +++ b/gdb/testsuite/gdb.pascal/hello.exp @@ -38,8 +38,8 @@ if { [gdb_breakpoint ${srcfile}:${bp_location2}] } { } gdb_test "cont" \ - "Breakpoint .*:${bp_location1}.*" \ - "Going to first breakpoint" + "Breakpoint .*:${bp_location1}.*" \ + "Going to first breakpoint" gdb_test "print st" \ ".* = ''.*" \ "empty string check" diff --git a/gdb/testsuite/gdb.pascal/hello.pas b/gdb/testsuite/gdb.pascal/hello.pas index e43a1a408cc..33f01b4caea 100644 --- a/gdb/testsuite/gdb.pascal/hello.pas +++ b/gdb/testsuite/gdb.pascal/hello.pas @@ -6,10 +6,10 @@ var procedure print_hello; begin Writeln('Before assignment'); { set breakpoint 1 here } - st:='Hello, world!'; + st:='Hello, world!'; writeln(st); {set breakpoint 2 here } end; begin print_hello; -end. +end. diff --git a/gdb/testsuite/gdb.python/py-auto-load-chaining.c b/gdb/testsuite/gdb.python/py-auto-load-chaining.c index 74ec04fa94b..1b6508ce73a 100644 --- a/gdb/testsuite/gdb.python/py-auto-load-chaining.c +++ b/gdb/testsuite/gdb.python/py-auto-load-chaining.c @@ -33,7 +33,7 @@ allocate_page (void) void *addr; int pgsize = sysconf(_SC_PAGE_SIZE); addr = mmap (NULL, pgsize, PROT_EXEC | PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (addr == MAP_FAILED) perror ("mmap"); } diff --git a/gdb/testsuite/gdb.python/py-block.exp b/gdb/testsuite/gdb.python/py-block.exp index ce3f7ce04c4..5d0d40854b2 100644 --- a/gdb/testsuite/gdb.python/py-block.exp +++ b/gdb/testsuite/gdb.python/py-block.exp @@ -45,9 +45,9 @@ gdb_test "python print (block.start)" "${decimal}" "check start not None" gdb_test "python print (block.end)" "${decimal}" "check end not None" gdb_test "python print (block\['f'\].name == 'f')" "True" "check variable access" gdb_test "python print (block\['nonexistent'\])" ".*KeyError.*: 'nonexistent'.*" \ - "check nonexistent variable" + "check nonexistent variable" gdb_test "python print (block\[42\])" ".*TypeError.*: Expected a string.*" \ - "check non-string key" + "check non-string key" # Test global/static blocks gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0 @@ -71,7 +71,7 @@ gdb_test_no_output "python block = block.superblock" "get superblock" gdb_test "python print (block.function)" "None" "second anonymous block" gdb_test_no_output "python block = block.superblock" "get superblock 2" gdb_test "python print (block.function)" "block_func" \ - "Print superblock 2 function" + "Print superblock 2 function" # Switch frames, then test block for no_locals_func. gdb_test "continue" ".*" "continue to no_locals_func breakpoint" @@ -110,7 +110,7 @@ gdb_test "up" ".*" gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame 2" 0 gdb_py_test_silent_cmd "python block = frame.block()" "Get Frame 2's block" 0 gdb_test "python print (repr (block))" "" \ - "Check Frame 2's block not None" + "Check Frame 2's block not None" gdb_test "python print (block.function)" "main" "main block" # Test Block is_valid. This must always be the last test in this @@ -120,15 +120,15 @@ gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0 gdb_py_test_silent_cmd "python block = frame.block()" "Get Frame block" 0 gdb_py_test_silent_cmd "python block_iter = iter (block)" "Get Frame block" 0 gdb_test "python print (block.is_valid())" "True" \ - "Check block validity" + "Check block validity" gdb_test "python print (block_iter.is_valid())" "True" \ - "Check block_iter validity" + "Check block_iter validity" gdb_test_no_output "python x = hash(block)" "block is hashable" gdb_test "python print (type (x))" "" "block hash is integer" gdb_unload gdb_test "python print (block.is_valid())" "False" \ - "Check block validity after unload" + "Check block validity after unload" gdb_test "python print (block_iter.is_valid())" "False" \ - "Check block_iter validity after unload" + "Check block_iter validity after unload" gdb_test "python print (hash (block) == x)" "True" \ "block hash did not change" diff --git a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp index 4098a7a824d..03056049bd7 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp @@ -46,9 +46,9 @@ gdb_test "break foo" set test "continuing to foo" gdb_test_multiple "continue" "$test" { -re "MyBP\.stop was invoked\!.*$gdb_prompt $" { - fail "$test" + fail "$test" } -re "Continuing.*Breakpoint 2, foo.*$gdb_prompt $" { - pass "$test" + pass "$test" } } diff --git a/gdb/testsuite/gdb.python/py-disasm.exp.tcl b/gdb/testsuite/gdb.python/py-disasm.exp.tcl index 5f4574702e7..c936f0d7a04 100644 --- a/gdb/testsuite/gdb.python/py-disasm.exp.tcl +++ b/gdb/testsuite/gdb.python/py-disasm.exp.tcl @@ -51,7 +51,7 @@ if { $kind == "obj" } { set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-disasm.py] gdb_test "source ${pyfile}" "Python script imported" \ - "import python scripts" + "import python scripts" set line [gdb_get_line_number "Break here."] diff --git a/gdb/testsuite/gdb.python/py-events-shlib.c b/gdb/testsuite/gdb.python/py-events-shlib.c index d77517a79a8..d480da2efd7 100644 --- a/gdb/testsuite/gdb.python/py-events-shlib.c +++ b/gdb/testsuite/gdb.python/py-events-shlib.c @@ -17,4 +17,3 @@ void do_nothing (void) {} - diff --git a/gdb/testsuite/gdb.python/py-evsignal.exp b/gdb/testsuite/gdb.python/py-evsignal.exp index 22b13afea27..86444d714aa 100644 --- a/gdb/testsuite/gdb.python/py-evsignal.exp +++ b/gdb/testsuite/gdb.python/py-evsignal.exp @@ -39,9 +39,9 @@ gdb_test_no_output "set non-stop on" gdb_run_cmd gdb_test_multiple "" "signal Thread 3" { -re "event type: stop\r\nstop reason: signal\r\nstop signal: SIGUSR1\r\nthread num: 3\r\nevent type: stop\r\n.*$gdb_prompt $" { - pass "thread 3 was signaled" + pass "thread 3 was signaled" } -re "The target does not support running in non-stop mode" { - unsupported "non-stop mode is unsupported" + unsupported "non-stop mode is unsupported" } } diff --git a/gdb/testsuite/gdb.python/py-evthreads.exp b/gdb/testsuite/gdb.python/py-evthreads.exp index 0e9cd978c12..c0c17b3f4db 100644 --- a/gdb/testsuite/gdb.python/py-evthreads.exp +++ b/gdb/testsuite/gdb.python/py-evthreads.exp @@ -41,11 +41,11 @@ gdb_run_cmd set test "run to breakpoint 1" gdb_test_multiple "" $test { -re "event type: stop\r\nstop reason: breakpoint\r\nfirst breakpoint number: 1\r\nbreakpoint number: 1\r\nthread num: 1\r\n.*$gdb_prompt $" { - pass $test + pass $test } -re "The target does not support running in non-stop mode" { - unsupported "non-stop mode is unsupported" - return + unsupported "non-stop mode is unsupported" + return } } @@ -61,13 +61,13 @@ set test "continue thread 1" gdb_test_multiple "continue&" $test { -re "event type: continue\r\nthread num: 3\r\n$gdb_prompt " { # This expect string must not expect the end-of-buffer '$'. - pass $test + pass $test } } set test "thread 3 was signaled" gdb_test_multiple "" $test { -re "event type: stop\r\nstop reason: signal\r\nstop signal: SIGUSR1\r\nthread num: 3\r\nevent type: stop\r\n" { - pass $test + pass $test } } diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp index 8c28d874e55..c3b130914b4 100644 --- a/gdb/testsuite/gdb.python/py-explore-cc.exp +++ b/gdb/testsuite/gdb.python/py-explore-cc.exp @@ -49,93 +49,93 @@ gdb_test "explore int_ref" "'int_ref' is a scalar value of type 'int'.*int_ref = gdb_test_multiple "explore int_ptr_ref" "" { -re "$int_ptr_ref_desc.*Continue exploring it as a pointer to a single value \\\[y/n\\\]:.*" { - pass "explore int_ptr_ref" - gdb_test_multiple "y" "explore_int_ptr_ref_as_single_value_pointer" { - -re "'\[*\]int_ptr_ref' is a scalar value of type 'int'.*\[*\]int_ptr_ref = 10.*$gdb_prompt" { - pass "explore_int_ptr_ref_as_single_value_pointer" - } - } + pass "explore int_ptr_ref" + gdb_test_multiple "y" "explore_int_ptr_ref_as_single_value_pointer" { + -re "'\[*\]int_ptr_ref' is a scalar value of type 'int'.*\[*\]int_ptr_ref = 10.*$gdb_prompt" { + pass "explore_int_ptr_ref_as_single_value_pointer" + } + } } } gdb_test_multiple "explore b" "" { -re "$b_desc.*Enter the field number of choice:.*" { - pass "explore b" - gdb_test_multiple "0" "explore_base_class_A" { - -re "The value of 'b\.A' is a struct/class of type 'A' with no fields\." { - pass "explore_base_class_A, exploring b" - gdb_test_multiple "\0" "return_to_b_from_A" { - -re ".*$b_desc.*Enter the field number of choice:.*" { - pass "return_to_b_from_A" - gdb_test_multiple "1" "explore_field_i_of_b" { - -re "'b\.i' is a scalar value of type 'int'.*b\.i = 10.*" { - pass "explore_field_i_of_b" - gdb_test_multiple "\0" "return_to_b_from_i" { - -re "$b_desc.*Enter the field number of choice:.*" { - pass "return_to_b_from_i" - } - } - } - } - gdb_test_multiple "2" "explore_field_c_of_b" { - -re "'b\.c' is a scalar value of type 'char'.*b\.c = .*'a'.*" { - pass "explore_field_c_of_b" - gdb_test_multiple "\0" "return_to_b_from_c" { - -re "$b_desc.*Enter the field number of choice:.*" { - pass "return_to_b_from_c" - } - } - } - } - gdb_test_multiple "\0" "return_to_gdb_prompt" { - -re "$gdb_prompt" { - pass "return_to_gdb_prompt_from_b" - } - } - } - } - } - } + pass "explore b" + gdb_test_multiple "0" "explore_base_class_A" { + -re "The value of 'b\.A' is a struct/class of type 'A' with no fields\." { + pass "explore_base_class_A, exploring b" + gdb_test_multiple "\0" "return_to_b_from_A" { + -re ".*$b_desc.*Enter the field number of choice:.*" { + pass "return_to_b_from_A" + gdb_test_multiple "1" "explore_field_i_of_b" { + -re "'b\.i' is a scalar value of type 'int'.*b\.i = 10.*" { + pass "explore_field_i_of_b" + gdb_test_multiple "\0" "return_to_b_from_i" { + -re "$b_desc.*Enter the field number of choice:.*" { + pass "return_to_b_from_i" + } + } + } + } + gdb_test_multiple "2" "explore_field_c_of_b" { + -re "'b\.c' is a scalar value of type 'char'.*b\.c = .*'a'.*" { + pass "explore_field_c_of_b" + gdb_test_multiple "\0" "return_to_b_from_c" { + -re "$b_desc.*Enter the field number of choice:.*" { + pass "return_to_b_from_c" + } + } + } + } + gdb_test_multiple "\0" "return_to_gdb_prompt" { + -re "$gdb_prompt" { + pass "return_to_gdb_prompt_from_b" + } + } + } + } + } + } } } gdb_test_multiple "explore B" "" { -re "$B_desc.*Enter the field number of choice:.*" { - pass "explore B" - gdb_test_multiple "0" "explore_base_class_A" { - -re "base class 'A' of 'B' is a struct/class of type 'A' with no fields\." { - pass "explore_base_class_A, exploring B" - gdb_test_multiple "\0" "return_to_B" { - -re "$B_desc.*Enter the field number of choice:.*" { - pass "return_to_B" - gdb_test_multiple "1" "explore_field_i_of_B" { - -re "field 'i' of 'B' is of a scalar type 'int'.*" { - pass "explore_field_i_of_B" - gdb_test_multiple "\0" "return_to_B_from_i" { - -re "$B_desc.*Enter the field number of choice:.*" { - pass "return_to_B_from_i, exploring B" - } - } - } - } - gdb_test_multiple "2" "explore_field_c_of_B" { - -re "field 'c' of 'B' is of a scalar type 'char'.*" { - pass "explore_field_c_of_B" - gdb_test_multiple "\0" "return_to_B_from_c" { - -re "$B_desc.*Enter the field number of choice:.*" { - pass "return_to_B_from_c" - } - } - } - } - gdb_test_multiple "\0" "return_to_gdb_prompt" { - -re "$gdb_prompt" { - pass "return_to_gdb_prompt_from_B" - } - } - } - } - } - } + pass "explore B" + gdb_test_multiple "0" "explore_base_class_A" { + -re "base class 'A' of 'B' is a struct/class of type 'A' with no fields\." { + pass "explore_base_class_A, exploring B" + gdb_test_multiple "\0" "return_to_B" { + -re "$B_desc.*Enter the field number of choice:.*" { + pass "return_to_B" + gdb_test_multiple "1" "explore_field_i_of_B" { + -re "field 'i' of 'B' is of a scalar type 'int'.*" { + pass "explore_field_i_of_B" + gdb_test_multiple "\0" "return_to_B_from_i" { + -re "$B_desc.*Enter the field number of choice:.*" { + pass "return_to_B_from_i, exploring B" + } + } + } + } + gdb_test_multiple "2" "explore_field_c_of_B" { + -re "field 'c' of 'B' is of a scalar type 'char'.*" { + pass "explore_field_c_of_B" + gdb_test_multiple "\0" "return_to_B_from_c" { + -re "$B_desc.*Enter the field number of choice:.*" { + pass "return_to_B_from_c" + } + } + } + } + gdb_test_multiple "\0" "return_to_gdb_prompt" { + -re "$gdb_prompt" { + pass "return_to_gdb_prompt_from_B" + } + } + } + } + } + } } } diff --git a/gdb/testsuite/gdb.python/py-explore.exp b/gdb/testsuite/gdb.python/py-explore.exp index df0f4654593..3d948d64bbc 100644 --- a/gdb/testsuite/gdb.python/py-explore.exp +++ b/gdb/testsuite/gdb.python/py-explore.exp @@ -54,7 +54,7 @@ proc pointer_description { value_name type_name } { proc field_values { args } { set result "" foreach field $args { - set result "$result\[ \]*$field \[\.\]\[\.\] \[\(\]Value of type .*\[\)\]\[\r\n\]+" + set result "$result\[ \]*$field \[\.\]\[\.\] \[\(\]Value of type .*\[\)\]\[\r\n\]+" } return $result } @@ -63,8 +63,8 @@ proc field_choices { args } { set result "" set field_num 0 foreach field $args { - set result "$result$field\[ \]+=\[ \]+>> (); return hipDeviceSynchronize () != hipSuccess; } - diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp index 24e7e1abbcb..18952b456a4 100644 --- a/gdb/testsuite/gdb.server/ext-run.exp +++ b/gdb/testsuite/gdb.server/ext-run.exp @@ -149,7 +149,7 @@ proc do_test { clear_sysroot set_remote_exec fetch_exec_and_args } { gdb_load $::binfile gdb_test "monitor help" "The following monitor commands.*" \ - "load new file without any gdbserver inferior" + "load new file without any gdbserver inferior" gdb_test_no_output "monitor exit" } diff --git a/gdb/testsuite/gdb.threads/bp_in_thread.c b/gdb/testsuite/gdb.threads/bp_in_thread.c index 9244efe0dac..9ec54c1a4e9 100644 --- a/gdb/testsuite/gdb.threads/bp_in_thread.c +++ b/gdb/testsuite/gdb.threads/bp_in_thread.c @@ -70,4 +70,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.threads/bp_in_thread.exp b/gdb/testsuite/gdb.threads/bp_in_thread.exp index 5180c18dbec..b02e489e54d 100644 --- a/gdb/testsuite/gdb.threads/bp_in_thread.exp +++ b/gdb/testsuite/gdb.threads/bp_in_thread.exp @@ -29,13 +29,12 @@ clean_restart $::testfile runto_main gdb_test "break noreturn" \ - "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ - "breakpoint on noreturn" + "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ + "breakpoint on noreturn" # Run the program and make sure GDB reports that we stopped after # hitting breakpoint 1 in noreturn(). gdb_test "continue" \ - ".*Breakpoint 2, noreturn ().*" \ - "run to noreturn" - + ".*Breakpoint 2, noreturn ().*" \ + "run to noreturn" diff --git a/gdb/testsuite/gdb.threads/del-pending-thread-bp.c b/gdb/testsuite/gdb.threads/del-pending-thread-bp.c index 85b3db5b923..26bd7888267 100644 --- a/gdb/testsuite/gdb.threads/del-pending-thread-bp.c +++ b/gdb/testsuite/gdb.threads/del-pending-thread-bp.c @@ -82,4 +82,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.threads/execl.exp b/gdb/testsuite/gdb.threads/execl.exp index a42dce95eed..4595b2d05fe 100644 --- a/gdb/testsuite/gdb.threads/execl.exp +++ b/gdb/testsuite/gdb.threads/execl.exp @@ -39,7 +39,7 @@ if { [is_remote target] } { runto_main gdb_test "b [gdb_get_line_number "breakpoint here"]" \ - ".*Breakpoint .*execl.*" "set breakpoint at execl" + ".*Breakpoint .*execl.*" "set breakpoint at execl" gdb_test "continue" ".*breakpoint here.*" "continue to exec" diff --git a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp index d65fe83d606..71b54a233a7 100644 --- a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp +++ b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp @@ -116,19 +116,19 @@ proc do_test { cond_bp_target detach_on_fork displaced } { set ok 0 with_timeout_factor 10 { - set test "inferior 1 exited" - gdb_test_multiple "" $test { + set test "inferior 1 exited" + gdb_test_multiple "" $test { -re "Inferior 1 \(\[^\r\n\]+\) exited normally" { - set ok 1 - pass $test + set ok 1 + pass $test } -re "Inferior $decimal \(\[^\r\n\]+\) exited normally" { - incr fork_count - if {$fork_count <= 100} { + incr fork_count + if {$fork_count <= 100} { exp_continue - } else { + } else { fail "$test (too many forks)" - } + } } } } diff --git a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp b/gdb/testsuite/gdb.threads/gcore-stale-thread.exp index 396ea296231..b7e0b312150 100644 --- a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp +++ b/gdb/testsuite/gdb.threads/gcore-stale-thread.exp @@ -53,5 +53,5 @@ gdb_gcore_cmd "$corefile" "save a corefile" # Do not run "info threads" before "gcore" as it could workaround the bug # by discarding non-current exited threads. gdb_test "info threads" \ - {The current thread has terminated\. See `help thread'\.} \ + {The current thread has terminated\. See `help thread'\.} \ "exited thread is current due to non-stop" diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp index 4b9a1543e8d..f1e1a364e7c 100644 --- a/gdb/testsuite/gdb.threads/gcore-thread.exp +++ b/gdb/testsuite/gdb.threads/gcore-thread.exp @@ -36,7 +36,7 @@ if {[istarget "*-*-linux"]} { set opts [list debug] if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${objfile}" object $opts] != "" || ([gdb_compile_pthreads "${objfile}" "${binfile}" executable [concat $opts {ldflags=-Wl,-z,norelro}] ] != "" - && [gdb_compile_pthreads "${objfile}" "${binfile}" executable $opts] != "") } { + && [gdb_compile_pthreads "${objfile}" "${binfile}" executable $opts] != "") } { return -1 } diff --git a/gdb/testsuite/gdb.threads/hand-call-in-threads.c b/gdb/testsuite/gdb.threads/hand-call-in-threads.c index 2b98964c7ef..a3918749273 100644 --- a/gdb/testsuite/gdb.threads/hand-call-in-threads.c +++ b/gdb/testsuite/gdb.threads/hand-call-in-threads.c @@ -124,4 +124,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp index f9c9e87efb0..5194bf85a66 100644 --- a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp +++ b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp @@ -51,19 +51,19 @@ if { ![runto_main] } { } gdb_test "break all_threads_running" \ - "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ - "breakpoint on all_threads_running" + "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ + "breakpoint on all_threads_running" gdb_test "break hand_call" \ - "Breakpoint 3 at .*: file .*${srcfile}, line .*" \ - "breakpoint on hand_call" + "Breakpoint 3 at .*: file .*${srcfile}, line .*" \ + "breakpoint on hand_call" # Run the program and make sure GDB reports that we stopped after # hitting breakpoint 2 in all_threads_running(). gdb_test "continue" \ - ".*Breakpoint 2, all_threads_running ().*" \ - "run to all_threads_running" + ".*Breakpoint 2, all_threads_running ().*" \ + "run to all_threads_running" # Before we start making hand function calls, turn on scheduler locking. diff --git a/gdb/testsuite/gdb.threads/inf-thr-count.c b/gdb/testsuite/gdb.threads/inf-thr-count.c index e3abea3810e..c482224b4f4 100644 --- a/gdb/testsuite/gdb.threads/inf-thr-count.c +++ b/gdb/testsuite/gdb.threads/inf-thr-count.c @@ -77,4 +77,3 @@ main () return 0; } - diff --git a/gdb/testsuite/gdb.threads/interrupted-hand-call.c b/gdb/testsuite/gdb.threads/interrupted-hand-call.c index fb6d140efbf..b1d8cda65c0 100644 --- a/gdb/testsuite/gdb.threads/interrupted-hand-call.c +++ b/gdb/testsuite/gdb.threads/interrupted-hand-call.c @@ -146,4 +146,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp index 15c48b175e5..f18f30241ea 100644 --- a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp +++ b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp @@ -35,15 +35,15 @@ if { ![runto_main] } { } gdb_test "break all_threads_running" \ - "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ - "breakpoint on all_threads_running" + "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ + "breakpoint on all_threads_running" # Run the program and make sure GDB reports that we stopped after # hitting breakpoint 2 in all_threads_running(). gdb_test "continue" \ - ".*Breakpoint 2, all_threads_running ().*" \ - "run to all_threads_running" + ".*Breakpoint 2, all_threads_running ().*" \ + "run to all_threads_running" # NOTE: Don't turn on scheduler-locking here. # We want the main thread (hand_call_with_signal) and diff --git a/gdb/testsuite/gdb.threads/killed.exp b/gdb/testsuite/gdb.threads/killed.exp index 635ffc83a80..91cd04ff12d 100644 --- a/gdb/testsuite/gdb.threads/killed.exp +++ b/gdb/testsuite/gdb.threads/killed.exp @@ -71,16 +71,16 @@ gdb_test "" "" "run program to completion" send_gdb "quit\n" gdb_expect { -re "Quit anyway\\? \\(y or n\\) $" { - send_gdb "y\n" - exp_continue + send_gdb "y\n" + exp_continue } eof { - pass "GDB exits after multi-threaded program exits messily" + pass "GDB exits after multi-threaded program exits messily" } -re "Cannot find thread ${decimal}: generic error\[\r\n\]*$gdb_prompt $" { - kfail "gdb/568" "GDB exits after multi-threaded program exits messily" + kfail "gdb/568" "GDB exits after multi-threaded program exits messily" } timeout { - fail "GDB exits after multi-threaded program exits messily (timeout)" + fail "GDB exits after multi-threaded program exits messily (timeout)" } } diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp index 0a09897f22b..135475b5201 100644 --- a/gdb/testsuite/gdb.threads/manythreads.exp +++ b/gdb/testsuite/gdb.threads/manythreads.exp @@ -176,10 +176,9 @@ gdb_test_multiple "quit" "GDB exits after stopping multithreaded program" { exp_continue } eof { - pass "GDB exits after stopping multithreaded program" + pass "GDB exits after stopping multithreaded program" } timeout { - fail "GDB exits after stopping multithreaded program (timeout)" + fail "GDB exits after stopping multithreaded program (timeout)" } } - diff --git a/gdb/testsuite/gdb.threads/non-stop-fair-events.exp b/gdb/testsuite/gdb.threads/non-stop-fair-events.exp index 788a7e8c172..ade68263171 100644 --- a/gdb/testsuite/gdb.threads/non-stop-fair-events.exp +++ b/gdb/testsuite/gdb.threads/non-stop-fair-events.exp @@ -49,7 +49,7 @@ proc get_value {var test} { -re ".*= ($decimal).*\r\n$gdb_prompt $" { set value $expect_out(1,string) pass "$test" - } + } } return ${value} } diff --git a/gdb/testsuite/gdb.threads/omp-par-scope.c b/gdb/testsuite/gdb.threads/omp-par-scope.c index 626ca162297..75a2e65f70c 100644 --- a/gdb/testsuite/gdb.threads/omp-par-scope.c +++ b/gdb/testsuite/gdb.threads/omp-par-scope.c @@ -210,4 +210,3 @@ main (int argc, char **argv) return 0; } - diff --git a/gdb/testsuite/gdb.threads/pending-step.c b/gdb/testsuite/gdb.threads/pending-step.c index 3bd091ce544..047125e259d 100644 --- a/gdb/testsuite/gdb.threads/pending-step.c +++ b/gdb/testsuite/gdb.threads/pending-step.c @@ -35,7 +35,7 @@ int main() { { args[i] = 1; res = pthread_create(&threads[i - 1], - NULL, + NULL, thread_function, (void *) i); } diff --git a/gdb/testsuite/gdb.threads/print-threads.c b/gdb/testsuite/gdb.threads/print-threads.c index 341ee0aa35a..4bc94e6f542 100644 --- a/gdb/testsuite/gdb.threads/print-threads.c +++ b/gdb/testsuite/gdb.threads/print-threads.c @@ -55,4 +55,3 @@ void *thread_function(void *arg) { printf("Bye from %d\n", my_number); pthread_exit(NULL); } - diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.c b/gdb/testsuite/gdb.threads/pthread_cond_wait.c index e1e513ecfa6..a7f84a05f97 100644 --- a/gdb/testsuite/gdb.threads/pthread_cond_wait.c +++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.c @@ -70,4 +70,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp index e11b9043a2e..c5d425fcd58 100644 --- a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp +++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp @@ -30,11 +30,11 @@ runto_main gdb_test "break break_me" \ "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ - "breakpoint on break_me" + "breakpoint on break_me" gdb_test "continue" \ - ".*Breakpoint 2, break_me ().*" \ - "run to break_me" + ".*Breakpoint 2, break_me ().*" \ + "run to break_me" # # Backtrace all threads, find the one running noreturn, and @@ -61,4 +61,3 @@ set btb "\[^\r\n\]+\[\r\n\]+\#${decimal}\[ \t\]+${hex} (\\\[PAC\\\] )?in " gdb_test "thread apply all backtrace" \ "pthread_cond_wait${btb}cond_wait${btb}noreturn${btb}forever_pthread.*" \ "backtrace in blocked thread" - diff --git a/gdb/testsuite/gdb.threads/schedlock.c b/gdb/testsuite/gdb.threads/schedlock.c index 2a25558d5bf..1c0330dddbc 100644 --- a/gdb/testsuite/gdb.threads/schedlock.c +++ b/gdb/testsuite/gdb.threads/schedlock.c @@ -38,7 +38,7 @@ int main() { { args[i] = 1; res = pthread_create(&threads[i - 1], - NULL, + NULL, thread_function, (void *) i); } @@ -85,4 +85,3 @@ void *thread_function(void *arg) { pthread_exit(NULL); } - diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp index b7a110d5799..ae7fed0cb63 100644 --- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp +++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp @@ -42,7 +42,7 @@ proc get_value {var test} { -re ".*= ($decimal).*\r\n$gdb_prompt $" { set value $expect_out(1,string) pass "$test" - } + } } return ${value} } diff --git a/gdb/testsuite/gdb.threads/staticthreads.exp b/gdb/testsuite/gdb.threads/staticthreads.exp index 44cc6865ae0..42be57c7891 100644 --- a/gdb/testsuite/gdb.threads/staticthreads.exp +++ b/gdb/testsuite/gdb.threads/staticthreads.exp @@ -91,7 +91,7 @@ gdb_test_multiple "quit" "$test" { exp_continue } eof { - pass "$test" + pass "$test" } } clean_restart ${::testfile} diff --git a/gdb/testsuite/gdb.threads/switch-threads.exp b/gdb/testsuite/gdb.threads/switch-threads.exp index 1f67a450a82..25884b4e38e 100644 --- a/gdb/testsuite/gdb.threads/switch-threads.exp +++ b/gdb/testsuite/gdb.threads/switch-threads.exp @@ -36,4 +36,3 @@ runto_main gdb_breakpoint thread_func gdb_continue_to_breakpoint "continue to thread_func" gdb_test "next" ".*foo \\(\\);" - diff --git a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp index dc74714d45e..e290ddfff11 100644 --- a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp +++ b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp @@ -35,15 +35,15 @@ if { ![runto_main] } { } gdb_test "break all_threads_running" \ - "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ - "breakpoint on all_threads_running" + "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ + "breakpoint on all_threads_running" # Run the program and make sure GDB reports that we stopped after # hitting breakpoint 2 in all_threads_running(). gdb_test "continue" \ - ".*Breakpoint 2, all_threads_running ().*" \ - "run to all_threads_running" + ".*Breakpoint 2, all_threads_running ().*" \ + "run to all_threads_running" # NOTE: Don't turn on scheduler-locking here. # We want the main thread (hand_call_with_signal) and diff --git a/gdb/testsuite/gdb.threads/thread_check.c b/gdb/testsuite/gdb.threads/thread_check.c index 2863f0a5de4..bc8584344bc 100644 --- a/gdb/testsuite/gdb.threads/thread_check.c +++ b/gdb/testsuite/gdb.threads/thread_check.c @@ -37,7 +37,7 @@ tf (void *arg) puts (number); while (unslept > 0) - unslept = sleep(unslept); + unslept = sleep(unslept); sprintf(number, "tf(%ld): end", (long)arg); puts (number); @@ -53,10 +53,10 @@ int main (int argc, char *argv[]) for (n = 0; n < N; ++n) if (pthread_create (&th[n], NULL, tf, (void *) (long int) n) != 0) { - while (unslept > 0) - unslept = sleep(2); - puts ("create failed"); - exit (1); + while (unslept > 0) + unslept = sleep(2); + puts ("create failed"); + exit (1); } puts("after create"); @@ -64,8 +64,8 @@ int main (int argc, char *argv[]) for (n = 0; n < N; ++n) if (pthread_join (th[n], NULL) != 0) { - puts ("join failed"); - exit (1); + puts ("join failed"); + exit (1); } puts("after join"); diff --git a/gdb/testsuite/gdb.threads/thread_events.exp b/gdb/testsuite/gdb.threads/thread_events.exp index 91539e09a04..355bf07444b 100644 --- a/gdb/testsuite/gdb.threads/thread_events.exp +++ b/gdb/testsuite/gdb.threads/thread_events.exp @@ -56,9 +56,9 @@ proc gdb_test_thread_start {messages_enabled command pattern message} { } -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" { if { $events_seen != $events_expected } { - fail "$message (saw $events_seen, expected $events_expected)" + fail "$message (saw $events_seen, expected $events_expected)" } else { - pass "$message" + pass "$message" } } }] @@ -81,9 +81,9 @@ proc gdb_test_thread_exit {messages_enabled command pattern message} { } -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" { if { $events_seen != $events_expected } { - fail "$message (saw $events_seen, expected $events_expected)" + fail "$message (saw $events_seen, expected $events_expected)" } else { - pass "$message" + pass "$message" } } }] diff --git a/gdb/testsuite/gdb.threads/threadapply.c b/gdb/testsuite/gdb.threads/threadapply.c index 62c7639c4c9..8ba7be2a776 100644 --- a/gdb/testsuite/gdb.threads/threadapply.c +++ b/gdb/testsuite/gdb.threads/threadapply.c @@ -42,7 +42,7 @@ int main() { { args[i] = 1; /* Init value. */ res = pthread_create(&threads[i], - NULL, + NULL, thread_function, (void *) i); } @@ -51,14 +51,14 @@ int main() { while (!all_started) { all_started = 1; - for (i = 0; i < NUM; i++) - { - if (args[i] == 1) + for (i = 0; i < NUM; i++) + { + if (args[i] == 1) { - all_started = 0; - break; + all_started = 0; + break; } - } + } } args[i] = 1; @@ -75,4 +75,3 @@ void *thread_function(void *arg) { (*myp) ++; /* Increment so parent knows child started. */ pthread_barrier_wait(&mybarrier); } - diff --git a/gdb/testsuite/gdb.threads/threadapply.exp b/gdb/testsuite/gdb.threads/threadapply.exp index de264b66276..d19740ac4dd 100644 --- a/gdb/testsuite/gdb.threads/threadapply.exp +++ b/gdb/testsuite/gdb.threads/threadapply.exp @@ -44,7 +44,7 @@ gdb_test_multiple "define backthread" "defining macro" { -re "Type commands for definition of \"backthread\".\r\nEnd with a line saying just \"end\".\r\n>$" { gdb_test_multiple "bt\np/x 20\nend" "macro details" { -re "$gdb_prompt $" { - pass "macro details" + pass "macro details" } } pass "defining macro" diff --git a/gdb/testsuite/gdb.threads/tls-main.c b/gdb/testsuite/gdb.threads/tls-main.c index 56675e9cd45..3cce5963c15 100644 --- a/gdb/testsuite/gdb.threads/tls-main.c +++ b/gdb/testsuite/gdb.threads/tls-main.c @@ -7,4 +7,3 @@ int main () result ++; return 0; /* break here to check result */ } - diff --git a/gdb/testsuite/gdb.threads/tls-shared.c b/gdb/testsuite/gdb.threads/tls-shared.c index 02b13083ab9..e359191f4e5 100644 --- a/gdb/testsuite/gdb.threads/tls-shared.c +++ b/gdb/testsuite/gdb.threads/tls-shared.c @@ -8,4 +8,3 @@ int foo () pthread_testcancel(); return i_tls; } - diff --git a/gdb/testsuite/gdb.threads/tls-shared.exp b/gdb/testsuite/gdb.threads/tls-shared.exp index 66dd52fe514..afd41ebe180 100644 --- a/gdb/testsuite/gdb.threads/tls-shared.exp +++ b/gdb/testsuite/gdb.threads/tls-shared.exp @@ -51,7 +51,7 @@ gdb_test "break $line_number" \ "break at and of main" gdb_test "continue" \ "main .* at .*:.*return 0.*break here to check result.*" \ - "continue to break" + "continue to break" # This is more of a gcc/glibc test, really. # gdb_test "print result" "3" diff --git a/gdb/testsuite/gdb.threads/tls-so_extern.exp b/gdb/testsuite/gdb.threads/tls-so_extern.exp index a0aa5f86bf2..36ddd7f3b4b 100644 --- a/gdb/testsuite/gdb.threads/tls-so_extern.exp +++ b/gdb/testsuite/gdb.threads/tls-so_extern.exp @@ -50,25 +50,25 @@ gdb_test "break $line_number" \ "break in thread function" gdb_test "continue" \ "tls_ptr .* at .*:.*break here to check result.*" \ - "continue to break in tls_ptr called by main" + "continue to break in tls_ptr called by main" gdb_test "print so_extern == &so_extern" \ - " = 1" \ - "check so_extern address in main" + " = 1" \ + "check so_extern address in main" gdb_test "continue" \ "tls_ptr .* at .*:.*break here to check result.*" \ - "continue to break in a thread" + "continue to break in a thread" gdb_test "print so_extern == &so_extern" \ - " = 1" \ - "check so_extern address" + " = 1" \ + "check so_extern address" gdb_test "continue" \ "tls_ptr .* at .*:.*break here to check result.*" \ - "continue to break in the other thread" + "continue to break in the other thread" gdb_test "print so_extern == &so_extern" \ - " = 1" \ - "check so_extern address in other thread" + " = 1" \ + "check so_extern address in other thread" gdb_test "continue" \ "tls_ptr .* at .*:.*break here to check result.*" \ - "continue to break in tls_ptr called at end of main" + "continue to break in tls_ptr called at end of main" gdb_test "print so_extern == &so_extern" \ - " = 1" \ - "check so_extern address at end of main" + " = 1" \ + "check so_extern address at end of main" diff --git a/gdb/testsuite/gdb.threads/tls-so_extern_main.c b/gdb/testsuite/gdb.threads/tls-so_extern_main.c index 9829d7a2c14..898f1646a58 100644 --- a/gdb/testsuite/gdb.threads/tls-so_extern_main.c +++ b/gdb/testsuite/gdb.threads/tls-so_extern_main.c @@ -46,4 +46,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.threads/tls.c b/gdb/testsuite/gdb.threads/tls.c index ee333cb16c3..473f5d32b0b 100644 --- a/gdb/testsuite/gdb.threads/tls.c +++ b/gdb/testsuite/gdb.threads/tls.c @@ -81,7 +81,7 @@ void *spin( void *vp ) a_thread_local = 0; K::another_thread_local = me; for( i = 0; i <= me; i++ ) { - a_thread_local += i; + a_thread_local += i; } another_thread_local_val[me] = K::another_thread_local; @@ -89,9 +89,9 @@ void *spin( void *vp ) if (sem_post (&tell_main) == -1) { - fprintf (stderr, "th %d post on sem tell_main failed\n", me); - print_error (); - return NULL; + fprintf (stderr, "th %d post on sem tell_main failed\n", me); + print_error (); + return NULL; } #ifdef START_DEBUG fprintf (stderr, "th %d post on tell main\n", me); @@ -100,24 +100,24 @@ void *spin( void *vp ) while (1) { #ifdef START_DEBUG - fprintf (stderr, "th %d start wait on tell_thread\n", me); + fprintf (stderr, "th %d start wait on tell_thread\n", me); #endif - if (sem_wait (&tell_thread) == 0) - break; + if (sem_wait (&tell_thread) == 0) + break; - if (errno == EINTR) - { + if (errno == EINTR) + { #ifdef START_DEBUG - fprintf (stderr, "th %d wait tell_thread got EINTR, rewaiting\n", me); + fprintf (stderr, "th %d wait tell_thread got EINTR, rewaiting\n", me); #endif - continue; - } - else - { - fprintf (stderr, "th %d wait on sem tell_thread failed\n", me); - print_error (); - return NULL; - } + continue; + } + else + { + fprintf (stderr, "th %d wait on sem tell_thread failed\n", me); + print_error (); + return NULL; + } } #ifdef START_DEBUG @@ -142,8 +142,8 @@ do_pass() for( i = 0; i < N_THREADS; i++) { - thread_local_val[i] = 0; - another_thread_local_val[i] = 0; + thread_local_val[i] = 0; + another_thread_local_val[i] = 0; } if (sem_init (&tell_main, 0, 0) == -1) @@ -161,36 +161,36 @@ do_pass() /* Start N_THREADS threads, then join them so that they are terminated. */ for( i = 0; i < N_THREADS; i++ ) { - err = pthread_create( &t[i], NULL, spin, (void *) (long) i ); - if( err != 0 ) { - fprintf(stderr, "Error in thread %d create\n", i ); - } + err = pthread_create( &t[i], NULL, spin, (void *) (long) i ); + if( err != 0 ) { + fprintf(stderr, "Error in thread %d create\n", i ); + } } for( i = 0; i < N_THREADS; i++ ) { - while (1) - { + while (1) + { #ifdef START_DEBUG - fprintf (stderr, "main %d start wait on tell_main\n", i); + fprintf (stderr, "main %d start wait on tell_main\n", i); #endif - if (sem_wait (&tell_main) == 0) - break; + if (sem_wait (&tell_main) == 0) + break; - if (errno == EINTR) - { + if (errno == EINTR) + { #ifdef START_DEBUG - fprintf (stderr, "main %d wait tell_main got EINTR, rewaiting\n", i); + fprintf (stderr, "main %d wait tell_main got EINTR, rewaiting\n", i); #endif - continue; - } - else - { - fprintf (stderr, "main %d wait on sem tell_main failed\n", i); - print_error (); - return; - } - } + continue; + } + else + { + fprintf (stderr, "main %d wait on sem tell_main failed\n", i); + print_error (); + return; + } + } } #ifdef START_DEBUG @@ -202,11 +202,11 @@ do_pass() for( i = 0; i < N_THREADS; i++ ) { if (sem_post (&tell_thread) == -1) - { - fprintf (stderr, "main %d post on sem tell_thread failed\n", i); - print_error (); - return; - } + { + fprintf (stderr, "main %d post on sem tell_thread failed\n", i); + print_error (); + return; + } #ifdef START_DEBUG fprintf (stderr, "main %d post on tell_thread\n", i); #endif @@ -214,11 +214,11 @@ do_pass() for( i = 0; i < N_THREADS; i++ ) { - err = pthread_join(t[i], NULL ); - if( err != 0 ) - { - fprintf (stderr, "error in thread %d join\n", i ); - } + err = pthread_join(t[i], NULL ); + if( err != 0 ) + { + fprintf (stderr, "error in thread %d join\n", i ); + } } i = 10; /* Null line for setting bpts on. */ diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp index 3dbc802d82d..587cae603fc 100644 --- a/gdb/testsuite/gdb.threads/tls.exp +++ b/gdb/testsuite/gdb.threads/tls.exp @@ -33,8 +33,8 @@ proc compute_expected_value {value} { set expected_value 0 set i 0 while { $i <= $value} { - incr expected_value $i - incr i + incr expected_value $i + incr i } return $expected_value } @@ -51,7 +51,7 @@ proc get_me_variable {tnum} { -re ".*= ($decimal).*\r\n$gdb_prompt $" { set value_of_me $expect_out(1,string) pass "$tnum thread print me" - } + } -re "$gdb_prompt $" { fail "$tnum thread print me" } @@ -92,7 +92,7 @@ proc check_thread_local {number} { "${number} info address a_thread_local" gdb_test "info address K::another_thread_local" \ - ".*another_thread_local.*a thread-local variable at offset.*" \ + ".*another_thread_local.*a thread-local variable at offset.*" \ "${number} info address another_thread_local" } @@ -137,7 +137,7 @@ proc check_thread_stack {number spin_threads spin_threads_level} { fail "backtrace of thread number $number in spin" } else { pass "backtrace of thread number $number in spin" - set level $expect_out(1,string) + set level $expect_out(1,string) set tarrl($number) $level set tarr($number) 1 } @@ -172,37 +172,37 @@ if {![runto_main]} { # test the thread local's value. # gdb_test "b [gdb_get_line_number "here we know tls value"]" \ - ".*Breakpoint 2.*tls.*" "set breakpoint at all threads" + ".*Breakpoint 2.*tls.*" "set breakpoint at all threads" # Set a bp at a point where we know all threads are alive. # gdb_test "b [gdb_get_line_number "still alive"]" \ - ".*Breakpoint 3.*tls.*" "set breakpoint at synch point" + ".*Breakpoint 3.*tls.*" "set breakpoint at synch point" # Set a bp at the end to see if all threads are finished. # gdb_test "b [gdb_get_line_number "before exit"]" \ - ".*Breakpoint 4.*tls.*" "set breakpoint at exit" + ".*Breakpoint 4.*tls.*" "set breakpoint at exit" send_gdb "continue\n" gdb_expect { -re ".* received signal SIGSEGV.*a_thread_local = 0;.*$gdb_prompt $" { - # This is the first symptom if the gcc and binutils versions - # in use support TLS, but the system glibc does not. - unsupported "continue to first thread: system does not support TLS" - return -1 + # This is the first symptom if the gcc and binutils versions + # in use support TLS, but the system glibc does not. + unsupported "continue to first thread: system does not support TLS" + return -1 } -re ".*$inferior_exited_re normally.*$gdb_prompt $" { - fail "continue to first thread: program runaway" + fail "continue to first thread: program runaway" } -re ".*Pass 0 done.*Pass 1 done.*$gdb_prompt $" { - fail "continue to first thread: program runaway 2" + fail "continue to first thread: program runaway 2" } -re ".*Breakpoint 2.*tls value.*$gdb_prompt $" { - pass "continue to first thread: get to thread" + pass "continue to first thread: get to thread" } -re ".*$gdb_prompt $" { - fail "continue to first thread: no progress?" + fail "continue to first thread: no progress?" } timeout { fail "continue to first thread (timeout)" } } @@ -232,7 +232,7 @@ gdb_expect { -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]+.*(\[0-9\]+) *${tdlabel_re}\[^\r\n\]+\r\n$gdb_prompt $" { set no_of_threads $expect_out(1,string) pass "get number of threads" - } + } -re "$gdb_prompt $" { fail "get number of threads" } @@ -281,16 +281,16 @@ gdb_test "continue" ".*Breakpoint 4.*before exit.*" "threads exited" send_gdb "info thread\n" gdb_expect { -re ".* 1 *${tdlabel_re}.*2 *${tdlabel_re}.*$gdb_prompt $" { - fail "too many threads left at end" + fail "too many threads left at end" } -re ".*\\\* 1 *${tdlabel_re}.*main.*$gdb_prompt $" { - pass "expect only base thread at end" + pass "expect only base thread at end" } -re ".*No stack.*$gdb_prompt $" { - fail "runaway at end" + fail "runaway at end" } -re ".*$gdb_prompt $" { - fail "mess at end" + fail "mess at end" } timeout { fail "at end (timeout)" } } diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp index 067986abb61..64a6a3f2457 100644 --- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp +++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp @@ -91,7 +91,7 @@ foreach reorder {0 1} { with_test_prefix "reorder$reorder" { set prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: exit\r\n$" gdb_test_multiple "continue" "continue to breakpoint: break-at-exit" -prompt $prompt { - -re ".*break-at-exit.*$prompt$" { + -re ".*break-at-exit.*$prompt$" { pass $gdb_test_name } } diff --git a/gdb/testsuite/gdb.threads/watchthreads.c b/gdb/testsuite/gdb.threads/watchthreads.c index d9e18891885..9644a5affef 100644 --- a/gdb/testsuite/gdb.threads/watchthreads.c +++ b/gdb/testsuite/gdb.threads/watchthreads.c @@ -76,4 +76,3 @@ thread_function (void *arg) pthread_exit (NULL); } - diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gdb.threads/watchthreads2.exp index a31c1a74f0a..47a69715d50 100644 --- a/gdb/testsuite/gdb.threads/watchthreads2.exp +++ b/gdb/testsuite/gdb.threads/watchthreads2.exp @@ -44,8 +44,8 @@ if {![runto_main]} { } gdb_test "break thread_started" \ - "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ - "breakpoint on thread_started" + "Breakpoint 2 at .*: file .*${srcfile}, line .*" \ + "breakpoint on thread_started" # Run the program until all threads have hit thread_started. # We use this as the vehicle to determine when gdb is aware diff --git a/gdb/testsuite/gdb.threads/wp-replication.c b/gdb/testsuite/gdb.threads/wp-replication.c index d37d3e03587..a7811231c69 100644 --- a/gdb/testsuite/gdb.threads/wp-replication.c +++ b/gdb/testsuite/gdb.threads/wp-replication.c @@ -122,8 +122,8 @@ thread_function (void *arg) { /* For debugging. */ printf ("Thread %ld changing watch_thread[%d] data" - " from %d -> %d\n", thread_number, j, - watched_data[j], watched_data[j] + 1); + " from %d -> %d\n", thread_number, j, + watched_data[j], watched_data[j] + 1); /* Increment the watched data field. */ watched_data[j]++; } diff --git a/gdb/testsuite/gdb.trace/actions.c b/gdb/testsuite/gdb.trace/actions.c index 19baeaff5b6..d5f51bf045a 100644 --- a/gdb/testsuite/gdb.trace/actions.c +++ b/gdb/testsuite/gdb.trace/actions.c @@ -152,4 +152,3 @@ main (int argc, char *argv[], char **envp) end (); return 0; } - diff --git a/gdb/testsuite/gdb.trace/ax.exp b/gdb/testsuite/gdb.trace/ax.exp index cc40853dd87..3867a3917d9 100644 --- a/gdb/testsuite/gdb.trace/ax.exp +++ b/gdb/testsuite/gdb.trace/ax.exp @@ -128,4 +128,3 @@ gdb_test "maint agent-eval gdb_long_test >= gdb_short_test" "" gdb_test "maint agent-eval &gdb_long_test == &gdb_short_test" ".*equal.*end.*" gdb_test "maint agent-eval &gdb_long_test < &gdb_short_test" "" - diff --git a/gdb/testsuite/gdb.trace/collection.c b/gdb/testsuite/gdb.trace/collection.c index 1b6c97c6928..8c39745070e 100644 --- a/gdb/testsuite/gdb.trace/collection.c +++ b/gdb/testsuite/gdb.trace/collection.c @@ -62,11 +62,11 @@ struct global_pieces { */ signed char c0, c1, c2, c3, c4, c5, c6, c7, - c8, c9, c10, c11, c12, c13, c14, c15, cminus; + c8, c9, c10, c11, c12, c13, c14, c15, cminus; signed short s0, s1, s2, s3, s4, s5, s6, s7, - s8, s9, s10, s11, s12, s13, s14, s15, sminus; + s8, s9, s10, s11, s12, s13, s14, s15, sminus; signed long l0, l1, l2, l3, l4, l5, l6, l7, - l8, l9, l10, l11, l12, l13, l14, l15, lminus; + l8, l9, l10, l11, l12, l13, l14, l15, lminus; /* @@ -102,7 +102,7 @@ int argstruct_test_func (argstruct) test_struct argstruct; { return (int) argstruct.memberc + argstruct.memberi + - argstruct.memberf + argstruct.memberd; + argstruct.memberf + argstruct.memberd; } /* Test collecting array args. */ diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp index 3192bdde19b..bf0373880cb 100644 --- a/gdb/testsuite/gdb.trace/ftrace.exp +++ b/gdb/testsuite/gdb.trace/ftrace.exp @@ -114,75 +114,75 @@ proc test_fast_tracepoints {} { gdb_test "print gdb_agent_gdb_trampoline_buffer_error" ".*" "" gdb_test "ftrace set_point" "Fast tracepoint .*" \ - "fast tracepoint at a long insn" + "fast tracepoint at a long insn" gdb_trace_setactions "collect at set_point: define actions" \ - "" \ - "collect globvar, anarg" "^$" + "" \ + "collect globvar, anarg" "^$" # Make a test of shorter fast tracepoints, 32-bit x86 only if { [istarget "i?86-*-*"] } { - # A Linux target needs to be able to allocate trampolines in the - # 16-bit range, check mmap_min_addr so we can warn testers. - if { [istarget "i?86-*-linux*"] } { - - set minaddr [exec sh -c "cat /proc/sys/vm/mmap_min_addr"] - - if {$minaddr > 64512} { - warning "mmap_min_addr > 64512, fast tracepoint will fail" - warning "do \"sudo sysctl -w vm.mmap_min_addr=32768\" to adjust" - } - } - - gdb_test_multiple "ftrace four_byter" "set 4-byte fast tracepoint" { - -re "May not have a fast tracepoint at .*\r\n$gdb_prompt $" { - pass "4-byte fast tracepoint could not be set" - } - -re "Fast tracepoint .*\r\n$gdb_prompt $" { - pass "4-byte fast tracepoint is set" - set fourgood 1 - } - } - - if { $fourgood } { - - gdb_trace_setactions "collect at four_byter: define actions" \ - "" \ - "collect globvar, anarg" "^$" - } + # A Linux target needs to be able to allocate trampolines in the + # 16-bit range, check mmap_min_addr so we can warn testers. + if { [istarget "i?86-*-linux*"] } { + + set minaddr [exec sh -c "cat /proc/sys/vm/mmap_min_addr"] + + if {$minaddr > 64512} { + warning "mmap_min_addr > 64512, fast tracepoint will fail" + warning "do \"sudo sysctl -w vm.mmap_min_addr=32768\" to adjust" + } + } + + gdb_test_multiple "ftrace four_byter" "set 4-byte fast tracepoint" { + -re "May not have a fast tracepoint at .*\r\n$gdb_prompt $" { + pass "4-byte fast tracepoint could not be set" + } + -re "Fast tracepoint .*\r\n$gdb_prompt $" { + pass "4-byte fast tracepoint is set" + set fourgood 1 + } + } + + if { $fourgood } { + + gdb_trace_setactions "collect at four_byter: define actions" \ + "" \ + "collect globvar, anarg" "^$" + } } run_trace_experiment gdb_test "tfind pc *set_point" "Found trace frame .*" \ - "tfind set_point frame, first time" + "tfind set_point frame, first time" gdb_test "print globvar" " = 1" gdb_test "tfind pc *set_point" "Found trace frame .*" \ - "tfind set_point frame, second time" + "tfind set_point frame, second time" setup_kfail "gdb/13808" "x86_64-*-linux*" gdb_test "print anarg" " = 200" gdb_test "tfind start" "Found trace frame .*" \ - "reset tfinding" + "reset tfinding" if { $fourgood } { - gdb_test "tfind pc *four_byter" "Found trace frame .*" \ - "tfind four_byter frame, first time" + gdb_test "tfind pc *four_byter" "Found trace frame .*" \ + "tfind four_byter frame, first time" - gdb_test "print anarg" " = 101" \ - "look at collected local, first time" + gdb_test "print anarg" " = 101" \ + "look at collected local, first time" - gdb_test "tfind pc *four_byter" "Found trace frame .*" \ - "tfind four_byter frame, second time" + gdb_test "tfind pc *four_byter" "Found trace frame .*" \ + "tfind four_byter frame, second time" - gdb_test "print anarg" " = 201" \ - "look at collected local, second time" + gdb_test "print anarg" " = 201" \ + "look at collected local, second time" } @@ -191,15 +191,15 @@ proc test_fast_tracepoints {} { # can no longer be downloaded. set test "fast tracepoint could not be downloaded with the feature disabled" if {[gdb_protocol_is_remote]} { - gdb_test "set remote fast-tracepoints-packet off" + gdb_test "set remote fast-tracepoints-packet off" - gdb_test_multiple "tstart" $test { - -re "warning: Target does not support fast tracepoints, downloading .* as regular tracepoint.*\r\n$gdb_prompt $" { - pass $test - } - } + gdb_test_multiple "tstart" $test { + -re "warning: Target does not support fast tracepoints, downloading .* as regular tracepoint.*\r\n$gdb_prompt $" { + pass $test + } + } } else { - unsupported $test + unsupported $test } } diff --git a/gdb/testsuite/gdb.trace/packetlen.exp b/gdb/testsuite/gdb.trace/packetlen.exp index 52a34b9cf32..6af64ded737 100644 --- a/gdb/testsuite/gdb.trace/packetlen.exp +++ b/gdb/testsuite/gdb.trace/packetlen.exp @@ -64,4 +64,3 @@ gdb_test "continue" \ "run trace experiment" gdb_test_no_output "tstop" "confirm: survived the long packet send" - diff --git a/gdb/testsuite/gdb.trace/passc-dyn.exp b/gdb/testsuite/gdb.trace/passc-dyn.exp index 2c7698a6eeb..2f8de40434a 100644 --- a/gdb/testsuite/gdb.trace/passc-dyn.exp +++ b/gdb/testsuite/gdb.trace/passc-dyn.exp @@ -132,4 +132,3 @@ gdb_test "tfind" "failed to find.*" "4.5: dynamic passcount test" # Finished! gdb_test "tfind none" ".*" - diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp index fdf321bbc5b..5a266f05a40 100644 --- a/gdb/testsuite/gdb.trace/pending.exp +++ b/gdb/testsuite/gdb.trace/pending.exp @@ -290,7 +290,7 @@ proc pending_tracepoint_installed_during_trace { trace_type } \ } } -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { - pass $test + pass $test } } @@ -342,10 +342,10 @@ proc pending_tracepoint_disconnect_during_trace { trace_type } \ set test "disconnect with pending tracepoint" gdb_test_multiple "disconnect" $test { -re "warning: Pending tracepoints will not be resolved while GDB is disconnected.*Trace is running but will stop on detach; detach anyway\\? \\(y or n\\) $" { - pass $test + pass $test - set test "disconnected" - gdb_test_multiple "y" $test { + set test "disconnected" + gdb_test_multiple "y" $test { -re "$gdb_prompt $" { pass "$test" } @@ -449,16 +449,16 @@ proc pending_tracepoint_with_action_resolved { trace_type } \ set test "continue to marker 2" gdb_test_multiple "continue" $test { -re "Target returns error code .* too far .*$gdb_prompt $" { - if {[string equal $trace_type "ftrace"]} { + if {[string equal $trace_type "ftrace"]} { # Expected if the target was unable to install the # fast tracepoint (e.g., jump pad too far from # tracepoint). pass "$test (too far)" # Skip the rest of the tests. return - } else { + } else { fail $test - } + } } -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\n(Thread .* hit )?Breakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { pass "continue to marker 2" diff --git a/gdb/testsuite/gdb.trace/tfile.c b/gdb/testsuite/gdb.trace/tfile.c index 76ed462f26e..77b1950107a 100644 --- a/gdb/testsuite/gdb.trace/tfile.c +++ b/gdb/testsuite/gdb.trace/tfile.c @@ -290,4 +290,3 @@ main (void) return 0; } - diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp index a2a79d848a0..c459fa96904 100644 --- a/gdb/testsuite/gdb.trace/trace-break.exp +++ b/gdb/testsuite/gdb.trace/trace-break.exp @@ -287,7 +287,7 @@ proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \ gdb_trace_setactions "set action for tracepoint 1" "" \ "collect \$$pcreg" "^$" gdb_test "${trace2} set_point" "\(Fast t|T\)racepoint \[0-9\] at $hex: file.*" \ - "${trace2} set_point 2" + "${trace2} set_point 2" gdb_trace_setactions "set action for tracepoint 2" "" \ "collect \$$spreg" "^$" diff --git a/gdb/testsuite/gdb.trace/trace-buffer-size.exp b/gdb/testsuite/gdb.trace/trace-buffer-size.exp index 153439fffe4..819dcc9685b 100644 --- a/gdb/testsuite/gdb.trace/trace-buffer-size.exp +++ b/gdb/testsuite/gdb.trace/trace-buffer-size.exp @@ -38,8 +38,8 @@ set test "get default buffer size" # Save default trace buffer size in 'default_size'. gdb_test_multiple "tstatus" $test { -re ".*Trace buffer has ($decimal) bytes of ($decimal) bytes free.*$gdb_prompt $" { - set default_size $expect_out(2,string) - pass $test + set default_size $expect_out(2,string) + pass $test } } diff --git a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp index e62a539df5b..592f60298d7 100644 --- a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp +++ b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp @@ -329,13 +329,13 @@ with_test_prefix "tracing bar" { gdb_test "tfind 0" "Found trace frame 0, tracepoint .*" if { $endian == "little" } { - gdb_test "p/d x" "\\\$${decimal} = {a = 0, b = , c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0}" - gdb_test "p/d y" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = , f = 0, g = 0, h = 0, i = 0, j = 0}" - gdb_test "p/d z" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = , j = 0}" + gdb_test "p/d x" "\\\$${decimal} = {a = 0, b = , c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0}" + gdb_test "p/d y" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = , f = 0, g = 0, h = 0, i = 0, j = 0}" + gdb_test "p/d z" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = , j = 0}" } else { - gdb_test "p/d x" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = , j = 0}" - gdb_test "p/d y" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = , g = 0, h = 0, i = 0, j = 0}" - gdb_test "p/d z" "\\\$${decimal} = {a = 0, b = , c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0}" + gdb_test "p/d x" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = , j = 0}" + gdb_test "p/d y" "\\\$${decimal} = {a = 0, b = 0, c = 0, d = 0, e = 0, f = , g = 0, h = 0, i = 0, j = 0}" + gdb_test "p/d z" "\\\$${decimal} = {a = 0, b = , c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0}" } gdb_test "tfind none" "No longer looking at any trace frame.*" diff --git a/gdb/testsuite/gdb.xml/maint_print_struct.xml b/gdb/testsuite/gdb.xml/maint_print_struct.xml index ccf6cf79239..d09c49f9eb5 100644 --- a/gdb/testsuite/gdb.xml/maint_print_struct.xml +++ b/gdb/testsuite/gdb.xml/maint_print_struct.xml @@ -24,4 +24,3 @@ - diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp index e091721fcc9..fa9b5b71310 100644 --- a/gdb/testsuite/gdb.xml/tdesc-regs.exp +++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp @@ -34,10 +34,10 @@ switch -glob -- [istarget] { } "arm*-*-*" { set regdir "arm/" - set core-regs {arm-core.xml} + set core-regs {arm-core.xml} } "*m68k-*-*" { - set core-regs {m68k-core.xml} + set core-regs {m68k-core.xml} } "mips*-*-*" { set core-regs {mips-cpu.xml mips-cp0.xml mips-fpu.xml mips-dsp.xml} @@ -57,12 +57,12 @@ switch -glob -- [istarget] { } "sparc-*-*" { set regdir "sparc/" - set core-regs {sparc32-cpu.xml sparc32-fpu.xml sparc32-cp0.xml} + set core-regs {sparc32-cpu.xml sparc32-fpu.xml sparc32-cp0.xml} } "sparc64-*-*" { set architecture "sparc:v9" set regdir "sparc/" - set core-regs {sparc64-cpu.xml sparc64-fpu.xml sparc64-cp0.xml} + set core-regs {sparc64-cpu.xml sparc64-fpu.xml sparc64-cp0.xml} } "tic6x-*-*" { set core-regs {tic6x-core.xml} @@ -70,12 +70,12 @@ switch -glob -- [istarget] { "i?86-*-*" { set architecture "i386" set regdir "i386/" - set core-regs {32bit-core.xml 32bit-sse.xml} + set core-regs {32bit-core.xml 32bit-sse.xml} } "x86_64-*-*" { set architecture "i386:x86-64" set regdir "i386/" - set core-regs {64bit-core.xml 64bit-sse.xml} + set core-regs {64bit-core.xml 64bit-sse.xml} } "riscv64*-*-*" { set architecture "riscv:rv64" diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp index 04aaee1c1d4..c6d1c463b2b 100644 --- a/gdb/testsuite/lib/ada.exp +++ b/gdb/testsuite/lib/ada.exp @@ -104,7 +104,7 @@ proc gdb_compile_ada_1 {source dest type options} { append options " additional_flags=-I$srcdir" set result [target_compile_ada_from_dir \ - $objdir [file tail $source] $dest $type $options] + $objdir [file tail $source] $dest $type $options] # The Ada build always produces some output, even when the build # succeeds. Thus, we can not use the output the same way we do in @@ -164,14 +164,14 @@ proc find_ada_tool {tool} { set result "" if {![is_remote host]} { - set result [lookfor_file $root $tool] + set result [lookfor_file $root $tool] if { $result != "" && $tool == "gnatlink" } { set result "$result --GCC=$root/xgcc -B$root" } } if {$result == ""} { - set result [transform $tool] + set result [transform $tool] } return $result diff --git a/gdb/testsuite/lib/dtrace.exp b/gdb/testsuite/lib/dtrace.exp index 2456ba9b7ce..eec05525a0c 100644 --- a/gdb/testsuite/lib/dtrace.exp +++ b/gdb/testsuite/lib/dtrace.exp @@ -48,26 +48,26 @@ proc dtrace_build_usdt_test_program {} { set result [remote_exec host "$dtrace -h -s $dscript_file -o $out_header_file"] verbose -log [lindex $result 1] if {[lindex $result 0] != 0} { - return -1 + return -1 } # 2. Compile testprogram.c. set options [list debug quiet \ additional_flags=-I[file dirname $out_header_file]] if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object ${options}] != ""} { - return -1 + return -1 } # 3. Generate an object file containing a DOF program using dtrace -G. set result [remote_exec host "$dtrace -G -s $dscript_file -o ${binfile}-p.o ${binfile}.o"] verbose -log [lindex $result 1] if {[lindex $result 0] != 0} { - return -1 + return -1 } # 4. Link everything together to get the test program. if {[gdb_compile "${binfile}.o ${binfile}-p.o" ${binfile} executable \ {debug quiet}] != ""} { - return -1 + return -1 } } diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index ba8197d0bb8..6e87d8fba9b 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -181,8 +181,8 @@ proc build_executable_and_dwo_files { testname executable options args } { set ret [$func $objects "${binfile}" executable $options] if { $ret != "" } { - untested $testname - return -1 + untested $testname + return -1 } return 0 diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp index 3064c3e2ad7..ed1d34e2a23 100644 --- a/gdb/testsuite/lib/future.exp +++ b/gdb/testsuite/lib/future.exp @@ -28,14 +28,14 @@ proc gdb_find_gnatmake {} { set GM "" if {![is_remote host]} { - set file [lookfor_file $root gnatmake] - if { $file != "" } { - set GM "$file -I$root/ada/rts --GCC=$root/xgcc --GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs --GCC=$root/xgcc -margs"; - } + set file [lookfor_file $root gnatmake] + if { $file != "" } { + set GM "$file -I$root/ada/rts --GCC=$root/xgcc --GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs --GCC=$root/xgcc -margs"; + } } if {$GM == ""} { - set GM [transform gnatmake] + set GM [transform gnatmake] } return $GM diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index a424086007e..82bb511bccc 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -140,7 +140,7 @@ proc load_lib { file } { foreach varname [info globals] { if { ![info exists known_globals($varname)] } { - gdb_persistent_global_no_decl $varname + gdb_persistent_global_no_decl $varname } } @@ -1447,9 +1447,9 @@ proc gdb_test_multiple { command message args } { if {$line_by_line} { append code { - -re "\r\n\[^\r\n\]*(?=\r\n)" { - exp_continue - } + -re "\r\n\[^\r\n\]*(?=\r\n)" { + exp_continue + } } } @@ -1921,14 +1921,14 @@ proc test_print_reject { args } { pass "reject $sendthis" return 1 } - -re "Unmatched single quote.*$gdb_prompt $" { - pass "reject $sendthis" - return 1 - } - -re "A character constant must contain at least one character.*$gdb_prompt $" { - pass "reject $sendthis" - return 1 - } + -re "Unmatched single quote.*$gdb_prompt $" { + pass "reject $sendthis" + return 1 + } + -re "A character constant must contain at least one character.*$gdb_prompt $" { + pass "reject $sendthis" + return 1 + } -re "$expectthis.*$gdb_prompt $" { pass "reject $sendthis" return 1 @@ -2562,49 +2562,49 @@ proc gdb_file_cmd { arg {kill_flag 1} } { set gdb_file_cmd_debug_info "nodebug" return 0 } - -re "(Reading symbols from.*$gdb_prompt $)" { - verbose "\t\tLoaded $arg into $GDB" + -re "(Reading symbols from.*$gdb_prompt $)" { + verbose "\t\tLoaded $arg into $GDB" set gdb_file_cmd_msg $expect_out(1,string) set gdb_file_cmd_debug_info "debug" return 0 - } - -re "Load new symbol table from \".*\".*y or n. $" { + } + -re "Load new symbol table from \".*\".*y or n. $" { if { $new_symbol_table > 0 } { perror [join [list "Couldn't load $basename," "interactive prompt loop detected."]] return -1 } - send_gdb "y\n" answer + send_gdb "y\n" answer incr new_symbol_table set suffix "-- with new symbol table" set arg "$arg $suffix" set basename "$basename $suffix" exp_continue } - -re "No such file or directory.*$gdb_prompt $" { - perror "($basename) No such file or directory" + -re "No such file or directory.*$gdb_prompt $" { + perror "($basename) No such file or directory" return -1 - } + } -re "A problem internal to GDB has been detected" { perror "Couldn't load $basename into GDB (GDB internal error)." gdb_internal_error_resync return -1 } - -re "$gdb_prompt $" { - perror "Couldn't load $basename into GDB." + -re "$gdb_prompt $" { + perror "Couldn't load $basename into GDB." return -1 - } - timeout { - perror "Couldn't load $basename into GDB (timeout)." + } + timeout { + perror "Couldn't load $basename into GDB (timeout)." return -1 - } - eof { - # This is an attempt to detect a core dump, but seems not to - # work. Perhaps we need to match .* followed by eof, in which - # gdb_expect does not seem to have a way to do that. - perror "Couldn't load $basename into GDB (eof)." + } + eof { + # This is an attempt to detect a core dump, but seems not to + # work. Perhaps we need to match .* followed by eof, in which + # gdb_expect does not seem to have a way to do that. + perror "Couldn't load $basename into GDB (eof)." return -1 - } + } } } @@ -3061,15 +3061,15 @@ gdb_caching_proc allow_dlmopen_tests {} { r_debug = 0; /* Taken from /usr/include/link.h. */ for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) - if (dyn->d_tag == DT_DEBUG) - r_debug = (struct r_debug *) dyn->d_un.d_ptr; + if (dyn->d_tag == DT_DEBUG) + r_debug = (struct r_debug *) dyn->d_un.d_ptr; if (!r_debug) { - printf ("r_debug not found.\n"); + printf ("r_debug not found.\n"); return 1; } if (r_debug->r_version < 2) { - printf ("dlmopen debug not supported.\n"); + printf ("dlmopen debug not supported.\n"); return 1; } printf ("dlmopen debug supported.\n"); @@ -3102,16 +3102,16 @@ gdb_caching_proc allow_dlmopen_tests {} { return 0 } gdb_expect { - -re "$inferior_exited_re normally.*${gdb_prompt} $" { + -re "$inferior_exited_re normally.*${gdb_prompt} $" { set allow_dlmopen_tests 1 - } - -re "$inferior_exited_re with code.*${gdb_prompt} $" { + } + -re "$inferior_exited_re with code.*${gdb_prompt} $" { set allow_dlmopen_tests 0 - } - default { + } + default { warning "\n$me: default case taken" set allow_dlmopen_tests 0 - } + } } gdb_exit @@ -3902,10 +3902,10 @@ proc supports_process_record {} { } if { [istarget "arm*-*-linux*"] || [istarget "x86_64-*-linux*"] - || [istarget "i\[34567\]86-*-linux*"] - || [istarget "aarch64*-*-linux*"] + || [istarget "i\[34567\]86-*-linux*"] + || [istarget "aarch64*-*-linux*"] || [istarget "loongarch*-*-linux*"] - || [istarget "powerpc*-*-linux*"] + || [istarget "powerpc*-*-linux*"] || [istarget "s390*-*-linux*"] || [istarget "riscv*-*-*"] } { return 1 @@ -3923,10 +3923,10 @@ proc supports_reverse {} { } if { [istarget "arm*-*-linux*"] || [istarget "x86_64-*-linux*"] - || [istarget "i\[34567\]86-*-linux*"] - || [istarget "aarch64*-*-linux*"] + || [istarget "i\[34567\]86-*-linux*"] + || [istarget "aarch64*-*-linux*"] || [istarget "loongarch*-*-linux*"] - || [istarget "powerpc*-*-linux*"] + || [istarget "powerpc*-*-linux*"] || [istarget "s390*-*-linux*"] || [istarget "riscv*-*-*"] } { return 1 @@ -3984,7 +3984,7 @@ gdb_caching_proc is_elf_target {} { set src { int foo () {return 0;} } if {![gdb_simple_compile elf_target $src]} { - return 0 + return 0 } set fp_obj [open $obj "r"] @@ -4218,9 +4218,9 @@ gdb_caching_proc allow_altivec_tests {} { # Make sure we have a compiler that understands altivec. if {[test_compiler_info gcc*]} { - set compile_flags "additional_flags=-maltivec" + set compile_flags "additional_flags=-maltivec" } elseif {[test_compiler_info xlc*]} { - set compile_flags "additional_flags=-qaltivec" + set compile_flags "additional_flags=-qaltivec" } else { verbose "Could not compile with altivec support, returning 0" 2 return 0 @@ -4249,18 +4249,18 @@ gdb_caching_proc allow_altivec_tests {} { gdb_load "$obj" gdb_run_cmd gdb_expect { - -re ".*Illegal instruction.*${gdb_prompt} $" { - verbose -log "\n$me altivec hardware not detected" + -re ".*Illegal instruction.*${gdb_prompt} $" { + verbose -log "\n$me altivec hardware not detected" set allow_vmx_tests 0 - } - -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { - verbose -log "\n$me: altivec hardware detected" + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "\n$me: altivec hardware detected" set allow_vmx_tests 1 - } - default { - warning "\n$me: default case taken" + } + default { + warning "\n$me: default case taken" set allow_vmx_tests 0 - } + } } gdb_exit remote_file build delete $obj @@ -4296,18 +4296,18 @@ gdb_caching_proc allow_power_isa_3_1_tests {} { gdb_load "$obj" gdb_run_cmd gdb_expect { - -re ".*Illegal instruction.*${gdb_prompt} $" { - verbose -log "\n$me Power ISA 3.1 hardware not detected" + -re ".*Illegal instruction.*${gdb_prompt} $" { + verbose -log "\n$me Power ISA 3.1 hardware not detected" set allow_power_isa_3_1_tests 0 - } - -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { - verbose -log "\n$me: Power ISA 3.1 hardware detected" + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "\n$me: Power ISA 3.1 hardware detected" set allow_power_isa_3_1_tests 1 - } - default { + } + default { warning "\n$me: default case taken" set allow_power_isa_3_1_tests 0 - } + } } gdb_exit remote_file build delete $obj @@ -4333,9 +4333,9 @@ gdb_caching_proc allow_vsx_tests {} { # Make sure we have a compiler that understands altivec. if {[test_compiler_info gcc*]} { - set compile_flags "additional_flags=-mvsx" + set compile_flags "additional_flags=-mvsx" } elseif {[test_compiler_info xlc*]} { - set compile_flags "additional_flags=-qasm=gcc" + set compile_flags "additional_flags=-qasm=gcc" } else { verbose "Could not compile with vsx support, returning 0" 2 return 0 @@ -4365,18 +4365,18 @@ gdb_caching_proc allow_vsx_tests {} { gdb_load "$obj" gdb_run_cmd gdb_expect { - -re ".*Illegal instruction.*${gdb_prompt} $" { - verbose -log "\n$me VSX hardware not detected" + -re ".*Illegal instruction.*${gdb_prompt} $" { + verbose -log "\n$me VSX hardware not detected" set allow_vsx_tests 0 - } - -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { - verbose -log "\n$me: VSX hardware detected" + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "\n$me: VSX hardware detected" set allow_vsx_tests 1 - } - default { - warning "\n$me: default case taken" + } + default { + warning "\n$me: default case taken" set allow_vsx_tests 0 - } + } } gdb_exit remote_file build delete $obj @@ -4395,12 +4395,12 @@ gdb_caching_proc allow_tsx_tests {} { # Compile a test program. set src { - int main() { - asm volatile ("xbegin .L0"); - asm volatile ("xend"); - asm volatile (".L0: nop"); - return 0; - } + int main() { + asm volatile ("xbegin .L0"); + asm volatile ("xend"); + asm volatile (".L0: nop"); + return 0; + } } if {![gdb_simple_compile $me $src executable]} { return 0 @@ -4414,18 +4414,18 @@ gdb_caching_proc allow_tsx_tests {} { gdb_load "$obj" gdb_run_cmd gdb_expect { - -re ".*Illegal instruction.*${gdb_prompt} $" { - verbose -log "$me: TSX hardware not detected." + -re ".*Illegal instruction.*${gdb_prompt} $" { + verbose -log "$me: TSX hardware not detected." set allow_tsx_tests 0 - } - -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { - verbose -log "$me: TSX hardware detected." + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "$me: TSX hardware detected." set allow_tsx_tests 1 - } - default { - warning "\n$me: default case taken." + } + default { + warning "\n$me: default case taken." set allow_tsx_tests 0 - } + } } gdb_exit remote_file build delete $obj @@ -4518,10 +4518,10 @@ gdb_caching_proc allow_avx512bf16_tests {} { # Compile a test program. set src { - int main() { - asm volatile ("vcvtne2ps2bf16 %xmm0, %xmm1, %xmm0"); - return 0; - } + int main() { + asm volatile ("vcvtne2ps2bf16 %xmm0, %xmm1, %xmm0"); + return 0; + } } if {![gdb_simple_compile $me $src executable]} { return 0 @@ -4535,18 +4535,18 @@ gdb_caching_proc allow_avx512bf16_tests {} { gdb_load "$obj" gdb_run_cmd gdb_expect { - -re ".*Illegal instruction.*${gdb_prompt} $" { - verbose -log "$me: avx512bf16 hardware not detected." + -re ".*Illegal instruction.*${gdb_prompt} $" { + verbose -log "$me: avx512bf16 hardware not detected." set allow_avx512bf16_tests 0 - } - -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { - verbose -log "$me: avx512bf16 hardware detected." + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "$me: avx512bf16 hardware detected." set allow_avx512bf16_tests 1 - } - default { - warning "\n$me: default case taken." + } + default { + warning "\n$me: default case taken." set allow_avx512bf16_tests 0 - } + } } gdb_exit remote_file build delete $obj @@ -4569,10 +4569,10 @@ gdb_caching_proc allow_avx512fp16_tests {} { # Compile a test program. set src { - int main() { - asm volatile ("vcvtps2phx %xmm1, %xmm0"); - return 0; - } + int main() { + asm volatile ("vcvtps2phx %xmm1, %xmm0"); + return 0; + } } if {![gdb_simple_compile $me $src executable]} { return 0 @@ -4586,18 +4586,18 @@ gdb_caching_proc allow_avx512fp16_tests {} { gdb_load "$obj" gdb_run_cmd gdb_expect { - -re ".*Illegal instruction.*${gdb_prompt} $" { - verbose -log "$me: avx512fp16 hardware not detected." + -re ".*Illegal instruction.*${gdb_prompt} $" { + verbose -log "$me: avx512fp16 hardware not detected." set allow_avx512fp16_tests 0 - } - -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { - verbose -log "$me: avx512fp16 hardware detected." + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "$me: avx512fp16 hardware detected." set allow_avx512fp16_tests 1 - } - default { - warning "\n$me: default case taken." + } + default { + warning "\n$me: default case taken." set allow_avx512fp16_tests 0 - } + } } gdb_exit remote_file build delete $obj @@ -4701,18 +4701,18 @@ gdb_caching_proc allow_btrace_tests {} { # In case of an unexpected output, we return 2 as a fail value. set allow_btrace_tests 2 gdb_test_multiple "record btrace" "check btrace support" { - -re "You can't do that when your target is.*\r\n$gdb_prompt $" { + -re "You can't do that when your target is.*\r\n$gdb_prompt $" { set allow_btrace_tests 0 - } - -re "Target does not support branch tracing.*\r\n$gdb_prompt $" { + } + -re "Target does not support branch tracing.*\r\n$gdb_prompt $" { set allow_btrace_tests 0 - } - -re "Could not enable branch tracing.*\r\n$gdb_prompt $" { + } + -re "Could not enable branch tracing.*\r\n$gdb_prompt $" { set allow_btrace_tests 0 - } - -re "^record btrace\r\n$gdb_prompt $" { + } + -re "^record btrace\r\n$gdb_prompt $" { set allow_btrace_tests 1 - } + } } gdb_exit remote_file build delete $obj @@ -4752,21 +4752,21 @@ gdb_caching_proc allow_btrace_pt_tests {} { # In case of an unexpected output, we return 2 as a fail value. set allow_btrace_pt_tests 2 gdb_test_multiple "record btrace pt" "check btrace pt support" { - -re "You can't do that when your target is.*\r\n$gdb_prompt $" { + -re "You can't do that when your target is.*\r\n$gdb_prompt $" { set allow_btrace_pt_tests 0 - } - -re "Target does not support branch tracing.*\r\n$gdb_prompt $" { + } + -re "Target does not support branch tracing.*\r\n$gdb_prompt $" { set allow_btrace_pt_tests 0 - } - -re "Could not enable branch tracing.*\r\n$gdb_prompt $" { + } + -re "Could not enable branch tracing.*\r\n$gdb_prompt $" { set allow_btrace_pt_tests 0 - } - -re "support was disabled at compile time.*\r\n$gdb_prompt $" { + } + -re "support was disabled at compile time.*\r\n$gdb_prompt $" { set allow_btrace_pt_tests 0 - } - -re "^record btrace pt\r\n$gdb_prompt $" { + } + -re "^record btrace pt\r\n$gdb_prompt $" { set allow_btrace_pt_tests 1 - } + } } gdb_exit remote_file build delete $obj @@ -4926,7 +4926,7 @@ gdb_caching_proc allow_aarch64_sve_tests {} { } } if {![gdb_simple_compile $me $src executable $compile_flags]} { - return 0 + return 0 } # Compilation succeeded so now run it via gdb. @@ -4934,18 +4934,18 @@ gdb_caching_proc allow_aarch64_sve_tests {} { gdb_load $obj gdb_run_cmd gdb_expect { - -re ".*Illegal instruction.*${gdb_prompt} $" { - verbose -log "\n$me sve hardware not detected" - set allow_sve_tests 0 - } - -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { - verbose -log "\n$me: sve hardware detected" - set allow_sve_tests 1 - } - default { - warning "\n$me: default case taken" - set allow_sve_tests 0 - } + -re ".*Illegal instruction.*${gdb_prompt} $" { + verbose -log "\n$me sve hardware not detected" + set allow_sve_tests 0 + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "\n$me: sve hardware detected" + set allow_sve_tests 1 + } + default { + warning "\n$me: default case taken" + set allow_sve_tests 0 + } } gdb_exit remote_file build delete $obj @@ -5929,9 +5929,9 @@ proc gcc_major_version { {compiler "gcc-*"} {language "c"} } { proc current_target_name { } { global target_info if {[info exists target_info(target,name)]} { - set answer $target_info(target,name) + set answer $target_info(target,name) } else { - set answer "" + set answer "" } return $answer } @@ -6036,18 +6036,18 @@ proc gdb_simple_compile {name code {type object} {compile_flags {}} {object obj} upvar $object obj switch -regexp -- $type { - "executable" { - set postfix "x" - } - "object" { - set postfix "o" - } - "preprocess" { - set postfix "i" - } - "assembly" { - set postfix "s" - } + "executable" { + set postfix "x" + } + "object" { + set postfix "o" + } + "preprocess" { + set postfix "i" + } + "assembly" { + set postfix "s" + } } set ext "c" foreach flag $compile_flags { @@ -6084,8 +6084,8 @@ proc gdb_simple_compile {name code {type object} {compile_flags {}} {object obj} file delete $src if {![string match "" $lines]} { - verbose "$name: compilation failed, returning 0" 2 - return 0 + verbose "$name: compilation failed, returning 0" 2 + return 0 } return 1 } @@ -6377,9 +6377,9 @@ proc gdb_compile {source dest type options} { set shlib_found 0 set shlib_load 0 foreach opt $options { - if {[regexp {^shlib=(.*)} $opt dummy_var shlib_name] + if {[regexp {^shlib=(.*)} $opt dummy_var shlib_name] && $type == "executable"} { - if {[test_compiler_info "xlc-*"]} { + if {[test_compiler_info "xlc-*"]} { # IBM xlc compiler doesn't accept shared library named other # than .so: use "-Wl," to bypass this lappend source "-Wl,$shlib_name" @@ -6387,11 +6387,11 @@ proc gdb_compile {source dest type options} { || [istarget *-*-cygwin*] || [istarget *-*-pe*])} { lappend source "${shlib_name}.a" - } else { - lappend source $shlib_name - } - if { $shlib_found == 0 } { - set shlib_found 1 + } else { + lappend source $shlib_name + } + if { $shlib_found == 0 } { + set shlib_found 1 if { ([istarget "*-*-mingw*"] || [istarget *-*-cygwin*]) } { lappend new_options "ldflags=-Wl,--enable-auto-import" @@ -6403,26 +6403,26 @@ proc gdb_compile {source dest type options} { # shlibs! lappend new_options "early_flags=-Wl,--no-as-needed" } - } + } } elseif { $opt == "shlib_load" && $type == "executable" } { set shlib_load 1 } elseif { $opt == "getting_compiler_info" } { # Ignore this setting here as it has been handled earlier in this # procedure. Do not append it to new_options as this will cause # recursion. - } elseif {[regexp "^text_segment=(.*)" $opt dummy_var addr]} { - if { [linker_supports_Ttext_segment_flag] } { - # For GNU ld. - lappend new_options "ldflags=-Wl,-Ttext-segment=$addr" - } elseif { [linker_supports_image_base_flag] } { - # For LLVM's lld. - lappend new_options "ldflags=-Wl,--image-base=$addr" - } elseif { [linker_supports_Ttext_flag] } { - # For old GNU gold versions. - lappend new_options "ldflags=-Wl,-Ttext=$addr" - } else { - error "Don't know how to handle text_segment option." - } + } elseif {[regexp "^text_segment=(.*)" $opt dummy_var addr]} { + if { [linker_supports_Ttext_segment_flag] } { + # For GNU ld. + lappend new_options "ldflags=-Wl,-Ttext-segment=$addr" + } elseif { [linker_supports_image_base_flag] } { + # For LLVM's lld. + lappend new_options "ldflags=-Wl,--image-base=$addr" + } elseif { [linker_supports_Ttext_flag] } { + # For old GNU gold versions. + lappend new_options "ldflags=-Wl,-Ttext=$addr" + } else { + error "Don't know how to handle text_segment option." + } } elseif { $opt == "column-info" } { # If GCC or clang does not support column-info, compilation # will fail and the usupported column-info option will be @@ -6462,9 +6462,9 @@ proc gdb_compile {source dest type options} { } else { error "No idea how to force DWARF-5 in this compiler" } - } else { - lappend new_options $opt - } + } else { + lappend new_options $opt + } } # Ensure stack protector is disabled for GCC, as this causes problems with @@ -6476,8 +6476,8 @@ proc gdb_compile {source dest type options} { && !([test_compiler_info {gcc-[0-3]-*}] || [test_compiler_info {gcc-4-0-*}]) && [lsearch -exact $options rust] == -1} { - # Put it at the front to not override any user-provided value. - lappend new_options "early_flags=-fno-stack-protector" + # Put it at the front to not override any user-provided value. + lappend new_options "early_flags=-fno-stack-protector" } # hipcc defaults to -O2, so add -O0 to early flags for the hip language. @@ -6705,31 +6705,31 @@ proc gdb_compile_pthreads {source dest type options} { set built_binfile 0 set why_msg "unrecognized error" foreach lib {-lpthreads -lpthread -lthread ""} { - # This kind of wipes out whatever libs the caller may have - # set. Or maybe theirs will override ours. How infelicitous. - set options_with_lib [concat $options [list libs=$lib quiet]] - set ccout [gdb_compile $source $dest $type $options_with_lib] - switch -regexp -- $ccout { - ".*no posix threads support.*" { - set why_msg "missing threads include file" - break - } - ".*cannot open -lpthread.*" { - set why_msg "missing runtime threads library" - } - ".*Can't find library for -lpthread.*" { - set why_msg "missing runtime threads library" - } - {^$} { - pass "successfully compiled posix threads test case" - set built_binfile 1 - break - } - } + # This kind of wipes out whatever libs the caller may have + # set. Or maybe theirs will override ours. How infelicitous. + set options_with_lib [concat $options [list libs=$lib quiet]] + set ccout [gdb_compile $source $dest $type $options_with_lib] + switch -regexp -- $ccout { + ".*no posix threads support.*" { + set why_msg "missing threads include file" + break + } + ".*cannot open -lpthread.*" { + set why_msg "missing runtime threads library" + } + ".*Can't find library for -lpthread.*" { + set why_msg "missing runtime threads library" + } + {^$} { + pass "successfully compiled posix threads test case" + set built_binfile 1 + break + } + } } if {!$built_binfile} { unsupported "couldn't compile [file tail $source]: ${why_msg}" - return -1 + return -1 } } @@ -6752,9 +6752,9 @@ proc gdb_compile_shlib_1 {sources dest options} { } switch -glob [test_compiler_info "" ${info_options}] { - "xlc-*" { - lappend obj_options "additional_flags=-qpic" - } + "xlc-*" { + lappend obj_options "additional_flags=-qpic" + } "clang-*" { if { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } { @@ -6763,24 +6763,24 @@ proc gdb_compile_shlib_1 {sources dest options} { lappend obj_options "additional_flags=-fpic" } } - "gcc-*" { - if { [istarget "powerpc*-*-aix*"] - || [istarget "rs6000*-*-aix*"] - || [istarget "*-*-cygwin*"] - || [istarget "*-*-mingw*"] - || [istarget "*-*-pe*"] } { - lappend obj_options "additional_flags=-fPIC" + "gcc-*" { + if { [istarget "powerpc*-*-aix*"] + || [istarget "rs6000*-*-aix*"] + || [istarget "*-*-cygwin*"] + || [istarget "*-*-mingw*"] + || [istarget "*-*-pe*"] } { + lappend obj_options "additional_flags=-fPIC" } else { - lappend obj_options "additional_flags=-fpic" - } - } - "icc-*" { - lappend obj_options "additional_flags=-fpic" - } - default { + lappend obj_options "additional_flags=-fpic" + } + } + "icc-*" { + lappend obj_options "additional_flags=-fpic" + } + default { # don't know what the compiler is... lappend obj_options "additional_flags=-fPIC" - } + } } set outdir [file dirname $dest] @@ -6917,31 +6917,31 @@ proc gdb_compile_shlib_pthreads {sources dest options} { set built_binfile 0 set why_msg "unrecognized error" foreach lib {-lpthreads -lpthread -lthread ""} { - # This kind of wipes out whatever libs the caller may have - # set. Or maybe theirs will override ours. How infelicitous. - set options_with_lib [concat $options [list libs=$lib quiet]] - set ccout [gdb_compile_shlib $sources $dest $options_with_lib] - switch -regexp -- $ccout { - ".*no posix threads support.*" { - set why_msg "missing threads include file" - break - } - ".*cannot open -lpthread.*" { - set why_msg "missing runtime threads library" - } - ".*Can't find library for -lpthread.*" { - set why_msg "missing runtime threads library" - } - {^$} { - pass "successfully compiled posix threads shlib test case" - set built_binfile 1 - break - } - } + # This kind of wipes out whatever libs the caller may have + # set. Or maybe theirs will override ours. How infelicitous. + set options_with_lib [concat $options [list libs=$lib quiet]] + set ccout [gdb_compile_shlib $sources $dest $options_with_lib] + switch -regexp -- $ccout { + ".*no posix threads support.*" { + set why_msg "missing threads include file" + break + } + ".*cannot open -lpthread.*" { + set why_msg "missing runtime threads library" + } + ".*Can't find library for -lpthread.*" { + set why_msg "missing runtime threads library" + } + {^$} { + pass "successfully compiled posix threads shlib test case" + set built_binfile 1 + break + } + } } if {!$built_binfile} { - unsupported "couldn't compile $sources: ${why_msg}" - return -1 + unsupported "couldn't compile $sources: ${why_msg}" + return -1 } } @@ -6951,37 +6951,37 @@ proc gdb_compile_objc {source dest type options} { set built_binfile 0 set why_msg "unrecognized error" foreach lib {-lobjc -lpthreads -lpthread -lthread solaris} { - # This kind of wipes out whatever libs the caller may have - # set. Or maybe theirs will override ours. How infelicitous. - if { $lib == "solaris" } { - set lib "-lpthread -lposix4" + # This kind of wipes out whatever libs the caller may have + # set. Or maybe theirs will override ours. How infelicitous. + if { $lib == "solaris" } { + set lib "-lpthread -lposix4" } - if { $lib != "-lobjc" } { + if { $lib != "-lobjc" } { set lib "-lobjc $lib" } - set options_with_lib [concat $options [list libs=$lib quiet]] - set ccout [gdb_compile $source $dest $type $options_with_lib] - switch -regexp -- $ccout { - ".*no posix threads support.*" { - set why_msg "missing threads include file" - break - } - ".*cannot open -lpthread.*" { - set why_msg "missing runtime threads library" - } - ".*Can't find library for -lpthread.*" { - set why_msg "missing runtime threads library" - } - {^$} { - pass "successfully compiled objc with posix threads test case" - set built_binfile 1 - break - } - } + set options_with_lib [concat $options [list libs=$lib quiet]] + set ccout [gdb_compile $source $dest $type $options_with_lib] + switch -regexp -- $ccout { + ".*no posix threads support.*" { + set why_msg "missing threads include file" + break + } + ".*cannot open -lpthread.*" { + set why_msg "missing runtime threads library" + } + ".*Can't find library for -lpthread.*" { + set why_msg "missing runtime threads library" + } + {^$} { + pass "successfully compiled objc with posix threads test case" + set built_binfile 1 + break + } + } } if {!$built_binfile} { - unsupported "couldn't compile [file tail $source]: ${why_msg}" - return -1 + unsupported "couldn't compile [file tail $source]: ${why_msg}" + return -1 } } @@ -7037,7 +7037,7 @@ proc gdb_expect { args } { {uplevel remote_expect host $tmt $expcode} string] if {$code == 1} { - global errorInfo errorCode + global errorInfo errorCode return -code error -errorinfo $errorInfo -errorcode $errorCode $string } else { @@ -7065,7 +7065,7 @@ proc gdb_expect_list {test sentinel list} { while { ${index} < [llength ${list}] } { set pattern [lindex ${list} ${index}] - incr index + incr index verbose -log "gdb_expect_list pattern: /$pattern/" 2 if { ${index} == [llength ${list}] } { if { ${ok} } { @@ -7897,8 +7897,8 @@ proc default_gdb_init { test_file_name } { global banned_traced if {!$banned_traced} { foreach banned_var $banned_variables { - global "$banned_var" - trace add variable "$banned_var" write error + global "$banned_var" + trace add variable "$banned_var" write error } foreach banned_proc $banned_procedures { global "$banned_proc" @@ -8394,9 +8394,9 @@ proc gdb_finish { } { global banned_procedures global banned_traced if {$banned_traced} { - foreach banned_var $banned_variables { - global "$banned_var" - trace remove variable "$banned_var" write error + foreach banned_var $banned_variables { + global "$banned_var" + trace remove variable "$banned_var" write error } foreach banned_proc $banned_procedures { global "$banned_proc" @@ -8573,7 +8573,7 @@ proc gdb_get_line_number { text { file "" } } { } if {$found == -1} { - error "undefined tag \"$text\"" + error "undefined tag \"$text\"" } return $found @@ -9194,13 +9194,13 @@ proc test_class_help { command_class expected_initial_lines {list_of_commands {} global help_list_trailer if {[llength $list_of_commands]>0} { set l_list_of_commands {"List of commands:[\r\n]+[\r\n]+"} - set l_list_of_commands [concat $l_list_of_commands $list_of_commands] + set l_list_of_commands [concat $l_list_of_commands $list_of_commands] set l_list_of_commands [concat $l_list_of_commands {"[\r\n]+[\r\n]+"}] } else { - set l_list_of_commands {"List of commands\:.*[\r\n]+"} + set l_list_of_commands {"List of commands\:.*[\r\n]+"} } set l_stock_body { - "Type \"help\" followed by command name for full documentation\.[\r\n]+" + "Type \"help\" followed by command name for full documentation\.[\r\n]+" } set l_entire_body [concat $expected_initial_lines $l_list_of_commands \ $l_stock_body $help_list_trailer] @@ -9229,20 +9229,20 @@ proc test_prefix_command_help { command_list expected_initial_lines args } { global help_list_trailer set command [lindex $command_list 0] if {[llength $command_list]>1} { - set full_command [lindex $command_list 1] + set full_command [lindex $command_list 1] } else { - set full_command $command + set full_command $command } # Use 'list' and not just {} because we want variables to # be expanded in this list. set l_stock_body [list\ - "List of \"$full_command\" subcommands\:.*\[\r\n\]+"\ - "Type \"help $full_command\" followed by subcommand name for full documentation\.\[\r\n\]+"] + "List of \"$full_command\" subcommands\:.*\[\r\n\]+"\ + "Type \"help $full_command\" followed by subcommand name for full documentation\.\[\r\n\]+"] set l_entire_body [concat $expected_initial_lines $l_stock_body $help_list_trailer] if {[llength $args]>0} { - help_test_raw "help ${command}" $l_entire_body [lindex $args 0] + help_test_raw "help ${command}" $l_entire_body [lindex $args 0] } else { - help_test_raw "help ${command}" $l_entire_body + help_test_raw "help ${command}" $l_entire_body } } @@ -9309,8 +9309,8 @@ proc build_executable_from_specs {testname executable options args} { set ret [$func $objects "${binfile}" executable $options] } if { $ret != "" } { - untested $testname - return -1 + untested $testname + return -1 } return 0 @@ -9322,7 +9322,7 @@ proc build_executable_from_specs {testname executable options args} { # to gdb_compile directly. proc build_executable { testname executable {sources ""} {options {debug}} } { if {[llength $sources]==0} { - set sources ${executable}.c + set sources ${executable}.c } set arglist [list $testname $executable $options] @@ -9399,7 +9399,7 @@ proc prepare_for_testing_full {testname args} { proc prepare_for_testing { testname executable {sources ""} {options {debug}}} { if {[build_executable $testname $executable $sources $options] == -1} { - return -1 + return -1 } clean_restart $executable @@ -9615,13 +9615,13 @@ gdb_caching_proc target_endianness {} { set src { int main() { return 0; } } if {![gdb_simple_compile $me $src executable]} { - return 0 + return 0 } clean_restart gdb_load $obj if {![runto_main]} { - return 0 + return 0 } set res [get_endianness] @@ -9835,7 +9835,7 @@ gdb_caching_proc gdb_target_symbol_prefix {} { # Compile a simple test program... set src { int main() { return 0; } } if {![gdb_simple_compile target_symbol_prefix $src executable]} { - return 0 + return 0 } set prefix "" @@ -9863,13 +9863,13 @@ gdb_caching_proc target_supports_scheduler_locking {} { set src { int main() { return 0; } } if {![gdb_simple_compile $me $src executable]} { - return 0 + return 0 } clean_restart gdb_load $obj if {![runto_main]} { - return 0 + return 0 } set supports_schedule_locking -1 @@ -9921,7 +9921,7 @@ gdb_caching_proc support_nested_function_tests {} { return [gdb_can_simple_compile nested_func { int main () { int foo () { - return 0; + return 0; } return foo (); } @@ -9998,8 +9998,8 @@ proc run_on_host { test program args } { set status [lindex $result 0] set output [lindex $result 1] if {$status == 0} { - pass $test - return 0 + pass $test + return 0 } else { verbose -log "run_on_host failed: $output" if { $output == "spawn failed" } { @@ -10410,12 +10410,12 @@ proc gdb_stdin_log_write { message {type standard} } { # Check message types. switch -regexp -- $type { - "answer" { - return - } - "optional" { - return - } + "answer" { + return + } + "optional" { + return + } } # Write to the log and make sure the output is there, even in case @@ -10814,10 +10814,10 @@ proc with_override { name override body } { # Return as appropriate. if { $code == 1 } { - global errorInfo errorCode - return -code error -errorinfo $errorInfo -errorcode $errorCode $result + global errorInfo errorCode + return -code error -errorinfo $errorInfo -errorcode $errorCode $result } elseif { $code > 1 } { - return -code $code $result + return -code $code $result } return $result @@ -10954,8 +10954,8 @@ gdb_caching_proc have_avx {} { set me "have_avx" if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } { - verbose "$me: target does not support avx, returning 0" 2 - return 0 + verbose "$me: target does not support avx, returning 0" 2 + return 0 } # Compile a test program. @@ -10976,7 +10976,7 @@ gdb_caching_proc have_avx {} { } set compile_flags "incdir=${srcdir}/.." if {![gdb_simple_compile $me $src executable $compile_flags]} { - return 0 + return 0 } set target_obj [gdb_remote_download target $obj] @@ -11127,7 +11127,7 @@ gdb_caching_proc has_hw_wp_support {} { } if {![gdb_simple_compile $me $src executable $compile_flags]} { - return 0 + return 0 } gdb_start @@ -11150,7 +11150,7 @@ gdb_caching_proc has_hw_wp_support {} { -re ".*Hardware watchpoint.*" { # HW watchpoint supported by platform verbose -log "\n$me: Hardware watchpoint detected" - set has_hw_wp_support 1 + set has_hw_wp_support 1 } -re ".*$gdb_prompt $" { set has_hw_wp_support 0 @@ -11627,7 +11627,7 @@ gdb_caching_proc root_user {} { # reason. Return that we are not root, so problems are easier to # spot. if { $ret_val != 0 } { - return 0 + return 0 } regexp -all ".*uid=(\[0-9\]+).*" $output dummy uid diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp index 0652b35a051..0574d680932 100644 --- a/gdb/testsuite/lib/gdbserver-support.exp +++ b/gdb/testsuite/lib/gdbserver-support.exp @@ -59,7 +59,7 @@ proc gdb_target_cmd_ext { targetname serialport {additional_text ""} } { exp_continue } -re "unknown host.*$gdb_prompt" { - verbose "Couldn't look up $serialport" + verbose "Couldn't look up $serialport" } -re "Couldn't establish connection to remote.*$gdb_prompt $" { verbose "Connection failed" @@ -545,9 +545,9 @@ proc gdbserver_exit { is_mi } { exp_continue } } - timeout { - warning "Timed out waiting for EOF in server after $monitor_exit" - } + timeout { + warning "Timed out waiting for EOF in server after $monitor_exit" + } } } } @@ -747,7 +747,7 @@ proc gdb_debug_init { } { foreach entry [split $gdbserverdebug ,] { if { $entry == "replay" || $entry == "all"} { set replayfile [standard_output_file_with_gdb_instance gdbserver.replay] - send_gdb "set remotelogfile $replayfile\n" optional + send_gdb "set remotelogfile $replayfile\n" optional gdb_expect 10 { -re "$gdb_prompt $" {} } diff --git a/gdb/testsuite/lib/gen-perf-test.exp b/gdb/testsuite/lib/gen-perf-test.exp index feee2db1604..3e32a52a6f4 100644 --- a/gdb/testsuite/lib/gen-perf-test.exp +++ b/gdb/testsuite/lib/gen-perf-test.exp @@ -1050,7 +1050,7 @@ namespace eval GenPerfTest { } verbose -log "_gen_sha1sum_for_inputs: summing $source_files $header_paths $inputs" set catch_result [catch {exec $CAT_PROGRAM $source_files $header_paths $inputs | $SHA1SUM_PROGRAM} output] - return [list $catch_result $output] + return [list $catch_result $output] } # Return the contents of TEXT_FILE. diff --git a/gdb/testsuite/lib/memory.exp b/gdb/testsuite/lib/memory.exp index b8aadb65b0d..1b7d13ae787 100644 --- a/gdb/testsuite/lib/memory.exp +++ b/gdb/testsuite/lib/memory.exp @@ -23,8 +23,8 @@ proc delete_memory_regions {} { gdb_test_multiple "delete mem" "delete mem" { -re "Delete all memory regions.*y or n.*$" { - send_gdb "y\n" - exp_continue + send_gdb "y\n" + exp_continue } -re "$gdb_prompt $" { } } diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index eac9c47711f..b64c5862f26 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -2936,16 +2936,16 @@ proc foreach_mi_ui_mode { var_name body } { foreach var $modes { with_test_prefix "$var_name=$var" { - set code [catch {uplevel 1 $body} result] + set code [catch {uplevel 1 $body} result] } if {$code == 1} { - global errorInfo errorCode - return -code $code -errorinfo $errorInfo -errorcode $errorCode $result + global errorInfo errorCode + return -code $code -errorinfo $errorInfo -errorcode $errorCode $result } elseif {$code == 3} { - break + break } elseif {$code == 2} { - return -code $code $result + return -code $code $result } } } diff --git a/gdb/testsuite/lib/opencl.exp b/gdb/testsuite/lib/opencl.exp index 2a5300e6dc0..b9a6a6a273b 100644 --- a/gdb/testsuite/lib/opencl.exp +++ b/gdb/testsuite/lib/opencl.exp @@ -53,18 +53,18 @@ gdb_caching_proc allow_opencl_tests {} { clean_restart "$executable" gdb_run_cmd gdb_expect 30 { - -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { - verbose -log "\n$me: OpenCL support detected" + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "\n$me: OpenCL support detected" set result 1 - } - -re ".*$inferior_exited_re with code.*${gdb_prompt} $" { - verbose -log "\n$me: OpenCL support not detected" + } + -re ".*$inferior_exited_re with code.*${gdb_prompt} $" { + verbose -log "\n$me: OpenCL support not detected" set result 0 - } - default { - verbose -log "\n$me OpenCL support not detected (default case)" + } + default { + verbose -log "\n$me OpenCL support not detected (default case)" set result 0 - } + } } gdb_exit remote_file build delete $executable diff --git a/gdb/testsuite/lib/opencl_hostapp.c b/gdb/testsuite/lib/opencl_hostapp.c index c39995f25da..4d156e9edf3 100644 --- a/gdb/testsuite/lib/opencl_hostapp.c +++ b/gdb/testsuite/lib/opencl_hostapp.c @@ -121,8 +121,8 @@ main () CHK (clGetProgramBuildInfo (program, device, CL_PROGRAM_BUILD_LOG, len, clbuild_log, NULL)); fprintf (stderr, "clBuildProgram failed with:\n%s\n", clbuild_log); - free (clbuild_log); - } + free (clbuild_log); + } exit (EXIT_FAILURE); } diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp index 09af7bd48bf..5962db5218a 100644 --- a/gdb/testsuite/lib/pascal.exp +++ b/gdb/testsuite/lib/pascal.exp @@ -60,7 +60,7 @@ proc pascal_init {} { } elseif { [which $gpc_compiler] != 0 } { set pascal_compiler_is_gpc 1 verbose -log "GNU Pascal compiler found" - } elseif { [which $fpc_compiler] != 0 } { + } elseif { [which $fpc_compiler] != 0 } { set pascal_compiler_is_fpc 1 verbose -log "Free Pascal compiler found" } @@ -158,17 +158,17 @@ proc gdb_compile_pascal {source destfile type options} { file delete $destfile if { $pascal_compiler_is_fpc == 1 } { - set result [fpc_compile $source $destfile $type $options] + set result [fpc_compile $source $destfile $type $options] } elseif { $pascal_compiler_is_gpc == 1 } { - set result [gpc_compile $source $destfile $type $options] + set result [gpc_compile $source $destfile $type $options] } else { unsupported "no pascal compiler found" return "No pascal compiler. Compilation failed." } if {![file exists $destfile]} { - unsupported "Pascal compilation failed: $result" - return "Pascal compilation failed." + unsupported "Pascal compilation failed: $result" + return "Pascal compilation failed." } } diff --git a/gdb/testsuite/lib/pdtrace.in b/gdb/testsuite/lib/pdtrace.in index a629ff64bba..9e0e689d358 100755 --- a/gdb/testsuite/lib/pdtrace.in +++ b/gdb/testsuite/lib/pdtrace.in @@ -224,7 +224,7 @@ f_collect_probes() offset=$((offset + 3)) fi fi - + # Determine the base address of the probe and its # corresponding function name. funcs=$($NM -td $objfile | $EGREP "^[0-9]+ T " \ @@ -295,22 +295,22 @@ f_collect_probes_args() # described in the d-script file and they don't receive any # argument. test "$type" = "p" || continue - + # Names are mangled in d-script files to make it possible to # have underscore characters as part of the provider name and # probe name. m_provider=$(printf %s $provider | $SED -e 's/_/__/g') m_name=$(printf %s $name | $SED -e 's/_/__/g') - + # Ignore this probe if the d-script file does not describe its # provider. $EGREP -q "provider +$m_provider" $dscript || continue - + # Look for the line containing the description of the probe. # If we can't find it then ignore this probe. line=$($EGREP "^ *probe +$m_name *\(.*\);" $dscript) test -n "$line" || continue - + # Ok, extract the argument types from the probe prototype. # This is fragile as hell as it requires the prototype to be # in a single line. @@ -397,9 +397,9 @@ f_gen_dof_sect_header() # probes, base_probes, providers, probes_args, BCOUNT f_gen_dof_program() -{ +{ ###### Variables used to cache information needed later. - + # Number of section headers in the generated DOF program. dof_secnum=0 # Offset of section headers in the generated DOF program, in bytes. @@ -409,7 +409,7 @@ f_gen_dof_program() strtab_size=0 offtab_size=0 eofftab_size=0 - + # Offsets of the STRTAB, OFFTAB EOFFTAB and PROBES sections in the # generated DOF program. In bytes. strtab_offset=0 @@ -417,7 +417,7 @@ f_gen_dof_program() eofftab_offset=0 argtab_offset=0 probes_offset=0 - + # Indexes of the section headers of the STRTAB, OFFTAB, EOFFTAB and # PROBES sections in the sections array. strtab_sect_index=0 @@ -430,7 +430,7 @@ f_gen_dof_program() # Lines: PROVIDER(S) NAME(S) BASE(D) (DOF_OFFSET(D)|DOF_EOFFSET(D)) probes_dof_offsets= probes_dof_eoffsets= - + # Offsets in the STRTAB section for the first type of base probes. # Record per line: PROVIDER(S) NAME(S) BASE(D) OFFSET(D) probes_dof_types= @@ -443,13 +443,13 @@ f_gen_dof_program() # Offsets of the base-probe names in the provider's STRTAB section. # Lines: PROVIDER(S) NAME(S) BASE(D) OFFSET(D) probes_dof_names= - + # Offsets of the provider sections in the DOF program. # Lines: PROVIDER(S) OFFSET(D) providers_offsets= ###### Generation phase. - + # The header of the DOF program contains a `struct # dtrace_dof_hdr'. Record its size, but it is written at the end # of the function. @@ -497,7 +497,7 @@ f_gen_dof_program() arg=$(printf %s "$args" | $CUT -d: -f$(($n + 3))) f_gen_asm ".asciz \"${arg}\"" off=$(($off + ${#arg} + 1)) - done + done done <