diff options
114 files changed, 870 insertions, 754 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1831880..06217f9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,121 @@ 2013-06-07 Pedro Alves <palves@redhat.com> + * boards/native-extended-gdbserver.exp: Remove semicolon. + * config/arm-ice.exp: Likewise. + * config/bfin.exp: Likewise. + * config/cygmon.exp: Likewise. + * config/h8300.exp: Likewise. + * config/monitor.exp: Likewise. + * config/sid.exp: Likewise. + * config/sim.exp: Likewise. + * config/slite.exp: Likewise. + * config/vx.exp: Likewise. + * gdb.arch/i386-bp_permanent.exp: Likewise. + * gdb.asm/asm-source.exp: Likewise. + * gdb.base/args.exp: Likewise. + * gdb.base/attach-pie-misread.exp: Likewise. + * gdb.base/auxv.exp: Likewise. + * gdb.base/bigcore.exp: Likewise. + * gdb.base/bitfields2.exp: Likewise. + * gdb.base/bitfields.exp: Likewise. + * gdb.base/break.exp: Likewise. + * gdb.base/break-interp.exp: Likewise. + * gdb.base/callfuncs.exp: Likewise. + * gdb.base/call-sc.exp: Likewise. + * gdb.base/commands.exp: Likewise. + * gdb.base/corefile.exp: Likewise. + * gdb.base/dbx.exp: Likewise. + * gdb.base/ending-run.exp: Likewise. + * gdb.base/exprs.exp: Likewise. + * gdb.base/funcargs.exp: Likewise. + * gdb.base/hbreak2.exp: Likewise. + * gdb.base/huge.exp: Likewise. + * gdb.base/list.exp: Likewise. + * gdb.base/memattr.exp: Likewise. + * gdb.base/overlays.exp: Likewise. + * gdb.base/printcmds.exp: Likewise. + * gdb.base/recurse.exp: Likewise. + * gdb.base/remotetimeout.exp: Likewise. + * gdb.base/reread.exp: Likewise. + * gdb.base/savedregs.exp: Likewise. + * gdb.base/scope.exp: Likewise. + * gdb.base/sepdebug.exp: Likewise. + * gdb.base/setshow.exp: Likewise. + * gdb.base/setvar.exp: Likewise. + * gdb.base/sigaltstack.exp: Likewise. + * gdb.base/siginfo-addr.exp: Likewise. + * gdb.base/siginfo.exp: Likewise. + * gdb.base/siginfo-obj.exp: Likewise. + * gdb.base/sigrepeat.exp: Likewise. + * gdb.base/sigstep.exp: Likewise. + * gdb.base/structs.exp: Likewise. + * gdb.base/testenv.exp: Likewise. + * gdb.base/twice.exp: Likewise. + * gdb.base/valgrind-db-attach.exp: Likewise. + * gdb.base/valgrind-infcall.exp: Likewise. + * gdb.base/varargs.exp: Likewise. + * gdb.base/watchpoint.exp: Likewise. + * gdb.cp/gdb1355.exp: Likewise. + * gdb.cp/misc.exp: Likewise. + * gdb.disasm/hppa.exp: Likewise. + * gdb.disasm/t01_mov.exp: Likewise. + * gdb.disasm/t02_mova.exp: Likewise. + * gdb.disasm/t03_add.exp: Likewise. + * gdb.disasm/t04_sub.exp: Likewise. + * gdb.disasm/t05_cmp.exp: Likewise. + * gdb.disasm/t06_ari2.exp: Likewise. + * gdb.disasm/t07_ari3.exp: Likewise. + * gdb.disasm/t08_or.exp: Likewise. + * gdb.disasm/t09_xor.exp: Likewise. + * gdb.disasm/t10_and.exp: Likewise. + * gdb.disasm/t11_logs.exp: Likewise. + * gdb.disasm/t12_bit.exp: Likewise. + * gdb.disasm/t13_otr.exp: Likewise. + * gdb.gdb/selftest.exp: Likewise. + * gdb.hp/gdb.base-hp/callfwmall.exp: Likewise. + * gdb.mi/mi-reverse.exp: Likewise. + * gdb.pascal/floats.exp: Likewise. + * gdb.python/py-inferior.exp: Likewise. + * gdb.threads/attach-into-signal.exp: Likewise. + * gdb.threads/pthreads.exp: Likewise. + * gdb.threads/thread_events.exp: Likewise. + * gdb.threads/watchthreads.exp: Likewise. + * gdb.trace/actions-changed.exp: Likewise. + * gdb.trace/actions.exp: Likewise. + * gdb.trace/ax.exp: Likewise. + * gdb.trace/backtrace.exp: Likewise. + * gdb.trace/change-loc.exp: Likewise. + * gdb.trace/deltrace.exp: Likewise. + * gdb.trace/disconnected-tracing.exp: Likewise. + * gdb.trace/ftrace.exp: Likewise. + * gdb.trace/infotrace.exp: Likewise. + * gdb.trace/passc-dyn.exp: Likewise. + * gdb.trace/passcount.exp: Likewise. + * gdb.trace/pending.exp: Likewise. + * gdb.trace/qtro.exp: Likewise. + * gdb.trace/range-stepping.exp: Likewise. + * gdb.trace/report.exp: Likewise. + * gdb.trace/save-trace.exp: Likewise. + * gdb.trace/status-stop.exp: Likewise. + * gdb.trace/strace.exp: Likewise. + * gdb.trace/tfile.exp: Likewise. + * gdb.trace/tfind.exp: Likewise. + * gdb.trace/trace-break.exp: Likewise. + * gdb.trace/tracecmd.exp: Likewise. + * gdb.trace/trace-mt.exp: Likewise. + * gdb.trace/tspeed.exp: Likewise. + * gdb.trace/tsv.exp: Likewise. + * gdb.trace/while-stepping.exp: Likewise. + * lib/gdb.exp: Likewise. + * lib/gdbserver-support.exp: Likewise. + * lib/java.exp: Likewise. + * lib/mi-support.exp: Likewise. + * lib/pascal.exp: Likewise. + * lib/prompt.exp: Likewise. + * lib/trace-support.exp: Likewise. + +2013-06-07 Pedro Alves <palves@redhat.com> + * gdb.ada/info_types.c: Fix formating in copyright header. * gdb.base/break-on-linker-gcd-function.cc: Likewise. * gdb.base/float.c: Likewise. diff --git a/gdb/testsuite/boards/native-extended-gdbserver.exp b/gdb/testsuite/boards/native-extended-gdbserver.exp index f14cdd9..bf363c7 100644 --- a/gdb/testsuite/boards/native-extended-gdbserver.exp +++ b/gdb/testsuite/boards/native-extended-gdbserver.exp @@ -53,7 +53,7 @@ set_board_info gdb_protocol "extended-remote" # Test the copy of gdbserver in the build directory. set_board_info gdb_server_prog "../gdbserver/gdbserver" -send_user "configuring for gdbserver local testing (extended-remote)\n"; +send_user "configuring for gdbserver local testing (extended-remote)\n" # We must load this explicitly here, and rename the procedures we want # to override. If we didn't do this, given that mi-support.exp is diff --git a/gdb/testsuite/config/arm-ice.exp b/gdb/testsuite/config/arm-ice.exp index d984274..7809093 100644 --- a/gdb/testsuite/config/arm-ice.exp +++ b/gdb/testsuite/config/arm-ice.exp @@ -1 +1 @@ -load_lib "../config/monitor.exp"; +load_lib "../config/monitor.exp" diff --git a/gdb/testsuite/config/bfin.exp b/gdb/testsuite/config/bfin.exp index d984274..7809093 100644 --- a/gdb/testsuite/config/bfin.exp +++ b/gdb/testsuite/config/bfin.exp @@ -1 +1 @@ -load_lib "../config/monitor.exp"; +load_lib "../config/monitor.exp" diff --git a/gdb/testsuite/config/cygmon.exp b/gdb/testsuite/config/cygmon.exp index d984274..7809093 100644 --- a/gdb/testsuite/config/cygmon.exp +++ b/gdb/testsuite/config/cygmon.exp @@ -1 +1 @@ -load_lib "../config/monitor.exp"; +load_lib "../config/monitor.exp" diff --git a/gdb/testsuite/config/h8300.exp b/gdb/testsuite/config/h8300.exp index d984274..7809093 100644 --- a/gdb/testsuite/config/h8300.exp +++ b/gdb/testsuite/config/h8300.exp @@ -1 +1 @@ -load_lib "../config/monitor.exp"; +load_lib "../config/monitor.exp" diff --git a/gdb/testsuite/config/monitor.exp b/gdb/testsuite/config/monitor.exp index 5e229ee..c8b1676 100644 --- a/gdb/testsuite/config/monitor.exp +++ b/gdb/testsuite/config/monitor.exp @@ -28,26 +28,26 @@ proc gdb_target_cmd { targetname serialport } { send_gdb "target $targetname $serialport\n" gdb_expect 60 { -re "A program is being debugged already.*ill it.*y or n. $" { - send_gdb "y\n"; - exp_continue; + send_gdb "y\n" + exp_continue } -re "Couldn't establish connection to remote.*$gdb_prompt" { - verbose "Connection failed"; + verbose "Connection failed" } -re "Remote MIPS debugging.*$gdb_prompt" { - verbose "Set target to $targetname"; + verbose "Set target to $targetname" return 0 } -re "Remote debugging using .*$serialport.*$gdb_prompt" { - verbose "Set target to $targetname"; + verbose "Set target to $targetname" return 0 } -re "Remote target $targetname connected to.*$gdb_prompt" { - verbose "Set target to $targetname"; + verbose "Set target to $targetname" return 0 } -re "Connected to.*$gdb_prompt" { - verbose "Set target to $targetname"; + verbose "Set target to $targetname" return 0 } -re "Ending remote.*$gdb_prompt" { } @@ -57,10 +57,10 @@ proc gdb_target_cmd { targetname serialport } { continue } -re "Timeout reading from remote system.*$gdb_prompt" { - verbose "Got timeout error from gdb."; + verbose "Got timeout error from gdb." } timeout { - send_gdb ""; + send_gdb "" break } } @@ -82,7 +82,7 @@ proc gdb_target_monitor { exec_file } { if [target_info exists gdb_protocol] { set targetname "[target_info gdb_protocol]" } else { - perror "No protocol specified for [target_info name]."; + perror "No protocol specified for [target_info name]." return -1 } if [target_info exists baud] { @@ -98,7 +98,7 @@ proc gdb_target_monitor { exec_file } { gdb_test "set remote Z-packet disable" "" } if [target_info exists gdb_serial] { - set serialport "[target_info gdb_serial]"; + set serialport "[target_info gdb_serial]" } elseif [target_info exists netport] { set serialport "[target_info netport]" } else { @@ -110,14 +110,14 @@ proc gdb_target_monitor { exec_file } { if ![gdb_target_cmd $targetname $serialport] { return 0 } - gdb_target_exec; + gdb_target_exec if { $j == 1 && ![reboot_target] } { - break; + break } } - perror "Couldn't set target for $targetname, port is $serialport."; + perror "Couldn't set target for $targetname, port is $serialport." return -1 } @@ -136,44 +136,44 @@ proc gdb_load { arg } { global GDB global gdb_prompt global timeout - global last_gdb_file; + global last_gdb_file if { $arg == "" } { if [info exists last_gdb_file] { - set arg $last_gdb_file; + set arg $last_gdb_file } else { - send_gdb "info files\n"; + send_gdb "info files\n" gdb_expect 30 { -re "Symbols from \"(\[^\"\]+)\"" { - set arg $expect_out(1,string); - exp_continue; + set arg $expect_out(1,string) + exp_continue } -re "Local exec file:\[\r\n\]+\[ \t\]*`(\[^'\]+)'," { - set arg $expect_out(1,string); - exp_continue; + set arg $expect_out(1,string) + exp_continue } -re "$gdb_prompt $" { } } } } - set last_gdb_file $arg; + set last_gdb_file $arg for { set j 1 } { $j <= 2 } {incr j } { if [target_info exists gdb,use_standard_load] { - gdb_target_exec; + gdb_target_exec if ![target_info exists gdb,no_push_conn] { - remote_push_conn host; + remote_push_conn host } - set state [remote_ld target $arg]; + set state [remote_ld target $arg] if ![target_info exists gdb,no_push_conn] { - remote_close target; - remote_pop_conn host; + remote_close target + remote_pop_conn host } if { $state == "pass" } { if [gdb_target_monitor $arg] { return -1 } gdb_test "list main" ".*" "" - verbose "Loaded $arg into $GDB\n"; + verbose "Loaded $arg into $GDB\n" return 0 } } else { @@ -182,32 +182,32 @@ proc gdb_load { arg } { if [is_remote host] { # FIXME: Multiple downloads. bleah. - set farg [remote_download host $arg]; + set farg [remote_download host $arg] } else { - set farg $arg; + set farg $arg } if { $arg != "" && [target_info exists gdb_sect_offset] } { - set textoff [target_info gdb_sect_offset]; - send_gdb "sect .text $textoff\n"; + set textoff [target_info gdb_sect_offset] + send_gdb "sect .text $textoff\n" gdb_expect 30 { -re "(0x\[0-9a-z]+) - 0x\[0-9a-z\]+ is \\.data" { - set dataoff $expect_out(1,string); - exp_continue; + set dataoff $expect_out(1,string) + exp_continue } -re "(0x\[0-9a-z\]+) - 0x\[0-9a-z\]+ is \\.bss" { - set bssoff $expect_out(1,string); - exp_continue; + set bssoff $expect_out(1,string) + exp_continue } -re "$gdb_prompt" { } } - set dataoff [format 0x%x [expr $dataoff + $textoff]]; - set bssoff [format 0x%x [expr $bssoff + $textoff]]; - send_gdb "sect .data $dataoff\n"; + set dataoff [format 0x%x [expr $dataoff + $textoff]] + set bssoff [format 0x%x [expr $bssoff + $textoff]] + send_gdb "sect .data $dataoff\n" gdb_expect 30 { -re "$gdb_prompt" { } } - send_gdb "sect .bss $bssoff\n"; + send_gdb "sect .bss $bssoff\n" gdb_expect 30 { -re "$gdb_prompt" { } } @@ -215,9 +215,9 @@ proc gdb_load { arg } { verbose "Loading $farg" if [target_info exists gdb_load_offset] { - set command "load $farg [target_info gdb_load_offset]\n"; + set command "load $farg [target_info gdb_load_offset]\n" } else { - set command "load $farg\n"; + set command "load $farg\n" } if [target_info exists gdb_load_timeout] { set loadtimeout [target_info gdb_load_timeout] @@ -231,10 +231,10 @@ proc gdb_load { arg } { } set load_ok 0 - send_gdb $command; + send_gdb $command gdb_expect $loadtimeout { -re "\[Ff\]ailed.*$gdb_prompt $" { - verbose "load failed"; + verbose "load failed" } -re "Timeout reading from remote.*$gdb_prompt" { } @@ -259,14 +259,14 @@ proc gdb_load { arg } { } # Make sure we don't have an open connection to the target. - gdb_target_exec; + gdb_target_exec if { $j == 1 } { if { ![reboot_target] } { - break; + break } } } - perror "Couldn't load file into GDB."; + perror "Couldn't load file into GDB." return -1 } diff --git a/gdb/testsuite/config/sid.exp b/gdb/testsuite/config/sid.exp index cc04568..83f8534 100644 --- a/gdb/testsuite/config/sid.exp +++ b/gdb/testsuite/config/sid.exp @@ -96,7 +96,7 @@ proc sid_start {} { sleep 4 if ![target_info exists gdb,no_push_conn] { - remote_push_conn host; + remote_push_conn host } } @@ -111,8 +111,8 @@ proc gdb_start {} { proc sid_exit {} { if ![target_info exists gdb,no_push_conn] { - remote_close host; - remote_pop_conn host; + remote_close host + remote_pop_conn host } } @@ -190,25 +190,25 @@ proc gdb_load { arg } { if $verbose>1 then { perror "Error during download." } - set retval -1; + set retval -1 } -re ".*$gdb_prompt $" { if $verbose>1 then { send_user "Loaded $arg into $GDB\n" } - set retval 0; + set retval 0 } -re "$gdb_prompt $" { if $verbose>1 then { perror "GDB couldn't load." } - set retval -1; + set retval -1 } timeout { if $verbose>1 then { perror "Timed out trying to load $arg." } - set retval -1; + set retval -1 } } set timeout $prev_timeout diff --git a/gdb/testsuite/config/sim.exp b/gdb/testsuite/config/sim.exp index 8a12d92..8123a08 100644 --- a/gdb/testsuite/config/sim.exp +++ b/gdb/testsuite/config/sim.exp @@ -23,7 +23,7 @@ load_lib gdb.exp proc gdb_target_sim { } { global gdb_prompt - set target_sim_options "[board_info target gdb,target_sim_options]"; + set target_sim_options "[board_info target gdb,target_sim_options]" send_gdb "target sim $target_sim_options\n" set timeout 60 diff --git a/gdb/testsuite/config/slite.exp b/gdb/testsuite/config/slite.exp index fefd799..2270b81 100644 --- a/gdb/testsuite/config/slite.exp +++ b/gdb/testsuite/config/slite.exp @@ -49,37 +49,37 @@ proc gdb_load { arg } { gdb_file_cmd $arg if [target_info exists gdb_protocol] { - set protocol [target_info gdb_protocol]; + set protocol [target_info gdb_protocol] } else { set protocol "sparclite" } if [target_info exists serial] { - set targetname [target_info serial]; - set command "target $protocol [target_info serial]\n"; + set targetname [target_info serial] + set command "target $protocol [target_info serial]\n" } else { if ![target_info exists netport] { - perror "Need either netport or gdb_serial entry for [target_info name]."; + perror "Need either netport or gdb_serial entry for [target_info name]." return -1 } - set targetname [target_info netport]; - set command "target $protocol udp [target_info netport]\n"; + set targetname [target_info netport] + set command "target $protocol udp [target_info netport]\n" } set timeout 60 verbose "Timeout is now $timeout seconds" 2 - set try_count 0; - send_gdb $command; + set try_count 0 + send_gdb $command gdb_expect { -re "Unknown response.*resetting the board.|remote timeout" { - incr try_count; + incr try_count if { $try_count > 3 } { - set try_count 0; - reboot_target; - sleep 5; + set try_count 0 + reboot_target + sleep 5 } - sleep 1; - send_gdb $command; - exp_continue; + sleep 1 + send_gdb $command + exp_continue } -re "Remote target.*$gdb_prompt $" { } -re ".*SPARClite appears to be alive.*$gdb_prompt $" { @@ -96,13 +96,13 @@ proc gdb_load { arg } { } if [target_info exists gdb_load_offset] { - set offset "[target_info gdb_load_offset]"; + set offset "[target_info gdb_load_offset]" } else { - set offset ""; + set offset "" } if { 1 } { if [is_remote host] { - set arg [remote_download host $arg]; + set arg [remote_download host $arg] if { $arg == "" } { error "download failed" return -1 @@ -135,30 +135,30 @@ proc gdb_load { arg } { if [target_info exists need_monitor_run] { set timeout 10 verbose "Timeout is now $timeout seconds, doing monitor run" 2 - send_gdb "monitor run\n"; - sleep 2; - send_gdb ""; + send_gdb "monitor run\n" + sleep 2 + send_gdb "" gdb_expect { -re ".*$gdb_prompt $" { verbose "Run command succeded" } default { - perror "error sending monitor run command"; + perror "error sending monitor run command" } } } else { - sleep 2; + sleep 2 } if [target_info exists gdb_serial] { - set serial [target_info gdb_serial]; + set serial [target_info gdb_serial] } else { - set serial [target_info serial]; + set serial [target_info serial] } send_gdb "target remote $serial\n" set timeout 60 verbose "Timeout is now $timeout seconds" 2 gdb_expect { -re ".*Kill it?.*y or n.*" { - send_gdb "y\n"; + send_gdb "y\n" exp_continue } -re ".*$gdb_prompt $" { diff --git a/gdb/testsuite/config/vx.exp b/gdb/testsuite/config/vx.exp index 1cf7df2..df822e2 100644 --- a/gdb/testsuite/config/vx.exp +++ b/gdb/testsuite/config/vx.exp @@ -66,7 +66,7 @@ proc gdb_start { } { set timeout 10 verbose "Timeout is now $timeout seconds" 2 - set state [spawn_vxgdb]; + set state [spawn_vxgdb] if { $state == "pass" } { return 0 } @@ -74,7 +74,7 @@ proc gdb_start { } { return -1 } } - remote_reboot target; + remote_reboot target } } @@ -96,7 +96,7 @@ proc spawn_vxgdb { } { gdb_expect { -re "Done\..*$gdb_prompt $" { verbose "Set target to [target_info hostname]" 1 - set timeout 10; + set timeout 10 return "pass" } -re "net_connect: RPC: (Program not registered|.*Timed out).*$" { @@ -110,7 +110,7 @@ proc spawn_vxgdb { } { } proc gdb_exit { } { - remote_close target; + remote_close target catch default_gdb_exit } diff --git a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp index be63ed1..491a692 100644 --- a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp +++ b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp @@ -55,10 +55,10 @@ set function standard set retcode [gdb_test_multiple "disassemble $function" "Disassemble function '$function'" { -re ".*($hex) <\\+0>.*($hex) <\\+4>.*($hex) <\\+5>.*($hex) <\\+6>.*$gdb_prompt $" { - set function_start $expect_out(1,string); - set address $expect_out(2,string); - set address1 $expect_out(3,string); - set address2 $expect_out(4,string); + set function_start $expect_out(1,string) + set address $expect_out(2,string) + set address1 $expect_out(3,string) + set address2 $expect_out(4,string) } }] @@ -81,7 +81,7 @@ gdb_test "continue" "Breakpoint .*, $function_start in $function.*" \ set start_esp 0 gdb_test_multiple "print \$esp" "Fetch esp value." { -re "\\\$1.*($hex).*$gdb_prompt $" { - set start_esp $expect_out(1,string); + set start_esp $expect_out(1,string) } } diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index 3fd51ac..5168452 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -194,7 +194,7 @@ if [board_info $dest exists multilib_flags] { if { "${multilib_flags}" != "" } { untested asm-source.exp return -1 - return; + return } } diff --git a/gdb/testsuite/gdb.base/args.exp b/gdb/testsuite/gdb.base/args.exp index d4aed67..5ba9393 100644 --- a/gdb/testsuite/gdb.base/args.exp +++ b/gdb/testsuite/gdb.base/args.exp @@ -20,7 +20,7 @@ global GDBFLAGS # Skip test if target does not support argument passing. if [target_info exists noargs] { - return; + return } set testfile "args" diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp index 2d5f326..0640a63 100644 --- a/gdb/testsuite/gdb.base/attach-pie-misread.exp +++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp @@ -128,7 +128,7 @@ if {$first_offset == 0} { set test "start inferior" gdb_exit -set res [remote_spawn host $binfile]; +set res [remote_spawn host $binfile] if { $res < 0 || $res == "" } { perror "Spawning $binfile failed." fail $test diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp index ccf494e..b1d0662 100644 --- a/gdb/testsuite/gdb.base/auxv.exp +++ b/gdb/testsuite/gdb.base/auxv.exp @@ -61,7 +61,7 @@ if {$core_works} { } if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } set print_core_line [gdb_get_line_number "ABORT;"] gdb_test "tbreak $print_core_line" diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp index 6c4a93f..5cc0144 100644 --- a/gdb/testsuite/gdb.base/bigcore.exp +++ b/gdb/testsuite/gdb.base/bigcore.exp @@ -66,7 +66,7 @@ gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set width 0" if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } set print_core_line [gdb_get_line_number "Dump core"] gdb_test "tbreak $print_core_line" diff --git a/gdb/testsuite/gdb.base/bitfields.exp b/gdb/testsuite/gdb.base/bitfields.exp index 82f7b10..a5b85ea 100644 --- a/gdb/testsuite/gdb.base/bitfields.exp +++ b/gdb/testsuite/gdb.base/bitfields.exp @@ -37,48 +37,48 @@ proc bitfield_uniqueness {} { global srcfile if { ! [runto break1] } { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "print flags" ".*uc = 1 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #1"] { - gdb_suppress_tests; + gdb_suppress_tests } # Note that we check for s1 as either 1 or -1, so that failure to # treat it correctly as a signed 1bit field (values 0 or -1) while # printing its value does not cause a spurious failure. We do the # signedness preservation test later. if [gdb_test "print flags" ".*uc = 0 .*, s1 = (1|-1), u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s1)"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #2"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 1, s2 = 0, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u1)"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #3"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 1, u2 = 0, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s2)"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #4"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 1, s3 = 0, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u2)"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #5"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 1, u3 = 0, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (s3)"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "cont" "Break.*break1 \\(\\) at .*$srcfile:$decimal.*" "continuing to break1 #6"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 0, s2 = 0, u2 = 0, s3 = 0, u3 = 1, s9 = 0, u9 = 0, sc = 0.*" "bitfield uniqueness (u3)"] { gdb_suppress_tests @@ -102,7 +102,7 @@ proc bitfield_uniqueness {} { gdb_suppress_tests } # Hmmmm? - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } @@ -138,7 +138,7 @@ proc bitfield_containment {} { if [gdb_test "print/x flags" "= {uc = 0x0, s1 = 0x(1|f*), u1 = 0x0, s2 = 0x(3|f*), u2 = 0x0, s3 = 0x(7|f*), u3 = 0x0, s9 = 0x(1ff|f*), u9 = 0x0, sc = 0xff}" "bitfield containment #2"] { gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # Test unsigned bitfields for unsignedness and range. @@ -160,7 +160,7 @@ proc bitfield_unsignedness {} { if [gdb_test "print flags" ".*uc = 0 .*, s1 = 0, u1 = 1, s2 = 0, u2 = 3, s3 = 0, u3 = 7, s9 = 0, u9 = 511, sc = 0.*" "unsigned bitfield ranges"] { gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -205,8 +205,8 @@ proc bitfield_signedness {} { gdb_suppress_tests } default { - fail "determining signed-ness of bitfields" ; - gdb_suppress_tests; + fail "determining signed-ness of bitfields" + gdb_suppress_tests } } @@ -222,7 +222,7 @@ proc bitfield_signedness {} { gdb_suppress_tests } # Hmmmm??? - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # Test bitfields at non-zero offsets in a struct. diff --git a/gdb/testsuite/gdb.base/bitfields2.exp b/gdb/testsuite/gdb.base/bitfields2.exp index 47dc2a7..843da17 100644 --- a/gdb/testsuite/gdb.base/bitfields2.exp +++ b/gdb/testsuite/gdb.base/bitfields2.exp @@ -78,29 +78,29 @@ proc bitfield_uniqueness {} { start_test break1 if [gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 0, s1 = 1, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.s1 = 1"] { - gdb_suppress_tests; + gdb_suppress_tests } continue_test break1 "#1" if [gdb_test "print flags" ".*u1 = 1, u2 = 0, u3 = 0, s1 = 0, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.u1 = 1"] { - gdb_suppress_tests; + gdb_suppress_tests } continue_test break1 "#2" if [gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 0, s1 = 0, s2 = 1, s3 = 0.*" "bitfield uniqueness; flags.s2 = 1"] { - gdb_suppress_tests; + gdb_suppress_tests } continue_test break1 "#3" if [gdb_test "print flags" ".*u1 = 0, u2 = 1, u3 = 0, s1 = 0, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.u2 = 1"] { - gdb_suppress_tests; + gdb_suppress_tests } continue_test break1 "#4" if [gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 0, s1 = 0, s2 = 0, s3 = 1.*" "bitfield uniqueness; flags.s3 = 1"] { - gdb_suppress_tests; + gdb_suppress_tests } continue_test break1 "#5" if [gdb_test "print flags" ".*u1 = 0, u2 = 0, u3 = 1, s1 = 0, s2 = 0, s3 = 0.*" "bitfield uniqueness; flags.u3 = 1"] { gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } @@ -129,7 +129,7 @@ proc bitfield_containment {} { if [gdb_test "print/x flags" "= {u1 = 0x0, u2 = 0x1ffffffff, u3 = 0x0, s1 = 0x(7fff|f*), s2 = 0x0, s3 = 0xf*}" "bitfield containment; flags.u2, flags.s1, flags.s2 to all 1s"] { gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # Test unsigned bitfields for unsignedness and range. @@ -147,7 +147,7 @@ proc bitfield_unsignedness {} { if [gdb_test "print flags" ".*u1 = 32767, u2 = 8589934591, u3 = 65535, s1 = 0, s2 = 0, s3 = 0.*" "maximum unsigned bitfield values"] { gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -210,7 +210,7 @@ proc bitfield_signedness {} { unsupported $test } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } @@ -276,7 +276,7 @@ proc bitfield_set {} { unsupported $test } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } gdb_start diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp index 3da3bc0..8707e3b 100644 --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -308,7 +308,7 @@ proc test_attach {file displacement {relink_args ""}} { set test "sleep function started" set command "${file} sleep" - set res [remote_spawn host $command]; + set res [remote_spawn host $command] if { $res < 0 || $res == "" } { perror "Spawning $command failed." fail $test @@ -628,7 +628,7 @@ foreach ldprelink {NO YES} { set dir ${exec}.d set relink_args [build_executable_own_libs ${test}.exp [file tail $exec] $srcfile $opts $interp $dir] if {$relink_args == ""} { - continue; + continue } if {$binsepdebug == "SEP"} { diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index 41371aa..d5ce29b 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -776,8 +776,8 @@ proc test_next_with_recursion {} { gdb_expect { -re "Break.* factorial .value=6. .*$gdb_prompt $" {} -re ".*$gdb_prompt $" { - fail "run to factorial(6)"; - gdb_suppress_tests; + fail "run to factorial(6)" + gdb_suppress_tests } timeout { fail "run to factorial(6) (timeout)" ; gdb_suppress_tests } } @@ -838,7 +838,7 @@ proc test_next_with_recursion {} { if [target_info exists gdb,noresults] { gdb_suppress_tests } gdb_continue_to_end "recursive next test" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } test_next_with_recursion diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp index 7f6afd8..e62021b 100644 --- a/gdb/testsuite/gdb.base/call-sc.exp +++ b/gdb/testsuite/gdb.base/call-sc.exp @@ -80,7 +80,7 @@ proc start_scalars_test { type } { # Advance to main if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } # Get the debug format diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index f2a742b..6e1ebab 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -63,7 +63,7 @@ proc do_function_calls {} { global gdb_prompt # We need to up this because this can be really slow on some boards. - set timeout 60; + set timeout 60 # If any of these calls segv we don't want to affect subsequent tests. # E.g., we want to ensure register values are restored. @@ -329,7 +329,7 @@ proc rerun_and_prepare {} { # the language be set to the default. if { ![runto_main] } { - gdb_suppress_tests; + gdb_suppress_tests } # However, turn off overload-resolution for aCC. Having it on causes @@ -338,7 +338,7 @@ proc rerun_and_prepare {} { gdb_test_no_output "set overload-resolution 0" } else { if { ![runto_main] } { - gdb_suppress_tests; + gdb_suppress_tests } gdb_test_no_output "set language c" } diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index 8ad5d5c..39ad3f3 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -74,7 +74,7 @@ proc progvar_simple_if_test {} { gdb_test "if value == 5\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \ "\\\$\[0-9\]* = 0xfeedface" \ "progvar_simple_if_test #2" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } proc progvar_simple_while_test {} { @@ -94,7 +94,7 @@ proc progvar_simple_while_test {} { gdb_test "while value > 0\np/x 0xfeedface\nset value -= 1\nend" \ "\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \ "progvar_simple_while_test #1" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } proc progvar_complex_if_while_test {} { @@ -115,7 +115,7 @@ proc progvar_complex_if_while_test {} { gdb_test "while value > 0\nset value -= 1\nif \(value % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend" \ "\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \ "progvar_complex_if_while_test #1" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } proc if_while_breakpoint_command_test {} { @@ -150,7 +150,7 @@ proc if_while_breakpoint_command_test {} { gdb_test "info break" \ "while.*set.*if.*p/x.*else.*p/x.*end.*" \ "info break in if_while_breakpoint_command_test" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # Test that we can run the inferior from breakpoint commands. @@ -191,7 +191,7 @@ proc infrun_breakpoint_command_test {} { "Continuing.*.*.*Breakpoint \[0-9\]*, factorial \\(value=5\\).*at.*\[0-9\]*\[ \]*if \\(value > 1\\) \{.*\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*" \ "continue in infrun_breakpoint_command_test" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } proc breakpoint_command_test {} { @@ -213,7 +213,7 @@ proc breakpoint_command_test {} { "Breakpoint \[0-9\]*, factorial.*Now the value is 5" \ "continue in breakpoint_command_test" gdb_test "print value" " = 5" "print value in breakpoint_command_test" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # Test a simple user defined command (with arguments) @@ -379,7 +379,7 @@ proc test_command_prompt_position {} { timeout { fail "(timeout) 3 commands in test_command_prompt_position" } } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp index d5996ba..054ed3e 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -84,14 +84,14 @@ expect { # See previous comments above, they are still applicable. # -close; +close if $verbose>1 then { send_user "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$corefile\n" } -eval "spawn $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$corefile"; +eval "spawn $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$corefile" expect { -re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { pass "args: execfile -core=[file tail $corefile]" @@ -108,7 +108,7 @@ expect { set timeout $oldtimeout verbose "Timeout is now $timeout seconds" 2 -close; +close # Now restart normally. @@ -122,7 +122,7 @@ gdb_test_multiple "core-file $corefile" "core-file command" { -re ".* program is being debugged already.*y or n. $" { # gdb_load may connect us to a gdbserver. send_gdb "y\n" - exp_continue; + exp_continue } -re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { pass "core-file command" @@ -228,7 +228,7 @@ gdb_exit if ![is_remote target] { set test "attach: spawn sleep" - set res [remote_spawn host "$binfile sleep"]; + set res [remote_spawn host "$binfile sleep"] if { $res < 0 || $res == "" } { fail $test return diff --git a/gdb/testsuite/gdb.base/dbx.exp b/gdb/testsuite/gdb.base/dbx.exp index 48cf9b3..31bda5d 100644 --- a/gdb/testsuite/gdb.base/dbx.exp +++ b/gdb/testsuite/gdb.base/dbx.exp @@ -181,7 +181,7 @@ proc gdb_file_cmd {arg} { set last_loaded_file $arg if [is_remote host] { - set arg [remote_download host $arg]; + set arg [remote_download host $arg] if { $arg == "" } { error "download failed" return -1 diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp index 73d08f0..ec155da 100644 --- a/gdb/testsuite/gdb.base/ending-run.exp +++ b/gdb/testsuite/gdb.base/ending-run.exp @@ -209,7 +209,7 @@ set program_not_exited 0 set program_in_exit 0 if {!$use_gdb_stub && (! [target_info exists use_cygmon] || ! [target_info use_cygmon])} { - global program_exited; + global program_exited if {[eval expr $program_exited == 0]} { gdb_test_multiple "n" "step to end of run" { -re "$inferior_exited_re normally.*$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp index d2e23c9..8ef42a4 100644 --- a/gdb/testsuite/gdb.base/exprs.exp +++ b/gdb/testsuite/gdb.base/exprs.exp @@ -49,17 +49,17 @@ proc test_expr { args } { if { [llength $args] % 2 } { warning "an even # of arguments should be passed to test_expr" } - set last_ent [expr [llength $args] - 1]; - set testname [lindex $args $last_ent]; + set last_ent [expr [llength $args] - 1] + set testname [lindex $args $last_ent] if [gdb_test [lindex $args 0] ".*" "$testname (setup)"] { - gdb_suppress_tests; + gdb_suppress_tests } for {set x 1} {$x < $last_ent} {set x [expr $x + 2]} { if [gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])"] { - gdb_suppress_tests; + gdb_suppress_tests } } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # # test expressions with "char" types diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp index 45f2c4f..2b89d14 100644 --- a/gdb/testsuite/gdb.base/funcargs.exp +++ b/gdb/testsuite/gdb.base/funcargs.exp @@ -73,24 +73,24 @@ proc integral_args {} { # Continue; should stop at call0b and print actual arguments. if [gdb_test "cont" ".* call0b \\(s=1, i=2, l=3, c=97 'a'\\) .*" "continue to call0b"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call0c and print actual arguments. if [gdb_test "cont" ".* call0c \\(i=2, l=3, c=97 'a', s=1\\) .*" "continue to call0c"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call0d and print actual arguments. if [gdb_test "cont" ".* call0d \\(l=3, c=97 'a', s=1, i=2\\) .*" "continue to call0d";] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call0e and print actual arguments. if [gdb_test "cont" ".* call0e \\(c1=97 'a', l=3, c2=97 'a', i=2, c3=97 'a', s=1, c4=97 'a', c5=97 'a'\\) .*" "continue to call0e" ] { - gdb_suppress_tests; + gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -104,11 +104,11 @@ proc unsigned_integral_args {} { delete_breakpoints - gdb_breakpoint call1a; - gdb_breakpoint call1b; - gdb_breakpoint call1c; - gdb_breakpoint call1d; - gdb_breakpoint call1e; + gdb_breakpoint call1a + gdb_breakpoint call1b + gdb_breakpoint call1c + gdb_breakpoint call1d + gdb_breakpoint call1e # Run; should stop at call1a and print actual arguments. if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } @@ -130,24 +130,24 @@ proc unsigned_integral_args {} { # Continue; should stop at call1b and print actual arguments. if [gdb_test "cont" ".* call1b \\(us=6, ui=7, ul=8, uc=98 'b'\\) .*" "continue to call1b"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call1c and print actual arguments. if [gdb_test "cont" ".* call1c \\(ui=7, ul=8, uc=98 'b', us=6\\) .*" "continue to call1c"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call1d and print actual arguments. if [gdb_test "cont" ".* call1d \\(ul=8, uc=98 'b', us=6, ui=7\\) .*" "continue to call1d"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call1e and print actual arguments. if [gdb_test "cont" ".* call1e \\(uc1=98 'b', ul=8, uc2=98 'b', ui=7, uc3=98 'b', us=6, uc4=98 'b', uc5=98 'b'\\) .*" "continue to call1e"] { - gdb_suppress_tests; + gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -195,37 +195,37 @@ proc float_and_integral_args {} { if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix*" } # Continue; should stop at call2b and print actual arguments. if [gdb_test "cont" ".* call2b \\(f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a'\\) .*" "continue to call2b"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call2c and print actual arguments. if [gdb_test "cont" ".* call2c \\(s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4\\) .*" "continue to call2c"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call2d and print actual arguments. if [gdb_test "cont" ".* call2d \\(d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1\\) .*" "continue to call2d"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call2e and print actual arguments. if [gdb_test "cont" ".* call2e \\(i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5\\) .*" "continue to call2e"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call2f and print actual arguments. if [gdb_test "cont" ".* call2f \\(f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2\\) .*" "continue to call2f"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call2g and print actual arguments. if [gdb_test "cont" ".* call2g \\(l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4\\) .*" "continue to call2g"] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call2h and print actual arguments. if [gdb_test "cont" ".* call2h \\(d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3\\) .*" "continue to call2h"] { - gdb_suppress_tests; + gdb_suppress_tests } # monitor only allows 8 breakpoints; w89k board allows 10, so @@ -235,9 +235,9 @@ proc float_and_integral_args {} { # Continue; should stop at call2i and print actual arguments. if [gdb_test "cont" ".* call2i \\(c1=97 'a', f1=4, c2=97 'a', c3=97 'a', d1=5, c4=97 'a', c5=97 'a', c6=97 'a', f2=4, s=1, c7=97 'a', d2=5\\) .*" "continue to call2i"] { - gdb_suppress_tests; + gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } @@ -344,7 +344,7 @@ proc pointer_args {} { # Continue; should stop at call3b and print actual arguments. # Try dereferencing the arguments. if [gdb_test "cont" ".* call3b \\(ucp=$hex <uc> \"b.*\", usp=$hex <us>, uip=$hex <ui>, ulp=$hex <ul>\\) .*" "continue to call3b"] { - gdb_suppress_tests; + gdb_suppress_tests } gdb_test "print *ucp" ".* = 98 'b'" @@ -355,14 +355,14 @@ proc pointer_args {} { # Continue; should stop at call3c and print actual arguments. # Try dereferencing the arguments. if [gdb_test "cont" ".* call3c \\(fp=$hex <f>, dp=$hex <d>\\) .*" "continue to call3c"] { - gdb_suppress_tests; + gdb_suppress_tests } gdb_test "print *fp" ".* = 4" gdb_test "print *dp" ".* = 5" # pass "locate actual args, pointer types" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -418,7 +418,7 @@ proc structs_by_reference {} { } pass "locate actual args, structs/unions passed by reference" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -486,7 +486,7 @@ proc structs_by_value {} { fail "print un (unknown case)" } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -546,7 +546,7 @@ proc discard_and_shuffle {} { "\[\r\n\]#1 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#2 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call6c and print actual arguments. @@ -560,7 +560,7 @@ proc discard_and_shuffle {} { "\[\r\n\]#2 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#3 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call6d and print actual arguments. # Print backtrace. @@ -574,7 +574,7 @@ proc discard_and_shuffle {} { "\[\r\n\]#3 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#4 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call6e and print actual arguments. @@ -590,7 +590,7 @@ proc discard_and_shuffle {} { "\[\r\n\]#4 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#5 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call6f and print actual arguments. @@ -607,7 +607,7 @@ proc discard_and_shuffle {} { "\[\r\n\]#5 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#6 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call6g and print actual arguments. @@ -625,7 +625,7 @@ proc discard_and_shuffle {} { "\[\r\n\]#6 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#7 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call6h and print actual arguments. @@ -644,7 +644,7 @@ proc discard_and_shuffle {} { "\[\r\n\]#7 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#8 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } # monitor only allows 8 breakpoints; w89k board allows 10, so @@ -671,7 +671,7 @@ proc discard_and_shuffle {} { "\[\r\n\]#8 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#9 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call6j and print actual arguments. @@ -692,7 +692,7 @@ proc discard_and_shuffle {} { "\[\r\n\]#9 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#10 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } # Continue; should stop at call6k and print actual arguments. @@ -713,9 +713,9 @@ proc discard_and_shuffle {} { "\[\r\n\]#10 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) " "\[\r\n\]#11 .* main \\(.*\\) at " } ] { - gdb_suppress_tests; + gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } @@ -921,7 +921,7 @@ proc shuffle_round_robin {} { "\[\r\n\]#10 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) " "\[\r\n\]#11 .* main \\(.*\\) at " } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -961,7 +961,7 @@ proc recursive_structs_by_value {} { } else { fail "recursive passing of structs by value (sparclet)" } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -997,7 +997,7 @@ proc localvars_after_alloca { } { gdb_test "print l" " = 3" "print l in localvars_after_alloca" gdb_test "backtrace 8" "#0.*localvars_after_alloca \\(c=97 'a', s=1, i=2, l=3\\).*#1.*main.*" "backtrace after alloca" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } proc call_after_alloca { } { @@ -1020,7 +1020,7 @@ proc call_after_alloca { } { if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } gdb_test "backtrace 8" "#0.*call_after_alloca_subr \\(c=97 'a', s=1, i=2, l=3, uc=98 'b', us=11, ui=12, ul=13\\).*#1.*call_after_alloca \\(c=97 'a', s=1, i=2, l=3\\).*#2.*main.*" "backtrace from call_after_alloca_subr" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -1082,18 +1082,18 @@ proc localvars_in_indirect_call { } { } -re ".*$gdb_prompt $" { fail "finish from indirectly called function" - gdb_suppress_tests; + gdb_suppress_tests } default { fail "finish from indirectly called function" - gdb_suppress_tests; + gdb_suppress_tests } } if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } gdb_test "step" "call0a \\(c=97 'a', s=1, i=2, l=3\\).*" \ "stepping into indirectly called function" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -1156,7 +1156,7 @@ proc test_stepping_over_trampolines { } { gdb_suppress_tests } } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # Start with a fresh gdb. diff --git a/gdb/testsuite/gdb.base/hbreak2.exp b/gdb/testsuite/gdb.base/hbreak2.exp index b709737..4cddf38 100644 --- a/gdb/testsuite/gdb.base/hbreak2.exp +++ b/gdb/testsuite/gdb.base/hbreak2.exp @@ -518,7 +518,7 @@ proc test_next_with_recursion {} { if [target_info exists gdb,noresults] { gdb_suppress_tests } gdb_continue_to_end "recursive next test" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } test_next_with_recursion diff --git a/gdb/testsuite/gdb.base/huge.exp b/gdb/testsuite/gdb.base/huge.exp index 509e3ec..f955c37 100644 --- a/gdb/testsuite/gdb.base/huge.exp +++ b/gdb/testsuite/gdb.base/huge.exp @@ -20,7 +20,7 @@ # (could be very time-consuming on remote targets with slow connection). # if [target_info exists gdb,skip_huge_test] { - return; + return } set testfile "huge" diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index 96ca198..11aafd9 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -57,18 +57,18 @@ set last_line_re "${last_line}\[ \t\]+} /\\* last line \\*/" # Return 1 if success, 0 if fail. # -set set_listsize_count 0; +set set_listsize_count 0 proc set_listsize { arg } { global gdb_prompt - global set_listsize_count; + global set_listsize_count - incr set_listsize_count; + incr set_listsize_count if [gdb_test_no_output "set listsize $arg" "setting listsize to $arg #$set_listsize_count"] { return 0 } if { $arg == 0 } { - set arg "unlimited"; + set arg "unlimited" } if [gdb_test "show listsize" "Number of source lines.* is ${arg}.*" "show listsize $arg #$set_listsize_count"] { @@ -198,7 +198,7 @@ proc test_list_filename_and_number {} { timeout { fail "list list1.c:12 (timeout)" ; gdb_suppress_tests } } pass "list filename:number ($testcnt tests)" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # @@ -258,7 +258,7 @@ proc test_list_forward {} { } pass "successive list commands to page forward ($testcnt tests)" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # Test that repeating the list linenum command doesn't print the same @@ -301,7 +301,7 @@ proc test_repeat_list_command {} { } pass "repeat list commands to page forward using 'return' ($testcnt tests)" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } proc test_list_backwards {} { @@ -338,7 +338,7 @@ proc test_list_backwards {} { } pass "$testcnt successive \"list -\" commands to page backwards" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # diff --git a/gdb/testsuite/gdb.base/memattr.exp b/gdb/testsuite/gdb.base/memattr.exp index db9c696..69f2ad4 100644 --- a/gdb/testsuite/gdb.base/memattr.exp +++ b/gdb/testsuite/gdb.base/memattr.exp @@ -458,7 +458,7 @@ proc delete_memory {} { gdb_test_multiple "delete mem" "delete mem" { -re "Delete all memory regions.*y or n.*$" { - send_gdb "y\n"; + send_gdb "y\n" exp_continue } -re "$gdb_prompt $" { } diff --git a/gdb/testsuite/gdb.base/overlays.exp b/gdb/testsuite/gdb.base/overlays.exp index 9febabf..d294378 100644 --- a/gdb/testsuite/gdb.base/overlays.exp +++ b/gdb/testsuite/gdb.base/overlays.exp @@ -23,11 +23,11 @@ set data_overlays 1 if [istarget "d10v-*-*"] then { - set linker_script "${srcdir}/${subdir}/d10v.ld"; + set linker_script "${srcdir}/${subdir}/d10v.ld" } elseif [istarget "m32r-*-*"] then { - set linker_script "${srcdir}/${subdir}/m32r.ld"; + set linker_script "${srcdir}/${subdir}/m32r.ld" } elseif [istarget "spu-*-*"] then { - set linker_script "${srcdir}/${subdir}/spu.ld"; + set linker_script "${srcdir}/${subdir}/spu.ld" set data_overlays 0 } else { verbose "Skipping overlay test -- not implemented for this target." @@ -85,7 +85,7 @@ gdb_load ${binfile} # if ![runto_main] then { - gdb_suppress_tests; + gdb_suppress_tests } # couple of convenience variables diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index e9e6146..316461a 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -426,45 +426,45 @@ proc test_print_repeats_10 {} { for { set x 1 } { $x <= 16 } { incr x } { gdb_test_no_output "set print elements $x" for { set e 1 } { $e <= 16 } {incr e } { - set v [expr $e - 1]; + set v [expr $e - 1] set command "p &ctable2\[${v}*16\]" if { $x < $e } { - set aval $x; + set aval $x } else { - set aval $e; + set aval $e } - set xval [expr $x - $e]; + set xval [expr $x - $e] if { $xval < 0 } { - set xval 0; + set xval 0 } if { $aval > 10 } { - set a "'a' <repeats $aval times>"; + set a "'a' <repeats $aval times>" if { $xval > 0 } { - set a "${a}, \\\""; + set a "${a}, \\\"" } } else { - set a "\\\"[string range "aaaaaaaaaaaaaaaa" 1 $aval]"; + set a "\\\"[string range "aaaaaaaaaaaaaaaa" 1 $aval]" if { $xval > 10 } { - set a "$a\\\", "; + set a "$a\\\", " } } - set xstr ""; + set xstr "" if { $xval > 10 } { - set xstr "'X' <repeats $xval times>"; + set xstr "'X' <repeats $xval times>" } else { if { $xval > 0 } { - set xstr "[string range "XXXXXXXXXXXXXXXX" 1 $xval]\\\""; + set xstr "[string range "XXXXXXXXXXXXXXXX" 1 $xval]\\\"" } else { if { $aval <= 10 } { - set xstr "\\\""; + set xstr "\\\"" } } } if { $aval < 16 } { set xstr "${xstr}\[.\]\[.\]\[.\]" } - set string " = \[(\]unsigned char \[*\]\[)\] <ctable2(\\+$decimal)?> ${a}${xstr}"; - gdb_test "$command" "$string" "$command with print elements set to $x"; + set string " = \[(\]unsigned char \[*\]\[)\] <ctable2(\\+$decimal)?> ${a}${xstr}" + gdb_test "$command" "$string" "$command with print elements set to $x" } } } @@ -659,7 +659,7 @@ proc test_print_string_constants {} { # We need to up this because this can be really slow on some boards. # (Test may involve inferior malloc() calls). - set timeout 60; + set timeout 60 gdb_test "p \"a string\"" " = \"a string\"" gdb_test "p \"embedded \\000 null\"" " = \"embedded \\\\000 null\"" @@ -683,7 +683,7 @@ proc test_print_array_constants {} { # We need to up this because this can be really slow on some boards. # (Test may involve inferior malloc() calls). - set timeout 60; + set timeout 60 gdb_test "print {'a','b','c'}" " = \"abc\"" gdb_test_escape_braces "print {0,1,2}" " = {0, 1, 2}" diff --git a/gdb/testsuite/gdb.base/recurse.exp b/gdb/testsuite/gdb.base/recurse.exp index c66a8ed..da635bf 100644 --- a/gdb/testsuite/gdb.base/recurse.exp +++ b/gdb/testsuite/gdb.base/recurse.exp @@ -49,7 +49,7 @@ proc recurse_tests {} { if [gdb_test "continue" \ "Continuing.*\[Ww\]atchpoint.*: b.*Old value = 0.*New value = 10.*" \ "continue to first instance watchpoint, first time"] then { - gdb_suppress_tests; + gdb_suppress_tests } # Continue inward for a few iterations @@ -75,7 +75,7 @@ proc recurse_tests {} { if [gdb_test "continue" \ "Continuing.*\[Ww\]atchpoint.*: b.*Old value = 0.*New value = 5.*"\ "continue to second instance watchpoint, first time"] then { - gdb_suppress_tests; + gdb_suppress_tests } # Continue inward for a few iterations @@ -92,14 +92,14 @@ proc recurse_tests {} { if [gdb_test "continue" \ "Continuing.*\[Ww\]atchpoint.*: b.*Old value = 5.*New value = 120.*return.*" \ "continue to second instance watchpoint, second time"] then { - gdb_suppress_tests; + gdb_suppress_tests } # Continue again. We should have a watchpoint go out of scope now if [gdb_test "continue" \ "Continuing.*\[Ww\]atchpoint.*deleted.*recurse \\(a=6\\) .*" \ "second instance watchpoint deleted when leaving scope"] then { - gdb_suppress_tests; + gdb_suppress_tests } # Continue until second set of b (first instance). @@ -138,10 +138,10 @@ proc recurse_tests {} { if [gdb_test "continue" \ "Continuing.*\[Ww\]atchpoint.*deleted.*\(main \\(\\) \|21.*\}\).*" \ "first instance watchpoint deleted when leaving scope"] then { - gdb_suppress_tests; + gdb_suppress_tests } } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # Preserve the old timeout, and set a new one that should be diff --git a/gdb/testsuite/gdb.base/remotetimeout.exp b/gdb/testsuite/gdb.base/remotetimeout.exp index bc8df9d..56bdfd6 100644 --- a/gdb/testsuite/gdb.base/remotetimeout.exp +++ b/gdb/testsuite/gdb.base/remotetimeout.exp @@ -23,7 +23,7 @@ global GDBFLAGS # Skip test if target does not support argument passing. if [target_info exists noargs] { - return; + return } # diff --git a/gdb/testsuite/gdb.base/reread.exp b/gdb/testsuite/gdb.base/reread.exp index fb5f783..b0a2fc6 100644 --- a/gdb/testsuite/gdb.base/reread.exp +++ b/gdb/testsuite/gdb.base/reread.exp @@ -65,11 +65,11 @@ gdb_run_cmd gdb_expect { -re ".*Breakpoint.* foo .* at .*$srcfile1:14.*$gdb_prompt $" { - pass "run to foo()"; + pass "run to foo()" } -re ".*$gdb_prompt $" { - fail "run to foo()"; - gdb_suppress_tests; + fail "run to foo()" + gdb_suppress_tests } timeout { fail "run to foo() (timeout)" ; gdb_suppress_tests } } @@ -88,20 +88,20 @@ gdb_touch_execfile ${binfile} # Should see "Breakpoint 1, foo () at reread2.c:9" if [is_remote target] { - unsupported "run to foo() second time "; + unsupported "run to foo() second time " } else { gdb_run_cmd gdb_expect { # -re ".*re-reading symbols.*Breakpoint.* foo .* at .*$srcfile2:9.*$gdb_prompt $" {} -re ".*Breakpoint.* foo .* at .*:9.*$gdb_prompt $" { - pass "run to foo() second time "; + pass "run to foo() second time " } -re ".*$gdb_prompt $" { - fail "run to foo() second time"; - gdb_suppress_tests; + fail "run to foo() second time" + gdb_suppress_tests } timeout { - fail "run to foo() second time (timeout)" ; + fail "run to foo() second time (timeout)" gdb_suppress_tests } } @@ -131,11 +131,11 @@ if [is_remote target] { gdb_run_cmd gdb_expect { -re ".*Breakpoint.* foo .* at .*$srcfile1:14.*$gdb_prompt $" { - pass "second pass: run to foo()"; + pass "second pass: run to foo()" } -re ".*$gdb_prompt $" { - fail "second pass: run to foo()"; - gdb_suppress_tests; + fail "second pass: run to foo()" + gdb_suppress_tests } timeout { fail "second pass: run to foo() (timeout)" @@ -155,14 +155,14 @@ if [is_remote target] { gdb_run_cmd gdb_expect { -re ".*Breakpoint.* foo .* at .*:9.*$gdb_prompt $" { - pass "second pass: run to foo() second time "; + pass "second pass: run to foo() second time " } -re ".*$gdb_prompt $" { - fail "second pass: run to foo() second time"; - gdb_suppress_tests; + fail "second pass: run to foo() second time" + gdb_suppress_tests } timeout { - fail "second pass: run to foo() second time (timeout)" ; + fail "second pass: run to foo() second time (timeout)" gdb_suppress_tests } } diff --git a/gdb/testsuite/gdb.base/savedregs.exp b/gdb/testsuite/gdb.base/savedregs.exp index 24af4c5..1548d0a 100644 --- a/gdb/testsuite/gdb.base/savedregs.exp +++ b/gdb/testsuite/gdb.base/savedregs.exp @@ -46,7 +46,7 @@ gdb_load ${binfile} # Advance to main if { ![runto_main] } { - gdb_suppress_tests; + gdb_suppress_tests } proc process_saved_regs { current inner outer } { diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp index 0eba5e8..fbcc31b 100644 --- a/gdb/testsuite/gdb.base/scope.exp +++ b/gdb/testsuite/gdb.base/scope.exp @@ -63,24 +63,24 @@ proc test_at_main {} { # Print scope0.c::filelocal, which is 1 if [gdb_test "print filelocal" "\\\$$decimal = 1" "print filelocal" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at main" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope0.c::filelocal_bss, which is 101 if [gdb_test "print filelocal_bss" "\\\$$decimal = 101" "print filelocal_bss" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_main" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] { - gdb_suppress_tests ; + gdb_suppress_tests } @@ -89,13 +89,13 @@ proc test_at_main {} { # No clue why the rs6000 fails this test. if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print filelocal_ro" "\\\$$decimal = 201" "print filelocal_ro in test_at_main" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] { - gdb_suppress_tests ; + gdb_suppress_tests } @@ -103,7 +103,7 @@ proc test_at_main {} { if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } @@ -111,7 +111,7 @@ proc test_at_main {} { if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] { - gdb_suppress_tests ; + gdb_suppress_tests } @@ -120,48 +120,48 @@ proc test_at_main {} { if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs} if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::foo::funclocal, which is 3 if [gdb_test "print foo::funclocal" "\\\$$decimal = 3" "print foo::funclocal" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::foo::funclocal_ro, which is 203 if [gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" "print foo::funclocal_ro" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::bar::funclocal, which is 4 if [gdb_test "print bar::funclocal" "\\\$$decimal = 4" "print bar::funclocal" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } @@ -173,21 +173,21 @@ proc test_at_foo {} { global subdir if [gdb_test "next" ".*bar \\(\\);" "" ] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope0.c::filelocal, which is 1 if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at foo" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope0.c::filelocal_bss, which is 101 if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_foo" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] { - gdb_suppress_tests ; + gdb_suppress_tests } @@ -195,7 +195,7 @@ proc test_at_foo {} { if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] { - gdb_suppress_tests ; + gdb_suppress_tests } @@ -205,7 +205,7 @@ proc test_at_foo {} { if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } @@ -265,7 +265,7 @@ proc test_at_foo {} { if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at foo" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } @@ -277,21 +277,21 @@ proc test_at_bar {} { global subdir if [gdb_test "next" ".*" "" ] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope0.c::filelocal, which is 1 if [gdb_test "print 'scope0.c'::filelocal" "\\\$$decimal = 1" "print 'scope0.c'::filelocal at bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope0.c::filelocal_bss, which is 101 if [gdb_test "print 'scope0.c'::filelocal_bss" "\\\$$decimal = 101" "print 'scope0.c'::filelocal_bss in test_at_bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_bss"] { - gdb_suppress_tests ; + gdb_suppress_tests } @@ -299,123 +299,123 @@ proc test_at_bar {} { if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope0.c'::filelocal_ro" "\\\$$decimal = 201" "print 'scope0.c'::filelocal_ro at bar" "No symbol \"scope0.c\" in current context.*" "print '$srcdir/$subdir/scope0.c'::filelocal_ro"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::filelocal, which is 2 if [gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::filelocal_bss, which is 102 if [gdb_test "print filelocal_bss" "\\\$$decimal = 102" "print filelocal_bss at bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::filelocal_ro, which is 202 if [gdb_test "print filelocal_ro" "\\\$$decimal = 202" "print filelocal_ro in test_at_bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::filelocal_ro" "\\\$$decimal = 202" "print 'scope1.c'::filelocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_ro"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::foo::funclocal, which is 3 if [gdb_test "print foo::funclocal" "\\\$$decimal = 3" "print foo::funclocal at bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::foo::funclocal" "\\\$$decimal = 3" "print 'scope1.c'::foo::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::foo::funclocal_bss, which is 103 if [gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" "print foo::funclocal_bss at bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::foo::funclocal_bss" "\\\$$decimal = 103" "print 'scope1.c'::foo::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::foo::funclocal_ro, which is 203 if [gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" "print foo::funclocal_ro at bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::foo::funclocal_ro" "\\\$$decimal = 203" "print 'scope1.c'::foo::funclocal_ro at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::bar::funclocal, which is 4 if [gdb_test "print funclocal" "\\\$$decimal = 4" "print funclocal at bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if [gdb_test "print bar::funclocal" "\\\$$decimal = 4" "print bar::funclocal at bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::bar::funclocal" "\\\$$decimal = 4" "print 'scope1.c'::bar::funclocal at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal"] { - gdb_suppress_tests ; + gdb_suppress_tests } # Print scope1.c::bar::funclocal_bss, which is 104 if [gdb_test "print funclocal_bss" "\\\$$decimal = 104" "print funclocal_bss at bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if [gdb_test "print bar::funclocal_bss" "\\\$$decimal = 104" "print bar::funclocal_bss at bar" ] { - gdb_suppress_tests ; + gdb_suppress_tests } if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" } if [gdb_test "print 'scope1.c'::bar::funclocal_bss" "\\\$$decimal = 104" "print 'scope1.c'::bar::funclocal_bss at bar" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::bar::funclocal_bss"] { - gdb_suppress_tests ; + gdb_suppress_tests } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } @@ -433,17 +433,17 @@ proc test_at_autovars {} { gdb_breakpoint marker1 if [gdb_test "cont" "Break.* marker1 \\(\\) at .*:$decimal.*" "continue to marker1"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "up" ".*autovars.*" "up from marker1 in scope.exp" ] { - gdb_suppress_tests ; + gdb_suppress_tests } set count 0 while {$count < 100} { if [gdb_test "print i$count" ".* = $count" "" ] { - gdb_suppress_tests ; + gdb_suppress_tests } set count [expr $count+1] @@ -466,10 +466,10 @@ proc test_at_localscopes {} { gdb_breakpoint marker4 if [gdb_test "cont" "Break.* marker2 \\(\\) at .*:$decimal.*" "continue to marker2"] { - gdb_suppress_tests; + gdb_suppress_tests } if [gdb_test "up" ".*localscopes.*" "up from marker2 in scopes.exp" ] { - gdb_suppress_tests ; + gdb_suppress_tests } # Should be at first (outermost) scope. Check values. @@ -508,7 +508,7 @@ proc test_at_localscopes {} { gdb_test "print localval1" " = 11" "print localval1, innermost scope" gdb_test "print localval2" " = 12" "print localval2, innermost scope" gdb_test "print localval3" " = 13" "print localval3, innermost scope" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } # Start with a fresh gdb. diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index 1e63835..9e956c7 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -578,8 +578,8 @@ proc test_next_with_recursion {} { gdb_expect { -re "Break.* factorial .value=6. .*$gdb_prompt $" {} -re ".*$gdb_prompt $" { - fail "run to factorial(6)"; - gdb_suppress_tests; + fail "run to factorial(6)" + gdb_suppress_tests } timeout { fail "run to factorial(6) (timeout)" ; gdb_suppress_tests } } @@ -640,7 +640,7 @@ proc test_next_with_recursion {} { if [target_info exists gdb,noresults] { gdb_suppress_tests } gdb_continue_to_end "recursive next test" - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } test_next_with_recursion diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp index 6d250c0..e172fc7 100644 --- a/gdb/testsuite/gdb.base/setshow.exp +++ b/gdb/testsuite/gdb.base/setshow.exp @@ -33,7 +33,7 @@ gdb_load ${binfile} # make sure $pc is sane, in case we're talking to a board. if { ![runto_main] } { - gdb_suppress_tests; + gdb_suppress_tests } # diff --git a/gdb/testsuite/gdb.base/setvar.exp b/gdb/testsuite/gdb.base/setvar.exp index a4d5764..1c58300 100644 --- a/gdb/testsuite/gdb.base/setvar.exp +++ b/gdb/testsuite/gdb.base/setvar.exp @@ -70,31 +70,31 @@ gdb_test_multiple "print sizeof (unsigned long)" "sizeof ulong" { proc test_set { args } { global gdb_prompt - set length [expr [llength $args] - 1]; - set message "[lindex $args $length]"; - set final [expr $length - 2]; - set count 1; + set length [expr [llength $args] - 1] + set message "[lindex $args $length]" + set final [expr $length - 2] + set count 1 # Set up the variables. for {set x 0} {$x < $length} {incr x} { if { "[lindex $args $x]" != "" } { - set arg [lindex $args $x]; + set arg [lindex $args $x] if { ($x == $final) || ([string first ".*" [lindex $args [expr $x + 1]]] >= 0) } { - set match [lindex $args [expr $x + 1]]; + set match [lindex $args [expr $x + 1]] if { $count == 1 } { set mess "$message" } else { - set mess "$message (#$count)"; + set mess "$message (#$count)" } - incr count; - incr x; + incr count + incr x } else { - set mess ""; + set mess "" set match "" } verbose "doing $arg $match" if [gdb_test "$arg" "$match" "$mess"] { - fail "$message -- $match"; + fail "$message -- $match" return 1 } } diff --git a/gdb/testsuite/gdb.base/sigaltstack.exp b/gdb/testsuite/gdb.base/sigaltstack.exp index 62e075c..4fc5ac8 100644 --- a/gdb/testsuite/gdb.base/sigaltstack.exp +++ b/gdb/testsuite/gdb.base/sigaltstack.exp @@ -49,7 +49,7 @@ gdb_test "handle SIGPROF print pass nostop" # Advance to main if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } # Stop in handle, when at the inner most level diff --git a/gdb/testsuite/gdb.base/siginfo-addr.exp b/gdb/testsuite/gdb.base/siginfo-addr.exp index 236dd95..02810e8 100644 --- a/gdb/testsuite/gdb.base/siginfo-addr.exp +++ b/gdb/testsuite/gdb.base/siginfo-addr.exp @@ -49,7 +49,7 @@ gdb_test "display/i \$pc" # Advance to main if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } # Run to the signal. diff --git a/gdb/testsuite/gdb.base/siginfo-obj.exp b/gdb/testsuite/gdb.base/siginfo-obj.exp index db7d9f7..cebc2ee 100644 --- a/gdb/testsuite/gdb.base/siginfo-obj.exp +++ b/gdb/testsuite/gdb.base/siginfo-obj.exp @@ -50,7 +50,7 @@ gdb_load ${binfile} # Advance to main if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } # Run to the signal. @@ -108,7 +108,7 @@ gdb_test "p ssi_signo" " = $ssi_signo" # Advance to main if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } # Run to the signal. diff --git a/gdb/testsuite/gdb.base/siginfo.exp b/gdb/testsuite/gdb.base/siginfo.exp index e49cd56..5389e0b 100644 --- a/gdb/testsuite/gdb.base/siginfo.exp +++ b/gdb/testsuite/gdb.base/siginfo.exp @@ -47,7 +47,7 @@ gdb_test "display/i \$pc" # Advance to main if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } # Pass all the alarms straight through (but verbosely) diff --git a/gdb/testsuite/gdb.base/sigrepeat.exp b/gdb/testsuite/gdb.base/sigrepeat.exp index 2000629..3b423ec 100644 --- a/gdb/testsuite/gdb.base/sigrepeat.exp +++ b/gdb/testsuite/gdb.base/sigrepeat.exp @@ -41,7 +41,7 @@ gdb_load ${binfile} # Advance to main if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } # Run to the signal handler wait loop. diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp index 89edc2d..e8ab8ea 100644 --- a/gdb/testsuite/gdb.base/sigstep.exp +++ b/gdb/testsuite/gdb.base/sigstep.exp @@ -45,7 +45,7 @@ gdb_test "display/i \$pc" # Advance to main if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } # Pass all the alarms straight through (but verbosely) diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp index 93b2ca1..2aa181e 100644 --- a/gdb/testsuite/gdb.base/structs.exp +++ b/gdb/testsuite/gdb.base/structs.exp @@ -91,7 +91,7 @@ proc start_structs_test { types } { # Advance to main if { ![runto_main] } then { - gdb_suppress_tests; + gdb_suppress_tests } # Get the debug format diff --git a/gdb/testsuite/gdb.base/testenv.exp b/gdb/testsuite/gdb.base/testenv.exp index 15ecd29..ae8d2fa 100644 --- a/gdb/testsuite/gdb.base/testenv.exp +++ b/gdb/testsuite/gdb.base/testenv.exp @@ -36,7 +36,7 @@ if { [prepare_for_testing ${testfile}.exp ${binfile} ${srcfile}] } { # make sure $pc is sane, in case we're talking to a board. if { ![runto_main] } { - gdb_suppress_tests; + gdb_suppress_tests } set bp_line [gdb_get_line_number "set breakpoint here"] @@ -95,7 +95,7 @@ clean_restart $binfile # make sure $pc is sane, in case we're talking to a board. if { ![runto_main] } { - gdb_suppress_tests; + gdb_suppress_tests } set bp_line [gdb_get_line_number "set breakpoint here"] diff --git a/gdb/testsuite/gdb.base/twice.exp b/gdb/testsuite/gdb.base/twice.exp index 53b613e..fada7a1 100644 --- a/gdb/testsuite/gdb.base/twice.exp +++ b/gdb/testsuite/gdb.base/twice.exp @@ -20,9 +20,9 @@ set binfile ${objdir}/${subdir}/${testfile} set options debug lappend options "additional_flags=-I." -set fileid [open ${objdir}/${subdir}/${srcfile} w]; -puts $fileid "#include \"twice.c\""; -close $fileid; +set fileid [open ${objdir}/${subdir}/${srcfile} w] +puts $fileid "#include \"twice.c\"" +close $fileid remote_download host ${srcdir}/${subdir}/twice.c twice.c diff --git a/gdb/testsuite/gdb.base/valgrind-db-attach.exp b/gdb/testsuite/gdb.base/valgrind-db-attach.exp index 79c985f..b1e1ec6 100644 --- a/gdb/testsuite/gdb.base/valgrind-db-attach.exp +++ b/gdb/testsuite/gdb.base/valgrind-db-attach.exp @@ -36,7 +36,7 @@ regsub -all " " $db_command "\\ " db_command set test "spawn valgrind" set cmd "valgrind --db-attach=yes $db_command $binfile" -set res [remote_spawn host $cmd]; +set res [remote_spawn host $cmd] if { $res < 0 || $res == "" } { verbose -log "Spawning $cmd failed." unsupported $test diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp index 40c8464..6d2893a 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp @@ -28,7 +28,7 @@ if {[build_executable $test.exp $executable $srcfile {debug}] == -1} { set test "spawn valgrind" set cmd "valgrind --vgdb-error=0 $binfile" -set res [remote_spawn host $cmd]; +set res [remote_spawn host $cmd] if { $res < 0 || $res == "" } { verbose -log "Spawning $cmd failed." unsupported $test diff --git a/gdb/testsuite/gdb.base/varargs.exp b/gdb/testsuite/gdb.base/varargs.exp index d956e5c..70de81d 100644 --- a/gdb/testsuite/gdb.base/varargs.exp +++ b/gdb/testsuite/gdb.base/varargs.exp @@ -67,7 +67,7 @@ gdb_test_no_output "set width 0" if [gdb_skip_stdio_test "varargs.exp"] { # Nothing in this module is testable without printf. - return; + return } if ![runto_main] then { diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 502742c..5961ef6 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -344,7 +344,7 @@ proc test_watchpoint_triggered_in_syscall {} { # These tests won't work without printf support. if [gdb_skip_stdio_test "watchpoints triggered in syscall"] { - return; + return } # Run until we get to the first marker function. set x 0 @@ -364,13 +364,13 @@ proc test_watchpoint_triggered_in_syscall {} { # to gdb, not the inferior, and we lose. So that is why we have # watchpoint.c prompt us, so we can wait for that prompt. - send_gdb "continue\n"; + send_gdb "continue\n" gdb_expect { -re "Continuing\\.\r\ntype stuff for buf now:" { pass "continue to read" } default { - fail "continue to read"; + fail "continue to read" return } } diff --git a/gdb/testsuite/gdb.cp/gdb1355.exp b/gdb/testsuite/gdb.cp/gdb1355.exp index f8c3c3c..b903dd4 100644 --- a/gdb/testsuite/gdb.cp/gdb1355.exp +++ b/gdb/testsuite/gdb.cp/gdb1355.exp @@ -66,7 +66,7 @@ set f_ld "${ws}long double m_long_double;" set f_b "${ws}bool m_bool;" set itc "<invalid type code ${decimal}>" -set bad_i "${ws}(${itc}|int) m_int;"; +set bad_i "${ws}(${itc}|int) m_int;" set bad_c "${ws}(${itc}|char) m_char;" set bad_li "${ws}(${itc}|long int) m_long_int;" set bad_ui "${ws}(${itc}|unsigned int) m_unsigned_int;" diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp index bd2353a..69c629c 100644 --- a/gdb/testsuite/gdb.cp/misc.exp +++ b/gdb/testsuite/gdb.cp/misc.exp @@ -49,17 +49,17 @@ proc test_expr { args } { if { [llength $args] % 2 } { warning "an even # of arguments should be passed to test_expr" } - set last_ent [expr [llength $args] - 1]; - set testname [lindex $args $last_ent]; + set last_ent [expr [llength $args] - 1] + set testname [lindex $args $last_ent] if [gdb_test_no_output [lindex $args 0] "$testname (setup)"] { - gdb_suppress_tests; + gdb_suppress_tests } for {set x 1} {$x < $last_ent} {set x [expr $x + 2]} { if [gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])"] { - gdb_suppress_tests; + gdb_suppress_tests } } - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests } proc do_tests {} { diff --git a/gdb/testsuite/gdb.disasm/hppa.exp b/gdb/testsuite/gdb.disasm/hppa.exp index 9ce1511..00554cd 100644 --- a/gdb/testsuite/gdb.disasm/hppa.exp +++ b/gdb/testsuite/gdb.disasm/hppa.exp @@ -26,7 +26,7 @@ if ![istarget "hppa*-*-*"] { set testfile "hppa" set srcfile ${srcdir}/${subdir}/${testfile}.s set binfile ${objdir}/${subdir}/${testfile} -set comp_output [gdb_compile "${srcfile}" "${binfile}" executable ""]; +set comp_output [gdb_compile "${srcfile}" "${binfile}" executable ""] if { $comp_output != "" } { if [ regexp "Opcode not defined - DIAG" $comp_output] { warning "HP assembler in use--skipping disasm tests" diff --git a/gdb/testsuite/gdb.disasm/t01_mov.exp b/gdb/testsuite/gdb.disasm/t01_mov.exp index ebd3552..ea2653b 100644 --- a/gdb/testsuite/gdb.disasm/t01_mov.exp +++ b/gdb/testsuite/gdb.disasm/t01_mov.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t02_mova.exp b/gdb/testsuite/gdb.disasm/t02_mova.exp index e3c36a2..c3cc937 100644 --- a/gdb/testsuite/gdb.disasm/t02_mova.exp +++ b/gdb/testsuite/gdb.disasm/t02_mova.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t03_add.exp b/gdb/testsuite/gdb.disasm/t03_add.exp index 875985a..bffd8c2 100644 --- a/gdb/testsuite/gdb.disasm/t03_add.exp +++ b/gdb/testsuite/gdb.disasm/t03_add.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t04_sub.exp b/gdb/testsuite/gdb.disasm/t04_sub.exp index a1b27a2..44d525c 100644 --- a/gdb/testsuite/gdb.disasm/t04_sub.exp +++ b/gdb/testsuite/gdb.disasm/t04_sub.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t05_cmp.exp b/gdb/testsuite/gdb.disasm/t05_cmp.exp index 5218a0d..b55cdda 100644 --- a/gdb/testsuite/gdb.disasm/t05_cmp.exp +++ b/gdb/testsuite/gdb.disasm/t05_cmp.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t06_ari2.exp b/gdb/testsuite/gdb.disasm/t06_ari2.exp index 97e8204..1fafd74 100644 --- a/gdb/testsuite/gdb.disasm/t06_ari2.exp +++ b/gdb/testsuite/gdb.disasm/t06_ari2.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t07_ari3.exp b/gdb/testsuite/gdb.disasm/t07_ari3.exp index 7967829..b46fd2a 100644 --- a/gdb/testsuite/gdb.disasm/t07_ari3.exp +++ b/gdb/testsuite/gdb.disasm/t07_ari3.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t08_or.exp b/gdb/testsuite/gdb.disasm/t08_or.exp index 2396484..50af4ad 100644 --- a/gdb/testsuite/gdb.disasm/t08_or.exp +++ b/gdb/testsuite/gdb.disasm/t08_or.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t09_xor.exp b/gdb/testsuite/gdb.disasm/t09_xor.exp index 37e40c5..d6dffe7 100644 --- a/gdb/testsuite/gdb.disasm/t09_xor.exp +++ b/gdb/testsuite/gdb.disasm/t09_xor.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t10_and.exp b/gdb/testsuite/gdb.disasm/t10_and.exp index 8a3d706..51a9026 100644 --- a/gdb/testsuite/gdb.disasm/t10_and.exp +++ b/gdb/testsuite/gdb.disasm/t10_and.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t11_logs.exp b/gdb/testsuite/gdb.disasm/t11_logs.exp index dfeff6d..efef196 100644 --- a/gdb/testsuite/gdb.disasm/t11_logs.exp +++ b/gdb/testsuite/gdb.disasm/t11_logs.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t12_bit.exp b/gdb/testsuite/gdb.disasm/t12_bit.exp index 133aa0b..55b09c7 100644 --- a/gdb/testsuite/gdb.disasm/t12_bit.exp +++ b/gdb/testsuite/gdb.disasm/t12_bit.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.disasm/t13_otr.exp b/gdb/testsuite/gdb.disasm/t13_otr.exp index c58c44f..833ba11 100644 --- a/gdb/testsuite/gdb.disasm/t13_otr.exp +++ b/gdb/testsuite/gdb.disasm/t13_otr.exp @@ -26,8 +26,8 @@ set srcfile ${srcdir}/${subdir}/${testfile}.s set objfile ${objdir}/${subdir}/${testfile}.o set binfile ${objdir}/${subdir}/${testfile}.x -set asm-flags ""; -set link-flags "-m h8300sxelf"; +set asm-flags "" +set link-flags "-m h8300sxelf" if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then { diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index 8faf8c9..d700715 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -484,9 +484,9 @@ remote_file host delete x$tool gdb_start set file [remote_download host $GDB_FULLPATH x$tool] -set result [test_with_self $file]; -gdb_exit; -catch "remote_file host delete $file"; +set result [test_with_self $file] +gdb_exit +catch "remote_file host delete $file" if {$result <0} then { warning "Couldn't test self" diff --git a/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp b/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp index c9facf0..91f9c0a 100644 --- a/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp +++ b/gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp @@ -157,7 +157,7 @@ proc do_function_calls {} { global gdb_prompt # We need to up this because this can be really slow on some boards. - set timeout 60; + set timeout 60 gdb_test "p t_char_values(0,0)" " = 0" gdb_test "p t_char_values('a','b')" " = 1" @@ -314,16 +314,16 @@ if { $hp_aCC_compiler } { # the language be set to the default. if { ![runto_main] } { - gdb_suppress_tests; + gdb_suppress_tests } gdb_test "set overload-resolution 0" ".*" } else { if { ![set_lang_c] } { - gdb_suppress_tests; + gdb_suppress_tests } else { if { ![runto_main] } { - gdb_suppress_tests; + gdb_suppress_tests } } } diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp index 914d9df..ac24266 100644 --- a/gdb/testsuite/gdb.mi/mi-reverse.exp +++ b/gdb/testsuite/gdb.mi/mi-reverse.exp @@ -53,7 +53,7 @@ if [supports_process_record] { if [mi_gdb_test "-interpreter-exec console record" \ "=record-started,thread-group=\"i1\"\r\n\\^done" \ "Turn on process record"] { - warning "Fail to activate process record/replay, tests in this group will not be performed.\n"; + warning "Fail to activate process record/replay, tests in this group will not be performed.\n" return -1 } } diff --git a/gdb/testsuite/gdb.pascal/floats.exp b/gdb/testsuite/gdb.pascal/floats.exp index c4ad45e..79e6bc0 100644 --- a/gdb/testsuite/gdb.pascal/floats.exp +++ b/gdb/testsuite/gdb.pascal/floats.exp @@ -135,9 +135,9 @@ gdb_test_multiple "print s" $msg { verbose "expo found: $expo" 1 } else { set expo "0" - regsub ".*\[eE\]" "$value" "" expo; + regsub ".*\[eE\]" "$value" "" expo } - regsub "^-" "$expo" "" mexpo; + regsub "^-" "$expo" "" mexpo verbose "expo is $expo" 1 verbose "mexpo is $mexpo" 1 if { $value == 0 } { diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp index ceb0da7..4c1dba7 100644 --- a/gdb/testsuite/gdb.python/py-inferior.exp +++ b/gdb/testsuite/gdb.python/py-inferior.exp @@ -176,7 +176,7 @@ gdb_test "py print (gdb.inferiors()\[0\].search_memory (start_addr, 100, pattern # targets, test the search spanning multiple chunks. # Remote targets may implement the search differently. -set CHUNK_SIZE 16000 ; +set CHUNK_SIZE 16000 gdb_test_no_output "set *(int32_t*) &search_buf\[0*${CHUNK_SIZE}+100\] = 0x12345678" gdb_test_no_output "set *(int32_t*) &search_buf\[1*${CHUNK_SIZE}+100\] = 0x12345678" diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp index d9a7b16..2bcb7dc 100644 --- a/gdb/testsuite/gdb.threads/attach-into-signal.exp +++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp @@ -66,9 +66,9 @@ proc corefunc { threadtype executable } { set stoppedtry 10 break } - gets $fileid line1; - gets $fileid line2; - close $fileid; + gets $fileid line1 + gets $fileid line2 + close $fileid if {![string match "*(stopped)*" $line2]} { # No PASS message as we may be looping in multiple diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp index 51ad7d9..682ca59 100644 --- a/gdb/testsuite/gdb.threads/pthreads.exp +++ b/gdb/testsuite/gdb.threads/pthreads.exp @@ -272,7 +272,7 @@ if [runto_main] then { if [test_startup] then { if [check_control_c] then { warning "Could not stop child with ^C; skipping rest of tests.\n" - return; + return } check_backtraces } diff --git a/gdb/testsuite/gdb.threads/thread_events.exp b/gdb/testsuite/gdb.threads/thread_events.exp index ac7d408..49cfc30 100644 --- a/gdb/testsuite/gdb.threads/thread_events.exp +++ b/gdb/testsuite/gdb.threads/thread_events.exp @@ -52,8 +52,8 @@ proc gdb_test_thread_start {messages_enabled command pattern message} { return [gdb_test_multiple $command $message { -re "\\\[New Thread \[^\]\]*\\\]\r\n" { - incr events_seen; - exp_continue; + incr events_seen + exp_continue } -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" { if { $events_seen != $events_expected } { @@ -78,7 +78,7 @@ proc gdb_test_thread_exit {messages_enabled command pattern message} { return [gdb_test_multiple $command $message { -re "\\\[Thread \[^\]\]* exited\\\]\r\n" { incr events_seen - exp_continue; + exp_continue } -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" { if { $events_seen != $events_expected } { diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb.threads/watchthreads.exp index 6c06b49..74bcd96 100644 --- a/gdb/testsuite/gdb.threads/watchthreads.exp +++ b/gdb/testsuite/gdb.threads/watchthreads.exp @@ -134,7 +134,7 @@ for {set i 0} {$i < 30} {incr i} { # If we fail above, don't bother continuing loop if { $test_flag == 0 } { - set i 30; + set i 30 } } diff --git a/gdb/testsuite/gdb.trace/actions-changed.exp b/gdb/testsuite/gdb.trace/actions-changed.exp index e850da2..a1d596d 100644 --- a/gdb/testsuite/gdb.trace/actions-changed.exp +++ b/gdb/testsuite/gdb.trace/actions-changed.exp @@ -166,7 +166,7 @@ if ![runto_main] { if ![gdb_target_supports_trace] { unsupported "Current target does not support trace" - return -1; + return -1 } test_actions_changed diff --git a/gdb/testsuite/gdb.trace/actions.exp b/gdb/testsuite/gdb.trace/actions.exp index be2bb3e..9962d65 100644 --- a/gdb/testsuite/gdb.trace/actions.exp +++ b/gdb/testsuite/gdb.trace/actions.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -37,10 +37,10 @@ gdb_file_cmd $binfile # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) -set baseline [gdb_find_recursion_test_baseline $srcfile]; +set baseline [gdb_find_recursion_test_baseline $srcfile] if { $baseline == -1 } then { fail "Could not find gdb_recursion_test function" - return; + return } set testline1 [expr $baseline + 7] @@ -50,12 +50,12 @@ set testline1 [expr $baseline + 7] # gdb_delete_tracepoints -set trcpt1 [gdb_gettpnum gdb_c_test]; -set trcpt2 [gdb_gettpnum gdb_asm_test]; -set trcpt3 [gdb_gettpnum $testline1]; +set trcpt1 [gdb_gettpnum gdb_c_test] +set trcpt2 [gdb_gettpnum gdb_asm_test] +set trcpt3 [gdb_gettpnum $testline1] if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { fail "setting tracepoints" - return; + return } # 5.1 actions of specified tracepoint diff --git a/gdb/testsuite/gdb.trace/ax.exp b/gdb/testsuite/gdb.trace/ax.exp index 523d469..6714a59 100644 --- a/gdb/testsuite/gdb.trace/ax.exp +++ b/gdb/testsuite/gdb.trace/ax.exp @@ -18,7 +18,7 @@ # The tests that use the maintenance command do not need tracepoint # support on the target, but they do want a live program. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp index 54c6ba4..e6447ac 100644 --- a/gdb/testsuite/gdb.trace/backtrace.exp +++ b/gdb/testsuite/gdb.trace/backtrace.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -57,10 +57,10 @@ set arg4 4 set arg5 5 set arg6 6 -set baseline [gdb_find_recursion_test_baseline $srcfile]; +set baseline [gdb_find_recursion_test_baseline $srcfile] if { $baseline == -1 } { fail "Could not find gdb_recursion_test function" - return; + return } set return_me 0 @@ -125,7 +125,7 @@ set tdp6 [gdb_gettpnum $testline6] if { $tdp2 <= 0 || $tdp3 <= 0 || \ $tdp4 <= 0 || $tdp5 <= 0 || $tdp6 <= 0 } then { fail "setting tracepoints failed" - return; + return } #gdb_trace_setactions "setup TP to collect FP" \ diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp index 3a79b10..1b8c04e 100644 --- a/gdb/testsuite/gdb.trace/change-loc.exp +++ b/gdb/testsuite/gdb.trace/change-loc.exp @@ -12,7 +12,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" if {[skip_shlib_tests]} { return 0 diff --git a/gdb/testsuite/gdb.trace/deltrace.exp b/gdb/testsuite/gdb.trace/deltrace.exp index ee806cc..1053629 100644 --- a/gdb/testsuite/gdb.trace/deltrace.exp +++ b/gdb/testsuite/gdb.trace/deltrace.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -36,10 +36,10 @@ gdb_file_cmd $binfile # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) -set baseline [gdb_find_recursion_test_baseline $srcfile]; +set baseline [gdb_find_recursion_test_baseline $srcfile] if { $baseline == -1 } then { fail "Could not find gdb_recursion_test function" - return; + return } set testline1 [expr $baseline + 4] @@ -72,12 +72,12 @@ gdb_test "delete tracepoints" \ # 3.2 delete tracepoint <n> gdb_delete_tracepoints -set trcpt1 [gdb_gettpnum gdb_c_test]; -set trcpt2 [gdb_gettpnum gdb_asm_test]; -set trcpt3 [gdb_gettpnum $testline1]; +set trcpt1 [gdb_gettpnum gdb_c_test] +set trcpt2 [gdb_gettpnum gdb_asm_test] +set trcpt3 [gdb_gettpnum $testline1] if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { fail "setting tracepoints" - return; + return } gdb_test "info tracepoints" \ @@ -150,12 +150,12 @@ gdb_test "info tracepoints" \ # 3.3 delete three tracepoints at once gdb_delete_tracepoints -set trcpt1 [gdb_gettpnum gdb_c_test]; -set trcpt2 [gdb_gettpnum gdb_asm_test]; -set trcpt3 [gdb_gettpnum $testline1]; +set trcpt1 [gdb_gettpnum gdb_c_test] +set trcpt2 [gdb_gettpnum gdb_asm_test] +set trcpt3 [gdb_gettpnum $testline1] if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { fail "setting tracepoints" - return; + return } gdb_test "info tracepoints" \ diff --git a/gdb/testsuite/gdb.trace/disconnected-tracing.exp b/gdb/testsuite/gdb.trace/disconnected-tracing.exp index 03d7d09..7598d8a 100644 --- a/gdb/testsuite/gdb.trace/disconnected-tracing.exp +++ b/gdb/testsuite/gdb.trace/disconnected-tracing.exp @@ -15,7 +15,7 @@ # Test of disconnected-tracing. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" standard_testfile set executable $testfile diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp index 5a2d02f..7f1407e 100644 --- a/gdb/testsuite/gdb.trace/ftrace.exp +++ b/gdb/testsuite/gdb.trace/ftrace.exp @@ -12,7 +12,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" standard_testfile set executable $testfile diff --git a/gdb/testsuite/gdb.trace/infotrace.exp b/gdb/testsuite/gdb.trace/infotrace.exp index 49b77be..3a586cd 100644 --- a/gdb/testsuite/gdb.trace/infotrace.exp +++ b/gdb/testsuite/gdb.trace/infotrace.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -39,11 +39,11 @@ gdb_file_cmd $binfile # gdb_delete_tracepoints -set c_test_num [gdb_gettpnum gdb_c_test]; -set asm_test_num [gdb_gettpnum gdb_asm_test]; +set c_test_num [gdb_gettpnum gdb_c_test] +set asm_test_num [gdb_gettpnum gdb_asm_test] if { $c_test_num <= 0 || $asm_test_num <= 0 } then { fail "setting tracepoints" - return; + return } # 2.1 info tracepoints (all) diff --git a/gdb/testsuite/gdb.trace/passc-dyn.exp b/gdb/testsuite/gdb.trace/passc-dyn.exp index 6ac44dd..bad91e6 100644 --- a/gdb/testsuite/gdb.trace/passc-dyn.exp +++ b/gdb/testsuite/gdb.trace/passc-dyn.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -46,11 +46,11 @@ if { ![gdb_target_supports_trace] } then { # test passcount dynamically (live target) # -set baseline [gdb_find_recursion_test_baseline $srcfile]; +set baseline [gdb_find_recursion_test_baseline $srcfile] if { $baseline == -1 } then { fail "Could not find gdb_recursion_test function" - return; + return } # define relative source line numbers: @@ -74,7 +74,7 @@ set tdp3 [gdb_gettpnum "$testline3"] set tdp4 [gdb_gettpnum "$testline4"] if { $tdp2 <= 0 || $tdp3 <= 0 || $tdp4 <= 0 } then { fail "setting tracepoints" - return; + return } gdb_test "passcount 4 $tdp2" "Setting tracepoint $tdp2's passcount to 4" \ diff --git a/gdb/testsuite/gdb.trace/passcount.exp b/gdb/testsuite/gdb.trace/passcount.exp index 4ec3ee4..a179021 100644 --- a/gdb/testsuite/gdb.trace/passcount.exp +++ b/gdb/testsuite/gdb.trace/passcount.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -35,10 +35,10 @@ gdb_file_cmd $binfile # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) -set baseline [gdb_find_recursion_test_baseline $srcfile]; +set baseline [gdb_find_recursion_test_baseline $srcfile] if { $baseline == -1 } then { fail "Could not find gdb_recursion_test function" - return; + return } set testline1 [expr $baseline + 3] @@ -48,12 +48,12 @@ set testline1 [expr $baseline + 3] # gdb_delete_tracepoints -set trcpt1 [gdb_gettpnum gdb_c_test]; -set trcpt2 [gdb_gettpnum gdb_asm_test]; -set trcpt3 [gdb_gettpnum $testline1]; +set trcpt1 [gdb_gettpnum gdb_c_test] +set trcpt2 [gdb_gettpnum gdb_asm_test] +set trcpt3 [gdb_gettpnum $testline1] if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { fail "setting tracepoints" - return; + return } # 4.1 passcount of specified tracepoint diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp index 0308e13..b3c90bc 100644 --- a/gdb/testsuite/gdb.trace/pending.exp +++ b/gdb/testsuite/gdb.trace/pending.exp @@ -12,7 +12,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" if {[skip_shlib_tests]} { return 0 diff --git a/gdb/testsuite/gdb.trace/qtro.exp b/gdb/testsuite/gdb.trace/qtro.exp index f07c954..dc69734 100644 --- a/gdb/testsuite/gdb.trace/qtro.exp +++ b/gdb/testsuite/gdb.trace/qtro.exp @@ -57,7 +57,7 @@ if ![gdb_is_target_remote] { if ![gdb_target_supports_trace] { unsupported "Current target does not support trace" - return -1; + return -1 } # Run a trace session, stop it, and then inspect the resulting trace diff --git a/gdb/testsuite/gdb.trace/range-stepping.exp b/gdb/testsuite/gdb.trace/range-stepping.exp index 5cd81b6..c04e478 100644 --- a/gdb/testsuite/gdb.trace/range-stepping.exp +++ b/gdb/testsuite/gdb.trace/range-stepping.exp @@ -31,7 +31,7 @@ if ![runto_main] { if ![gdb_target_supports_trace] { unsupported "target does not support trace" - return -1; + return -1 } # Check that range stepping works well with tracepoints. diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp index 8bb71e4..664dd9c 100644 --- a/gdb/testsuite/gdb.trace/report.exp +++ b/gdb/testsuite/gdb.trace/report.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -62,10 +62,10 @@ set arg4 4 set arg5 5 set arg6 6 -set gdb_recursion_test_baseline [gdb_find_recursion_test_baseline $srcfile]; +set gdb_recursion_test_baseline [gdb_find_recursion_test_baseline $srcfile] if { $gdb_recursion_test_baseline == -1 } { fail "Could not find gdb_recursion_test function" - return; + return } set return_me 0 @@ -134,7 +134,7 @@ set tdp6 [gdb_gettpnum $testline6] if { $tdp1 <= 0 || $tdp2 <= 0 || $tdp3 <= 0 || \ $tdp4 <= 0 || $tdp5 <= 0 || $tdp6 <= 0 } then { fail "setting tracepoints failed" - return; + return } gdb_trace_setactions "9.x: setup TP to collect regs" \ diff --git a/gdb/testsuite/gdb.trace/save-trace.exp b/gdb/testsuite/gdb.trace/save-trace.exp index 595b85b..5df4ba5 100644 --- a/gdb/testsuite/gdb.trace/save-trace.exp +++ b/gdb/testsuite/gdb.trace/save-trace.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -36,10 +36,10 @@ gdb_file_cmd $binfile # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) -set baseline [gdb_find_recursion_test_baseline $srcfile]; +set baseline [gdb_find_recursion_test_baseline $srcfile] if { $baseline == -1 } then { fail "Could not find gdb_recursion_test function" - return; + return } set testline1 [expr $baseline + 4] @@ -58,9 +58,9 @@ set testline6 [expr $baseline + 9] gdb_delete_tracepoints foreach x { 1 2 3 4 5 6 } { - set testline [expr \$testline$x]; - set trcpt [gdb_gettpnum $testline]; - set trcpt$x $trcpt; + set testline [expr \$testline$x] + set trcpt [gdb_gettpnum $testline] + set trcpt$x $trcpt gdb_test "passcount $x" \ "Setting tracepoint $trcpt.* to $x" \ "10.x: set passcount for tracepoint $trcpt" @@ -80,39 +80,39 @@ gdb_test_no_output "set default-collect gdb_char_test, gdb_long_test - 100" \ "10: set default-collect" proc gdb_verify_tracepoints { testname } { - global gdb_prompt; + global gdb_prompt set ws "\[\t \]+" set nl "\[\r\n\]+" - set ourstate 1; - set result "pass"; + set ourstate 1 + set result "pass" gdb_test_multiple "info tracepoints" "$testname" { -re "\[0-9\]+\[\t \]+tracepoint\[\t \]+keep y\[\t \]+0x\[0-9a-fA-F\]+ in gdb_recursion_test\[^\r\n\]+\r\n\[ \t]+trace only if \[0-9\] - 1 == \[0-9\] / 2" { # if { $expect_out(1,string) != $ourstate } { -# set result "fail"; +# set result "fail" # } - incr ourstate; - exp_continue; + incr ourstate + exp_continue } -re "$gdb_prompt $" { if { $ourstate >= 6 } { - set result "pass"; + set result "pass" } else { - set result "fail"; + set result "fail" } } default { - set result "fail"; + set result "fail" } } - $result $testname; + $result $testname gdb_test "show default-collect" \ "The list of expressions to collect by default is \"gdb_char_test, gdb_long_test - 100\"..*" \ "10: show default-collect" } -gdb_verify_tracepoints "10.x: verify trace setup"; +gdb_verify_tracepoints "10.x: verify trace setup" # 10.1 Save current tracepoint definitions to a file @@ -129,7 +129,7 @@ gdb_test "info tracepoints" "No tracepoints." "10.2: delete tracepoints" gdb_test "source savetrace.tr" \ "Tracepoint \[0-9\]+ at .*" \ "10.2: read back saved tracepoints" -gdb_verify_tracepoints "10.2: verify recovered tracepoints"; +gdb_verify_tracepoints "10.2: verify recovered tracepoints" remote_file host delete savetrace.tr # 10.3 repeat with a path to the file @@ -147,7 +147,7 @@ gdb_test "info tracepoints" "No tracepoints." "10.3: delete tracepoints" gdb_test "source $trace_file_name" \ "Tracepoint \[0-9\]+ at .*" \ "10.4: read saved tracepoints, full path" -gdb_verify_tracepoints "10.3: verify recovered tracepoints, full path"; +gdb_verify_tracepoints "10.3: verify recovered tracepoints, full path" remote_file host delete $trace_file_name # 10.5 invalid filename diff --git a/gdb/testsuite/gdb.trace/status-stop.exp b/gdb/testsuite/gdb.trace/status-stop.exp index 10e2f4e..6fc58f6 100644 --- a/gdb/testsuite/gdb.trace/status-stop.exp +++ b/gdb/testsuite/gdb.trace/status-stop.exp @@ -12,7 +12,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" standard_testfile set executable $testfile @@ -32,7 +32,7 @@ if ![runto_main] { if ![gdb_target_supports_trace] { unsupported "target does not support trace" - return -1 + return -1 } # Verify that the sequence of commands "tstart tstop tstart" works well. diff --git a/gdb/testsuite/gdb.trace/strace.exp b/gdb/testsuite/gdb.trace/strace.exp index 3f3eb4e..ab7ccb5 100644 --- a/gdb/testsuite/gdb.trace/strace.exp +++ b/gdb/testsuite/gdb.trace/strace.exp @@ -12,7 +12,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" if {[skip_shlib_tests]} { return 0 diff --git a/gdb/testsuite/gdb.trace/tfile.exp b/gdb/testsuite/gdb.trace/tfile.exp index d7381eb..b4a7460 100644 --- a/gdb/testsuite/gdb.trace/tfile.exp +++ b/gdb/testsuite/gdb.trace/tfile.exp @@ -20,7 +20,7 @@ # ability to generate synthetic trace files directly, and the tfile # target is available to all GDB configs. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit gdb_start diff --git a/gdb/testsuite/gdb.trace/tfind.exp b/gdb/testsuite/gdb.trace/tfind.exp index 9ecc679..f66ee5d 100644 --- a/gdb/testsuite/gdb.trace/tfind.exp +++ b/gdb/testsuite/gdb.trace/tfind.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -73,10 +73,10 @@ if { ![gdb_target_supports_trace] } then { # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) -set baseline [gdb_find_recursion_test_baseline $srcfile]; +set baseline [gdb_find_recursion_test_baseline $srcfile] if { $baseline == -1 } then { fail "Could not find gdb_recursion_test function" - return; + return } set testline1 [expr $baseline + 1] @@ -98,7 +98,7 @@ set tdp5 [gdb_gettpnum $testline5] if { $tdp1 <= 0 || $tdp2 <= 0 || $tdp3 <= 0 || \ $tdp4 <= 0 || $tdp5 <= 0 } then { fail "setting tracepoints" - return; + return } # 6.1 test tstart command @@ -160,15 +160,15 @@ gdb_test "tstatus" "Trace stopped by a tstop command.*" \ "test tstatus off after tstop" ## record starting PC -set save_pc [gdb_readexpr "(unsigned long) \$pc"]; +set save_pc [gdb_readexpr "(unsigned long) \$pc"] if { $save_pc == -1 } then { fail "could not read PC" - return; + return } # 8.7 tfind start ## check $trace_frame == 0 -gdb_tfind_test "8.7: tfind start command" "start" "0"; +gdb_tfind_test "8.7: tfind start command" "start" "0" ## check $pc != startPC gdb_test "printf \"x \%d x\\n\", \$pc != $save_pc" \ "x 1 x" \ @@ -176,7 +176,7 @@ gdb_test "printf \"x \%d x\\n\", \$pc != $save_pc" \ # 8.8 tfind none ## check $trace_frame == -1 -gdb_tfind_test "8.8: tfind none" "none" "-1"; +gdb_tfind_test "8.8: tfind none" "none" "-1" ## check $pc == startPC gdb_test "printf \"x \%d x\\n\", \$pc == $save_pc" \ "x 1 x" \ @@ -184,7 +184,7 @@ gdb_test "printf \"x \%d x\\n\", \$pc == $save_pc" \ # 8.9 tfind end ## check $trace_frame == -1 -gdb_tfind_test "8.9: tfind end, selects no frame" "end" "-1"; +gdb_tfind_test "8.9: tfind end, selects no frame" "end" "-1" ## check $pc == startPC gdb_test "printf \"x \%d x\\n\", \$pc == $save_pc" \ "x 1 x" \ @@ -217,39 +217,39 @@ gdb_test "printf \"x \%d x\\n\", \$trace_frame == -3" "x 0 x" \ # 8.10 tfind <no arg> ## check $trace_frame += 1 -gdb_tfind_test "8.10: tfind start" "start" "0"; +gdb_tfind_test "8.10: tfind start" "start" "0" gdb_test "print \$trace_line" "$baseline" \ "8.10: tfind 0 (correct line $baseline)" -gdb_tfind_test "8.10: tfind noargument 1" "" "1"; +gdb_tfind_test "8.10: tfind noargument 1" "" "1" gdb_test "print \$trace_line" "$testline2" \ "8.10: tfind 1 (correct line $testline2)" -gdb_tfind_test "8.10: tfind noargument 2" "" "2"; +gdb_tfind_test "8.10: tfind noargument 2" "" "2" gdb_test "print \$trace_line" "$testline3" \ "8.10: tfind 2 (correct line $testline3)" -gdb_tfind_test "8.10: tfind noargument 3" "" "3"; +gdb_tfind_test "8.10: tfind noargument 3" "" "3" gdb_test "print \$trace_line" "$testline4" \ "8.10: tfind 3 (correct line $testline4)" -gdb_tfind_test "8.11: tfind 3" "3" "3"; +gdb_tfind_test "8.11: tfind 3" "3" "3" gdb_test "print \$trace_line" "$testline4" \ "8.11: tfind 3 (correct line $testline4)" -gdb_tfind_test "8.11: tfind backward 2" "-" "2"; +gdb_tfind_test "8.11: tfind backward 2" "-" "2" gdb_test "print \$trace_line" "$testline3" \ "8.11: tfind 2 (correct line $testline3)" -gdb_tfind_test "8.11: tfind backward 1" "-" "1"; +gdb_tfind_test "8.11: tfind backward 1" "-" "1" gdb_test "print \$trace_line" "$testline2" \ "8.11: tfind 1 (correct line $testline2)" -gdb_tfind_test "8.11: tfind backward 0" "-" "0"; +gdb_tfind_test "8.11: tfind backward 0" "-" "0" gdb_test "print \$trace_line" "$baseline" \ "8.11: tfind 0 (correct line $baseline)" -gdb_tfind_test "8.12: tfind none" "none" "-1"; +gdb_tfind_test "8.12: tfind none" "none" "-1" gdb_tfind_test "8.12: tfind tracepoint <n>" "tracepoint $tdp2" \ - "\$tracepoint" "$tdp2"; + "\$tracepoint" "$tdp2" gdb_test "print \$trace_line" "$testline2" \ "8.12: tfind tracepoint <n> (line $testline2)" -gdb_tfind_test "8.25: tfind none" "none" "-1"; +gdb_tfind_test "8.25: tfind none" "none" "-1" gdb_test "tfind tracepoint 0" "failed to find.*" \ "8.25: tfind tracepoint rejects zero" gdb_test "tfind tracepoint 32767" "failed to find.*" \ @@ -259,24 +259,24 @@ gdb_test "tfind tracepoint -1" "failed to find.*" \ # 8.37 tfind tracepoint n where n no longer exists (but used to) gdb_test_no_output "delete trace $tdp2" "" -gdb_tfind_test "8.37: tfind none" "none" "-1"; +gdb_tfind_test "8.37: tfind none" "none" "-1" gdb_tfind_test "8.37: tfind deleted tracepoint" \ "tracepoint $tdp2" \ - "\$tracepoint" "$tdp2"; + "\$tracepoint" "$tdp2" gdb_test "print \$trace_line" "$testline2" \ "8.37: tfind deleted tracepoint (line $testline2)" # 8.13 tfind tracepoint <no arg> ## check $tracepoint same before and after, $trace_frame changed -gdb_tfind_test "8.13: tfind none" "none" "-1"; +gdb_tfind_test "8.13: tfind none" "none" "-1" gdb_tfind_test "8.13: tracepoint $tdp1" "tracepoint $tdp1" \ - "\$tracepoint" "$tdp1"; + "\$tracepoint" "$tdp1" gdb_test "print \$trace_line" "$baseline" \ "8.13: tfind tracepoint $tdp1 (line $baseline)" gdb_test_no_output "set \$save_frame = \$trace_frame" "" gdb_tfind_test "8.13: tracepoint <no arg>" "tracepoint" \ - "\$tracepoint" "$tdp1"; + "\$tracepoint" "$tdp1" gdb_test "printf \"x \%d x\\n\", \$trace_frame == \$save_frame" \ "x 0 x" \ "8.13: tracepoint <no arg>, tracepoint number unchanged" @@ -299,7 +299,7 @@ gdb_test "print \$trace_line" "$testline4" \ gdb_test_no_output "set \$test_pc = \$pc" "" gdb_tfind_test "8.14: tfind none" "none" "-1" -gdb_tfind_test "8.14: tfind pc" "pc \$test_pc" "\$trace_frame != -1" "1"; +gdb_tfind_test "8.14: tfind pc" "pc \$test_pc" "\$trace_frame != -1" "1" gdb_test "print \$trace_line" "$testline4" \ "8.14: tfind pc x (line $testline4)" gdb_test "printf \"x \%d x\\n\", \$pc == \$test_pc" \ @@ -347,13 +347,13 @@ gdb_test "disassemble gdb_c_test" \ gdb_test "tfind line 0" \ "out of range.*|failed to find.*|No line 0 in .*" \ - "8.18: tfind line 0"; + "8.18: tfind line 0" gdb_test "tfind line 32767" \ "out of range.*|failed to find.*|No line 32767 in .*" \ - "8.27: tfind line 32767"; + "8.27: tfind line 32767" gdb_test "tfind line NoSuChFiLe.c:$baseline" \ "No source file named.*" \ - "8.27: tfind line in bad source file"; + "8.27: tfind line in bad source file" # 8.32 tfind invalid subcommand (tfind foo) ## check error diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp index 0a7c996..30bba93 100644 --- a/gdb/testsuite/gdb.trace/trace-break.exp +++ b/gdb/testsuite/gdb.trace/trace-break.exp @@ -12,7 +12,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" standard_testfile set executable $testfile diff --git a/gdb/testsuite/gdb.trace/trace-mt.exp b/gdb/testsuite/gdb.trace/trace-mt.exp index 321aaf3..7b6219a 100644 --- a/gdb/testsuite/gdb.trace/trace-mt.exp +++ b/gdb/testsuite/gdb.trace/trace-mt.exp @@ -12,7 +12,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" standard_testfile set executable $testfile diff --git a/gdb/testsuite/gdb.trace/tracecmd.exp b/gdb/testsuite/gdb.trace/tracecmd.exp index ccbd4ae..81dc1ed 100644 --- a/gdb/testsuite/gdb.trace/tracecmd.exp +++ b/gdb/testsuite/gdb.trace/tracecmd.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -35,10 +35,10 @@ gdb_file_cmd $binfile # define relative source line numbers: # all subsequent line numbers are relative to this first one (baseline) -set baseline [gdb_find_recursion_test_baseline $srcfile]; +set baseline [gdb_find_recursion_test_baseline $srcfile] if { $baseline == -1 } then { fail "Could not find gdb_recursion_test function" - return; + return } set testline1 [expr $baseline + 1] @@ -48,7 +48,7 @@ set testline2 [expr $baseline + 3] # test "help tracepoints" # -set helpcnt 0; +set helpcnt 0 test_class_help "tracepoints" { "Tracing of program execution without stopping the program\.[\r\n\]+" } "1.0: help tracepoints" diff --git a/gdb/testsuite/gdb.trace/tspeed.exp b/gdb/testsuite/gdb.trace/tspeed.exp index c5c2062..7776c65 100644 --- a/gdb/testsuite/gdb.trace/tspeed.exp +++ b/gdb/testsuite/gdb.trace/tspeed.exp @@ -73,7 +73,7 @@ proc gdb_slow_trace_speed_test { } { gdb_delete_tracepoints - gdb_test "print iters = init_iters" ".* = .*"; + gdb_test "print iters = init_iters" ".* = .*" set testline [gdb_get_line_number "set tracepoint here"] @@ -90,7 +90,7 @@ proc gdb_fast_trace_speed_test { } { gdb_delete_tracepoints - gdb_test "print iters = init_iters" ".* = .*"; + gdb_test "print iters = init_iters" ".* = .*" set run_ftrace 0 diff --git a/gdb/testsuite/gdb.trace/tsv.exp b/gdb/testsuite/gdb.trace/tsv.exp index 76b8645..4177d13 100644 --- a/gdb/testsuite/gdb.trace/tsv.exp +++ b/gdb/testsuite/gdb.trace/tsv.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -111,11 +111,11 @@ if { ![gdb_target_supports_trace] } then { } gdb_delete_tracepoints -set trcpt1 [gdb_gettpnum gdb_c_test]; +set trcpt1 [gdb_gettpnum gdb_c_test] if { $trcpt1 <= 0 } then { fail "setting tracepoints" - return; + return } gdb_test "tvariable \$tvar5 = 15" \ diff --git a/gdb/testsuite/gdb.trace/while-stepping.exp b/gdb/testsuite/gdb.trace/while-stepping.exp index da9b14a..3e60587 100644 --- a/gdb/testsuite/gdb.trace/while-stepping.exp +++ b/gdb/testsuite/gdb.trace/while-stepping.exp @@ -15,7 +15,7 @@ # This file was written by Michael Snyder (msnyder@cygnus.com) -load_lib "trace-support.exp"; +load_lib "trace-support.exp" gdb_exit @@ -42,7 +42,7 @@ gdb_delete_tracepoints set trcpt1 [gdb_gettpnum gdb_c_test] if { $trcpt1 <= 0 } then { fail "Could not find gdb_c_test function" - return; + return } # 5.12 basic while-stepping command (collect regs) @@ -71,7 +71,7 @@ gdb_test "info tracepoints" \ # [deferred to dynamic test section] proc while_stepping_bogus_arg { bogus msgstring } { - global gdb_prompt; + global gdb_prompt gdb_trace_setactions "$msgstring" \ "" \ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 76ee870..376aacc 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -30,13 +30,13 @@ load_lib libgloss.exp global GDB if [info exists TOOL_EXECUTABLE] { - set GDB $TOOL_EXECUTABLE; + set GDB $TOOL_EXECUTABLE } if ![info exists GDB] { if ![is_remote host] { set GDB [findfile $base_dir/../../gdb/gdb "$base_dir/../../gdb/gdb" [transform gdb]] } else { - set GDB [transform gdb]; + set GDB [transform gdb] } } verbose "using GDB = $GDB" 2 @@ -112,7 +112,7 @@ proc default_gdb_version {} { global INTERNAL_GDBFLAGS GDBFLAGS global gdb_prompt set output [remote_exec host "$GDB $INTERNAL_GDBFLAGS --version"] - set tmp [lindex $output 1]; + set tmp [lindex $output 1] set version "" regexp " \[0-9\]\[^ \t\n\r\]+" "$tmp" version if ![is_remote host] { @@ -171,7 +171,7 @@ proc delete_breakpoints {} { send_gdb "delete breakpoints\n" gdb_expect 100 { -re "Delete all breakpoints.*y or n.*$" { - send_gdb "y\n"; + send_gdb "y\n" exp_continue } -re "$gdb_prompt $" { # This happens if there were no breakpoints @@ -183,7 +183,7 @@ proc delete_breakpoints {} { -re "No breakpoints or watchpoints..*$gdb_prompt $" {} -re "$gdb_prompt $" { perror "breakpoints not deleted" ; return } -re "Delete all breakpoints.*or n.*$" { - send_gdb "y\n"; + send_gdb "y\n" exp_continue } timeout { perror "info breakpoints (timeout)" ; return } @@ -203,12 +203,12 @@ proc gdb_run_cmd {args} { global gdb_prompt use_gdb_stub if [target_info exists gdb_init_command] { - send_gdb "[target_info gdb_init_command]\n"; + send_gdb "[target_info gdb_init_command]\n" gdb_expect 30 { -re "$gdb_prompt $" { } default { - perror "gdb_init_command for target failed"; - return; + perror "gdb_init_command for target failed" + return } } } @@ -216,57 +216,57 @@ proc gdb_run_cmd {args} { if $use_gdb_stub { if [target_info exists gdb,do_reload_on_run] { if { [gdb_reload] != 0 } { - return; + return } - send_gdb "continue\n"; + send_gdb "continue\n" gdb_expect 60 { -re "Continu\[^\r\n\]*\[\r\n\]" {} default {} } - return; + return } if [target_info exists gdb,start_symbol] { - set start [target_info gdb,start_symbol]; + set start [target_info gdb,start_symbol] } else { - set start "start"; + set start "start" } send_gdb "jump *$start\n" - set start_attempt 1; + set start_attempt 1 while { $start_attempt } { # Cap (re)start attempts at three to ensure that this loop # always eventually fails. Don't worry about trying to be # clever and not send a command when it has failed. if [expr $start_attempt > 3] { - perror "Jump to start() failed (retry count exceeded)"; - return; + perror "Jump to start() failed (retry count exceeded)" + return } - set start_attempt [expr $start_attempt + 1]; + set start_attempt [expr $start_attempt + 1] gdb_expect 30 { -re "Continuing at \[^\r\n\]*\[\r\n\]" { - set start_attempt 0; + set start_attempt 0 } -re "No symbol \"_start\" in current.*$gdb_prompt $" { - perror "Can't find start symbol to run in gdb_run"; - return; + perror "Can't find start symbol to run in gdb_run" + return } -re "No symbol \"start\" in current.*$gdb_prompt $" { - send_gdb "jump *_start\n"; + send_gdb "jump *_start\n" } -re "No symbol.*context.*$gdb_prompt $" { - set start_attempt 0; + set start_attempt 0 } -re "Line.* Jump anyway.*y or n. $" { send_gdb "y\n" } -re "The program is not being run.*$gdb_prompt $" { if { [gdb_reload] != 0 } { - return; + return } - send_gdb "jump *$start\n"; + send_gdb "jump *$start\n" } timeout { - perror "Jump to start() failed (timeout)"; + perror "Jump to start() failed (timeout)" return } } @@ -276,7 +276,7 @@ proc gdb_run_cmd {args} { if [target_info exists gdb,do_reload_on_run] { if { [gdb_reload] != 0 } { - return; + return } } send_gdb "run $args\n" @@ -305,11 +305,11 @@ proc gdb_start_cmd {args} { global gdb_prompt use_gdb_stub if [target_info exists gdb_init_command] { - send_gdb "[target_info gdb_init_command]\n"; + send_gdb "[target_info gdb_init_command]\n" gdb_expect 30 { -re "$gdb_prompt $" { } default { - perror "gdb_init_command for target failed"; + perror "gdb_init_command for target failed" return -1 } } @@ -743,21 +743,21 @@ proc gdb_test_multiple { command message user_code } { } set result -1 - set string "${command}\n"; + set string "${command}\n" if { $command != "" } { set multi_line_re "\[\r\n\] *>" while { "$string" != "" } { - set foo [string first "\n" "$string"]; - set len [string length "$string"]; + set foo [string first "\n" "$string"] + set len [string length "$string"] if { $foo < [expr $len - 1] } { - set str [string range "$string" 0 $foo]; + set str [string range "$string" 0 $foo] if { [send_gdb "$str"] != "" } { - global suppress_flag; + global suppress_flag if { ! $suppress_flag } { - perror "Couldn't send $command to GDB."; + perror "Couldn't send $command to GDB." } - fail "$message"; + fail "$message" return $result } # since we're checking if each line of the multi-line @@ -769,36 +769,36 @@ proc gdb_test_multiple { command message user_code } { -notransfer -re "$multi_line_re$" { verbose "partial: match" 3 } timeout { verbose "partial: timeout" 3 } } - set string [string range "$string" [expr $foo + 1] end]; + set string [string range "$string" [expr $foo + 1] end] set multi_line_re "$multi_line_re.*\[\r\n\] *>" } else { - break; + break } } if { "$string" != "" } { if { [send_gdb "$string"] != "" } { - global suppress_flag; + global suppress_flag if { ! $suppress_flag } { - perror "Couldn't send $command to GDB."; + perror "Couldn't send $command to GDB." } - fail "$message"; + fail "$message" return $result } } } if [target_info exists gdb,timeout] { - set tmt [target_info gdb,timeout]; + set tmt [target_info gdb,timeout] } else { if [info exists timeout] { - set tmt $timeout; + set tmt $timeout } else { - global timeout; + global timeout if [info exists timeout] { - set tmt $timeout; + set tmt $timeout } else { - set tmt 60; + set tmt 60 } } } @@ -810,10 +810,10 @@ proc gdb_test_multiple { command message user_code } { } -re "\\*\\*\\* DOSEXIT code.*" { if { $message != "" } { - fail "$message"; + fail "$message" } - gdb_suppress_entire_file "GDB died"; - set result -1; + gdb_suppress_entire_file "GDB died" + set result -1 } } append code $processed_code @@ -910,7 +910,7 @@ proc gdb_test_multiple { command message user_code } { set result 0 set code [catch {gdb_expect $tmt $code} string] if {$code == 1} { - global errorInfo errorCode; + global errorInfo errorCode return -code error -errorinfo $errorInfo -errorcode $errorCode $string } elseif {$code > 1} { return -code $code $string @@ -953,8 +953,8 @@ proc gdb_test { args } { set pattern [lindex $args 1] if [llength $args]==5 { - set question_string [lindex $args 3]; - set response_string [lindex $args 4]; + set question_string [lindex $args 3] + set response_string [lindex $args 4] } else { set question_string "^FOOBAR$" } @@ -966,8 +966,8 @@ proc gdb_test { args } { } } -re "(${question_string})$" { - send_gdb "$response_string\n"; - exp_continue; + send_gdb "$response_string\n" + exp_continue } }] } @@ -1244,22 +1244,22 @@ proc default_gdb_exit {} { global GDB global INTERNAL_GDBFLAGS GDBFLAGS global verbose - global gdb_spawn_id; + global gdb_spawn_id - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests if ![info exists gdb_spawn_id] { - return; + return } verbose "Quitting $GDB $INTERNAL_GDBFLAGS $GDBFLAGS" if { [is_remote host] && [board_info host exists fileid] } { - send_gdb "quit\n"; + send_gdb "quit\n" gdb_expect 10 { -re "y or n" { - send_gdb "y\n"; - exp_continue; + send_gdb "y\n" + exp_continue } -re "DOSEXIT code" { } default { } @@ -1267,7 +1267,7 @@ proc default_gdb_exit {} { } if ![is_remote host] { - remote_close host; + remote_close host } unset gdb_spawn_id } @@ -1402,9 +1402,9 @@ proc default_gdb_start { } { global INTERNAL_GDBFLAGS GDBFLAGS global gdb_prompt global timeout - global gdb_spawn_id; + global gdb_spawn_id - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests # Set the default value, it may be overriden later by specific testfile. # @@ -1427,7 +1427,7 @@ proc default_gdb_start { } { exit 1 } } - set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]"]; + set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]"] if { $res < 0 || $res == "" } { perror "Spawning $GDB failed." return 1 @@ -1442,11 +1442,11 @@ proc default_gdb_start { } { } timeout { perror "(timeout) GDB never initialized after 10 seconds." - remote_close host; + remote_close host return -1 } } - set gdb_spawn_id -1; + set gdb_spawn_id -1 # force the height to "unlimited", so no pagers get used send_gdb "set height 0\n" @@ -2505,19 +2505,19 @@ set gdb_wrapper_initialized 0 set gdb_wrapper_target "" proc gdb_wrapper_init { args } { - global gdb_wrapper_initialized; - global gdb_wrapper_file; - global gdb_wrapper_flags; + global gdb_wrapper_initialized + global gdb_wrapper_file + global gdb_wrapper_flags global gdb_wrapper_target if { $gdb_wrapper_initialized == 1 } { return; } if {[target_info exists needs_status_wrapper] && \ [target_info needs_status_wrapper] != "0"} { - set result [build_wrapper "testglue.o"]; + set result [build_wrapper "testglue.o"] if { $result != "" } { - set gdb_wrapper_file [lindex $result 0]; - set gdb_wrapper_flags [lindex $result 1]; + set gdb_wrapper_file [lindex $result 0] + set gdb_wrapper_flags [lindex $result 1] } else { warning "Status wrapper failed to build." } @@ -2531,10 +2531,10 @@ global gdb_saved_set_unbuffered_mode_obj set gdb_saved_set_unbuffered_mode_obj "" proc gdb_compile {source dest type options} { - global GDB_TESTCASE_OPTIONS; - global gdb_wrapper_file; - global gdb_wrapper_flags; - global gdb_wrapper_initialized; + global GDB_TESTCASE_OPTIONS + global gdb_wrapper_file + global gdb_wrapper_flags + global gdb_wrapper_initialized global srcdir global objdir global gdb_saved_set_unbuffered_mode_obj @@ -2604,7 +2604,7 @@ proc gdb_compile {source dest type options} { set options [concat $options2 $options] } if [info exists GDB_TESTCASE_OPTIONS] { - lappend options "additional_flags=$GDB_TESTCASE_OPTIONS"; + lappend options "additional_flags=$GDB_TESTCASE_OPTIONS" } verbose "options are $options" verbose "source is $source $dest $type $options" @@ -2673,13 +2673,13 @@ proc gdb_compile {source dest type options} { } } - set result [target_compile $source $dest $type $options]; + set result [target_compile $source $dest $type $options] # Prune uninteresting compiler (and linker) output. regsub "Creating library file: \[^\r\n\]*\[\r\n\]+" $result "" result - regsub "\[\r\n\]*$" "$result" "" result; - regsub "^\[\r\n\]*" "$result" "" result; + regsub "\[\r\n\]*$" "$result" "" result + regsub "^\[\r\n\]*" "$result" "" result if {[lsearch $options quiet] < 0} { # We shall update this on a per language basis, to avoid @@ -2881,7 +2881,7 @@ proc gdb_compile_objc {source dest type options} { } proc send_gdb { string } { - global suppress_flag; + global suppress_flag if { $suppress_flag } { return "suppressed" } @@ -2893,66 +2893,66 @@ proc send_gdb { string } { proc gdb_expect { args } { if { [llength $args] == 2 && [lindex $args 0] != "-re" } { - set atimeout [lindex $args 0]; - set expcode [list [lindex $args 1]]; + set atimeout [lindex $args 0] + set expcode [list [lindex $args 1]] } else { - set expcode $args; + set expcode $args } - upvar timeout timeout; + upvar timeout timeout if [target_info exists gdb,timeout] { if [info exists timeout] { if { $timeout < [target_info gdb,timeout] } { - set gtimeout [target_info gdb,timeout]; + set gtimeout [target_info gdb,timeout] } else { - set gtimeout $timeout; + set gtimeout $timeout } } else { - set gtimeout [target_info gdb,timeout]; + set gtimeout [target_info gdb,timeout] } } if ![info exists gtimeout] { - global timeout; + global timeout if [info exists timeout] { - set gtimeout $timeout; + set gtimeout $timeout } } if [info exists atimeout] { if { ![info exists gtimeout] || $gtimeout < $atimeout } { - set gtimeout $atimeout; + set gtimeout $atimeout } } else { if ![info exists gtimeout] { # Eeeeew. - set gtimeout 60; + set gtimeout 60 } } - global suppress_flag; - global remote_suppress_flag; + global suppress_flag + global remote_suppress_flag if [info exists remote_suppress_flag] { - set old_val $remote_suppress_flag; + set old_val $remote_suppress_flag } if [info exists suppress_flag] { if { $suppress_flag } { - set remote_suppress_flag 1; + set remote_suppress_flag 1 } } set code [catch \ - {uplevel remote_expect host $gtimeout $expcode} string]; + {uplevel remote_expect host $gtimeout $expcode} string] if [info exists old_val] { - set remote_suppress_flag $old_val; + set remote_suppress_flag $old_val } else { if [info exists remote_suppress_flag] { - unset remote_suppress_flag; + unset remote_suppress_flag } } if {$code == 1} { - global errorInfo errorCode; + global errorInfo errorCode return -code error -errorinfo $errorInfo -errorcode $errorCode $string } else { @@ -3045,10 +3045,10 @@ proc gdb_expect_list {test sentinel list} { # # proc gdb_suppress_entire_file { reason } { - global suppress_flag; + global suppress_flag - warning "$reason\n"; - set suppress_flag -1; + warning "$reason\n" + set suppress_flag -1 } # @@ -3057,17 +3057,17 @@ proc gdb_suppress_entire_file { reason } { # gdb_stop_suppressing_tests). # proc gdb_suppress_tests { args } { - global suppress_flag; + global suppress_flag return; # fnf - disable pending review of results where # testsuite ran better without this - incr suppress_flag; + incr suppress_flag if { $suppress_flag == 1 } { if { [llength $args] > 0 } { - warning "[lindex $args 0]\n"; + warning "[lindex $args 0]\n" } else { - warning "Because of previous failure, all subsequent tests in this group will automatically fail.\n"; + warning "Because of previous failure, all subsequent tests in this group will automatically fail.\n" } } } @@ -3076,22 +3076,22 @@ proc gdb_suppress_tests { args } { # Clear suppress_flag. # proc gdb_stop_suppressing_tests { } { - global suppress_flag; + global suppress_flag if [info exists suppress_flag] { if { $suppress_flag > 0 } { - set suppress_flag 0; - clone_output "Tests restarted.\n"; + set suppress_flag 0 + clone_output "Tests restarted.\n" } } else { - set suppress_flag 0; + set suppress_flag 0 } } proc gdb_clear_suppressed { } { - global suppress_flag; + global suppress_flag - set suppress_flag 0; + set suppress_flag 0 } proc gdb_start { } { @@ -3337,7 +3337,7 @@ proc default_gdb_init { args } { set cleanfiles {} - gdb_clear_suppressed; + gdb_clear_suppressed set gdb_test_file_name [file rootname [file tail [lindex $args 0]]] @@ -3358,13 +3358,13 @@ proc default_gdb_init { args } { if { [llength $args] > 0 } { global pf_prefix - set file [lindex $args 0]; + set file [lindex $args 0] - set pf_prefix "[file tail [file dirname $file]]/[file tail $file]:"; + set pf_prefix "[file tail [file dirname $file]]/[file tail $file]:" } - global gdb_prompt; + global gdb_prompt if [target_info exists gdb_prompt] { - set gdb_prompt [target_info gdb_prompt]; + set gdb_prompt [target_info gdb_prompt] } else { set gdb_prompt "\\(gdb\\)" } @@ -3619,7 +3619,7 @@ proc test_debug_format {format} { # expected to fail, 0 otherwise (or if it is unknown). Must have # previously called get_debug_format. proc setup_xfail_format { format } { - set ret [test_debug_format $format]; + set ret [test_debug_format $format] if {$ret} then { setup_xfail "*-*-*" @@ -3807,7 +3807,7 @@ proc rerun_to_main {} { proc gdb_skip_float_test { msg } { if [target_info exists gdb,skip_float_tests] { - verbose "Skipping test '$msg': no float tests."; + verbose "Skipping test '$msg': no float tests." return 1 } return 0 @@ -3818,7 +3818,7 @@ proc gdb_skip_float_test { msg } { proc gdb_skip_stdio_test { msg } { if [target_info exists gdb,noinferiorio] { - verbose "Skipping test '$msg': no inferior i/o."; + verbose "Skipping test '$msg': no inferior i/o." return 1 } return 0 diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp index 79ecc5a..93884a6 100644 --- a/gdb/testsuite/lib/gdbserver-support.exp +++ b/gdb/testsuite/lib/gdbserver-support.exp @@ -346,7 +346,7 @@ proc gdbserver_reconnect { } { global gdbserver_protocol global gdbserver_gdbport - global gdbserver_reconnect_p; + global gdbserver_reconnect_p if {![info exists gdbserver_reconnect_p] || !$gdbserver_reconnect_p} { error "gdbserver_reconnect_p is not set before gdbserver_reconnect" return 0 diff --git a/gdb/testsuite/lib/java.exp b/gdb/testsuite/lib/java.exp index ced37a4..19b1eee 100644 --- a/gdb/testsuite/lib/java.exp +++ b/gdb/testsuite/lib/java.exp @@ -31,8 +31,8 @@ set java_initialized 0 # Build the status wrapper library as needed. # proc java_init { args } { - global wrapper_file; - global wrap_compile_flags; + global wrapper_file + global wrap_compile_flags global java_initialized global GCJ_UNDER_TEST global TOOL_EXECUTABLE @@ -42,7 +42,7 @@ proc java_init { args } { if ![info exists GCJ_UNDER_TEST] { if [info exists TOOL_EXECUTABLE] { - set GCJ_UNDER_TEST $TOOL_EXECUTABLE; + set GCJ_UNDER_TEST $TOOL_EXECUTABLE } else { if { [info exists env(GCJ)] && $env(GCJ) != "" } { set GCJ_UNDER_TEST $env(GCJ) @@ -51,14 +51,14 @@ proc java_init { args } { global target_alias if ![is_remote host] { - set file [lookfor_file $tool_root_dir gcj]; + set file [lookfor_file $tool_root_dir gcj] if { $file == "" } { - set file [lookfor_file $tool_root_dir gcc/gcj]; + set file [lookfor_file $tool_root_dir gcc/gcj] } if { $file != "" } { - set CC "$file -B[file dirname $file]/ --specs=$tool_root_dir/$target_alias/libjava/libgcj-test.spec"; + set CC "$file -B[file dirname $file]/ --specs=$tool_root_dir/$target_alias/libjava/libgcj-test.spec" } else { - set CC [transform gcj]; + set CC [transform gcj] } } else { set CC [transform gcj] @@ -68,13 +68,13 @@ proc java_init { args } { } } - set wrapper_file ""; - set wrap_compile_flags ""; + set wrapper_file "" + set wrap_compile_flags "" if [target_info exists needs_status_wrapper] { - set result [build_wrapper "testglue.o"]; + set result [build_wrapper "testglue.o"] if { $result != "" } { - set wrapper_file [lindex $result 0]; - set wrap_compile_flags [lindex $result 1]; + set wrapper_file [lindex $result 0] + set wrap_compile_flags [lindex $result 1] } else { warning "Status wrapper failed to build." } diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 50b926f..86a0fd6 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -45,33 +45,33 @@ proc mi_uncatched_gdb_exit {} { global GDB global INTERNAL_GDBFLAGS GDBFLAGS global verbose - global gdb_spawn_id; + global gdb_spawn_id global gdb_prompt global mi_gdb_prompt global MIFLAGS - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests if { [info procs sid_exit] != "" } { sid_exit } if ![info exists gdb_spawn_id] { - return; + return } verbose "Quitting $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $MIFLAGS" if { [is_remote host] && [board_info host exists fileid] } { - send_gdb "999-gdb-exit\n"; + send_gdb "999-gdb-exit\n" gdb_expect 10 { -re "y or n" { - send_gdb "y\n"; - exp_continue; + send_gdb "y\n" + exp_continue } -re "Undefined command.*$gdb_prompt $" { send_gdb "quit\n" - exp_continue; + exp_continue } -re "DOSEXIT code" { } default { } @@ -79,7 +79,7 @@ proc mi_uncatched_gdb_exit {} { } if ![is_remote host] { - remote_close host; + remote_close host } unset gdb_spawn_id } @@ -102,10 +102,10 @@ proc default_mi_gdb_start { args } { global gdb_prompt global mi_gdb_prompt global timeout - global gdb_spawn_id; + global gdb_spawn_id global MIFLAGS - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests set inferior_pty no-tty # Set the default value, it may be overriden later by specific testfile. @@ -145,7 +145,7 @@ proc default_mi_gdb_start { args } { set mi_inferior_tty_name $spawn_out(slave,name) } - set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS $MIFLAGS [host_info gdb_opts]"]; + set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS $MIFLAGS [host_info gdb_opts]"] if { $res < 0 || $res == "" } { perror "Spawning $GDB failed." return 1 @@ -157,7 +157,7 @@ proc default_mi_gdb_start { args } { # using the old-style prompt. if { $MIFLAGS == "-i=mi1" } { perror "(mi startup) Got unexpected new mi prompt." - remote_close host; + remote_close host return -1 } verbose "GDB initialized." @@ -168,28 +168,28 @@ proc default_mi_gdb_start { args } { # using the new-style prompt. if { $MIFLAGS != "-i=mi1" } { perror "(mi startup) Got unexpected old mi prompt." - remote_close host; + remote_close host return -1 } verbose "GDB initialized." } -re ".*unrecognized option.*for a complete list of options." { untested "Skip mi tests (not compiled with mi support)." - remote_close host; + remote_close host return -1 } -re ".*Interpreter `mi' unrecognized." { untested "Skip mi tests (not compiled with mi support)." - remote_close host; + remote_close host return -1 } timeout { perror "(timeout) GDB never initialized after 10 seconds." - remote_close host; + remote_close host return -1 } } - set gdb_spawn_id -1; + set gdb_spawn_id -1 # FIXME: mi output does not go through pagers, so these can be removed. # force the height to "unlimited", so no pagers get used @@ -252,7 +252,7 @@ proc mi_delete_breakpoints {} { send_gdb "102-break-delete\n" gdb_expect 30 { -re "Delete all breakpoints.*y or n.*$" { - send_gdb "y\n"; + send_gdb "y\n" exp_continue } -re "102-break-delete\r\n102\\\^done\r\n$mi_gdb_prompt$" { @@ -270,8 +270,8 @@ proc mi_delete_breakpoints {} { -re "103-break-list\r\n103\\\^doneNo breakpoints or watchpoints.\r\n\r\n$mi_gdb_prompt$" {warning "Unexpected console text received"} -re "$mi_gdb_prompt$" { perror "Breakpoints not deleted" ; return } -re "Delete all breakpoints.*or n.*$" { - warning "Unexpected prompt for breakpoints deletion"; - send_gdb "y\n"; + warning "Unexpected prompt for breakpoints deletion" + send_gdb "y\n" exp_continue } timeout { perror "-break-list (timeout)" ; return } @@ -338,29 +338,29 @@ proc mi_gdb_target_cmd { targetname serialport } { send_gdb "47-target-select $targetname $serialport\n" gdb_expect 60 { -re "47\\^connected.*$mi_gdb_prompt" { - verbose "Set target to $targetname"; + verbose "Set target to $targetname" return 0 } -re "unknown host.*$mi_gdb_prompt" { verbose "Couldn't look up $serialport" } -re "Couldn't establish connection to remote.*$mi_gdb_prompt$" { - verbose "Connection failed"; + verbose "Connection failed" } -re "Remote MIPS debugging.*$mi_gdb_prompt$" { - verbose "Set target to $targetname"; + verbose "Set target to $targetname" return 0 } -re "Remote debugging using .*$serialport_re.*$mi_gdb_prompt$" { - verbose "Set target to $targetname"; + verbose "Set target to $targetname" return 0 } -re "Remote target $targetname connected to.*$mi_gdb_prompt$" { - verbose "Set target to $targetname"; + verbose "Set target to $targetname" return 0 } -re "Connected to.*$mi_gdb_prompt$" { - verbose "Set target to $targetname"; + verbose "Set target to $targetname" return 0 } -re "Ending remote.*$mi_gdb_prompt$" { } @@ -374,10 +374,10 @@ proc mi_gdb_target_cmd { targetname serialport } { return 1 } -re "Timeout reading from remote system.*$mi_gdb_prompt$" { - verbose "Got timeout error from gdb."; + verbose "Got timeout error from gdb." } timeout { - send_gdb ""; + send_gdb "" break } } @@ -401,7 +401,7 @@ proc mi_gdb_file_cmd { arg } { set last_loaded_file $arg if [is_remote host] { - set arg [remote_download host $arg]; + set arg [remote_download host $arg] if { $arg == "" } { error "download failed" return -1 @@ -591,8 +591,8 @@ proc mi_gdb_test { args } { } if [llength $args]==5 { - set question_string [lindex $args 3]; - set response_string [lindex $args 4]; + set question_string [lindex $args 3] + set response_string [lindex $args 4] } else { set question_string "^FOOBAR$" } @@ -604,54 +604,54 @@ proc mi_gdb_test { args } { } set result -1 - set string "${command}\n"; + set string "${command}\n" set string_regex [string_to_regexp $command] if { $command != "" } { while { "$string" != "" } { - set foo [string first "\n" "$string"]; - set len [string length "$string"]; + set foo [string first "\n" "$string"] + set len [string length "$string"] if { $foo < [expr $len - 1] } { - set str [string range "$string" 0 $foo]; + set str [string range "$string" 0 $foo] if { [send_gdb "$str"] != "" } { - global suppress_flag; + global suppress_flag if { ! $suppress_flag } { - perror "Couldn't send $command to GDB."; + perror "Couldn't send $command to GDB." } - fail "$message"; + fail "$message" return $result } gdb_expect 2 { -re "\[\r\n\]" { } timeout { } } - set string [string range "$string" [expr $foo + 1] end]; + set string [string range "$string" [expr $foo + 1] end] } else { - break; + break } } if { "$string" != "" } { if { [send_gdb "$string"] != "" } { - global suppress_flag; + global suppress_flag if { ! $suppress_flag } { - perror "Couldn't send $command to GDB."; + perror "Couldn't send $command to GDB." } - fail "$message"; + fail "$message" return $result } } } if [info exists timeout] { - set tmt $timeout; + set tmt $timeout } else { - global timeout; + global timeout if [info exists timeout] { - set tmt $timeout; + set tmt $timeout } else { - set tmt 60; + set tmt 60 } } if {$async} { @@ -663,9 +663,9 @@ proc mi_gdb_test { args } { gdb_expect $tmt { -re "\\*\\*\\* DOSEXIT code.*" { if { $message != "" } { - fail "$message"; + fail "$message" } - gdb_suppress_entire_file "GDB died"; + gdb_suppress_entire_file "GDB died" return -1 } -re "Ending remote debugging.*$mi_gdb_prompt\[ \]*$" { @@ -695,8 +695,8 @@ proc mi_gdb_test { args } { set result 0 } -re "(${question_string})$" { - send_gdb "$response_string\n"; - exp_continue; + send_gdb "$response_string\n" + exp_continue } -re "Undefined.* command:.*$mi_gdb_prompt\[ \]*$" { perror "Undefined command \"$command\"." @@ -809,11 +809,11 @@ proc mi_run_cmd_full {use_mi_command args} { } if [target_info exists gdb_init_command] { - send_gdb "[target_info gdb_init_command]\n"; + send_gdb "[target_info gdb_init_command]\n" gdb_expect 30 { -re "$mi_gdb_prompt$" { } default { - perror "gdb_init_command for target failed"; + perror "gdb_init_command for target failed" return -1 } } @@ -825,7 +825,7 @@ proc mi_run_cmd_full {use_mi_command args} { if $use_gdb_stub { if [target_info exists gdb,do_reload_on_run] { - send_gdb "${run_prefix}continue\n"; + send_gdb "${run_prefix}continue\n" gdb_expect 60 { -re "${run_match}\\^running\[\r\n\]+\\*running,thread-id=\"\[^\"\]+\"\r\n$mi_gdb_prompt" {} default {} @@ -834,9 +834,9 @@ proc mi_run_cmd_full {use_mi_command args} { } if [target_info exists gdb,start_symbol] { - set start [target_info gdb,start_symbol]; + set start [target_info gdb,start_symbol] } else { - set start "start"; + set start "start" } # HACK: Should either use 000-jump or fix the target code diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp index 7e52233..784ab6c 100644 --- a/gdb/testsuite/lib/pascal.exp +++ b/gdb/testsuite/lib/pascal.exp @@ -86,7 +86,7 @@ proc gpc_compile {source dest type options} { foreach i $options { if { $i == "debug" } { if [board_info $dest exists debug_flags] { - append add_flags " [board_info $dest debug_flags]"; + append add_flags " [board_info $dest debug_flags]" } else { append add_flags " -g" } @@ -115,7 +115,7 @@ proc fpc_compile {source dest type options} { foreach i $options { if { $i == "debug" } { if [board_info $dest exists debug_flags] { - append add_flags " [board_info $dest debug_flags]"; + append add_flags " [board_info $dest debug_flags]" } else { append add_flags " -g" } diff --git a/gdb/testsuite/lib/prompt.exp b/gdb/testsuite/lib/prompt.exp index 87d889c..63b05fa 100644 --- a/gdb/testsuite/lib/prompt.exp +++ b/gdb/testsuite/lib/prompt.exp @@ -30,9 +30,9 @@ proc default_prompt_gdb_start { } { global gdb_prompt global gdb_prompt_fail global timeout - global gdb_spawn_id; + global gdb_spawn_id - gdb_stop_suppressing_tests; + gdb_stop_suppressing_tests verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS" @@ -46,7 +46,7 @@ proc default_prompt_gdb_start { } { exit 1 } } - set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]"]; + set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]"] if { $res < 0 || $res == "" } { perror "Spawning $GDB failed." return 1 @@ -74,11 +74,11 @@ proc default_prompt_gdb_start { } { } timeout { perror "(timeout) GDB never initialized after 10 seconds." - remote_close host; + remote_close host return -1 } } - set gdb_spawn_id -1; + set gdb_spawn_id -1 return 0 } diff --git a/gdb/testsuite/lib/trace-support.exp b/gdb/testsuite/lib/trace-support.exp index 2601ad8..4ffd01c 100644 --- a/gdb/testsuite/lib/trace-support.exp +++ b/gdb/testsuite/lib/trace-support.exp @@ -69,7 +69,7 @@ proc gdb_delete_tracepoints {} { send_gdb "delete tracepoints\n" gdb_expect 30 { -re "Delete all tracepoints.*y or n.*$" { - send_gdb "y\n"; + send_gdb "y\n" exp_continue } -re ".*$gdb_prompt $" { # This happens if there were no tracepoints } @@ -98,12 +98,12 @@ proc gdb_delete_tracepoints {} { # non-zero -- failure proc gdb_trace_setactions_command { actions_command testname tracepoint args } { - global gdb_prompt; + global gdb_prompt - set state 0; - set passfail "pass"; - send_gdb "$actions_command $tracepoint\n"; - set expected_result ""; + set state 0 + set passfail "pass" + send_gdb "$actions_command $tracepoint\n" + set expected_result "" gdb_expect 5 { -re "No tracepoint number .*$gdb_prompt $" { fail $testname @@ -111,52 +111,52 @@ proc gdb_trace_setactions_command { actions_command testname tracepoint args } { } -re "Enter actions for tracepoint $tracepoint.*>" { if { [llength $args] > 0 } { - set lastcommand "[lindex $args $state]"; - send_gdb "[lindex $args $state]\n"; - incr state; - set expected_result [lindex $args $state]; - incr state; + set lastcommand "[lindex $args $state]" + send_gdb "[lindex $args $state]\n" + incr state + set expected_result [lindex $args $state] + incr state } else { - send_gdb "end\n"; + send_gdb "end\n" } - exp_continue; + exp_continue } -re "\(.*\)\[\r\n\]+\[ \t]*>$" { if { $expected_result != "" } { - regsub "^\[^\r\n\]+\[\r\n\]+" "$expect_out(1,string)" "" out; + regsub "^\[^\r\n\]+\[\r\n\]+" "$expect_out(1,string)" "" out if ![regexp $expected_result $out] { - set passfail "fail"; + set passfail "fail" } - set expected_result ""; + set expected_result "" } if { $state < [llength $args] } { - send_gdb "[lindex $args $state]\n"; - incr state; - set expected_result [lindex $args $state]; - incr state; + send_gdb "[lindex $args $state]\n" + incr state + set expected_result [lindex $args $state] + incr state } else { - send_gdb "end\n"; - set expected_result ""; + send_gdb "end\n" + set expected_result "" } - exp_continue; + exp_continue } -re "\(.*\)$gdb_prompt $" { if { $expected_result != "" } { if ![regexp $expected_result $expect_out(1,string)] { - set passfail "fail"; + set passfail "fail" } - set expected_result ""; + set expected_result "" } if { [llength $args] < $state } { - set passfail "fail"; + set passfail "fail" } } default { - set passfail "fail"; + set passfail "fail" } } if { $testname != "" } { - $passfail $testname; + $passfail $testname } if { $passfail == "pass" } then { return 0 @@ -193,28 +193,28 @@ proc gdb_trace_setcommands { testname tracepoint args } { # proc gdb_tfind_test { testname tfind_arg exp_res args } { - global gdb_prompt; + global gdb_prompt if { "$args" != "" } { - set expr "$exp_res"; - set exp_res "$args"; + set expr "$exp_res" + set exp_res "$args" } else { - set expr "(int) \$trace_frame"; + set expr "(int) \$trace_frame" } - set passfail "fail"; + set passfail "fail" gdb_test "tfind $tfind_arg" "" "" - send_gdb "printf \"x \%d x\\n\", $expr\n"; + send_gdb "printf \"x \%d x\\n\", $expr\n" gdb_expect 10 { -re "x (-*\[0-9\]+) x" { if { $expect_out(1,string) == $exp_res } { - set passfail "pass"; + set passfail "pass" } - exp_continue; + exp_continue } -re "$gdb_prompt $" { } } - $passfail "$testname"; + $passfail "$testname" if { $passfail == "pass" } then { return 0 } else { @@ -232,13 +232,13 @@ proc gdb_tfind_test { testname tfind_arg exp_res args } { # proc gdb_readexpr { gdb_expr } { - global gdb_prompt; + global gdb_prompt - set result -1; + set result -1 send_gdb "print $gdb_expr\n" gdb_expect 5 { -re "\[$\].*= (\[0-9\]+).*$gdb_prompt $" { - set result $expect_out(1,string); + set result $expect_out(1,string) } -re "$gdb_prompt $" { } default { } @@ -255,7 +255,7 @@ proc gdb_readexpr { gdb_expr } { # proc gdb_gettpnum { tracepoint } { - global gdb_prompt; + global gdb_prompt if { $tracepoint != "" } { gdb_test "trace $tracepoint" "" "" @@ -276,9 +276,9 @@ proc gdb_gettpnum { tracepoint } { # proc gdb_find_function_baseline { func_name } { - global gdb_prompt; + global gdb_prompt - set baseline -1; + set baseline -1 send_gdb "list $func_name\n" # gdb_expect { @@ -300,15 +300,15 @@ proc gdb_find_function_baseline { func_name } { # proc gdb_find_recursion_test_baseline { filename } { - global gdb_prompt; + global gdb_prompt - set baseline -1; + set baseline -1 gdb_test "list $filename:1" "" "" send_gdb "search gdb_recursion_test line 0\n" gdb_expect { -re "(\[0-9\]+)\[\t \]+\{.*line 0.*$gdb_prompt $" { - set baseline $expect_out(1,string); + set baseline $expect_out(1,string) } -re "$gdb_prompt $" { } default { } |