Remove superfluous semicolons from testsuite throughout.

A few months ago semicolons after "return" were removed throughout the
testsuite.  However, as I pointed out in review, they're unnecessary
not just after "return", but pretty much after any tcl command.  ';'
is the command separator, and you only need it if there's another
command on the same line afterwards.

This patch was written by running:

 $ find . -name "*.exp" | xargs grep -l ";\s*$" | xargs sed -i 's/\([^#][^\s*;]*\)\s*;\s*$/\1/'

and then undoing changes to comments, and lib/future.exp.

Tested on x86_64 Fedora 17.

gdb/testsuite/
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.
This commit is contained in:
Pedro Alves 2013-06-07 17:31:09 +00:00
parent c5da8c7d17
commit 4ec7020176
114 changed files with 870 additions and 754 deletions

View file

@ -1,3 +1,119 @@
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.

View file

@ -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

View file

@ -1 +1 @@
load_lib "../config/monitor.exp";
load_lib "../config/monitor.exp"

View file

@ -1 +1 @@
load_lib "../config/monitor.exp";
load_lib "../config/monitor.exp"

View file

@ -1 +1 @@
load_lib "../config/monitor.exp";
load_lib "../config/monitor.exp"

View file

@ -1 +1 @@
load_lib "../config/monitor.exp";
load_lib "../config/monitor.exp"

View file

@ -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
}

View file

@ -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

View file

@ -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

View file

@ -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 $" {

View file

@ -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
}

View file

@ -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)
}
}

View file

@ -194,7 +194,7 @@ if [board_info $dest exists multilib_flags] {
if { "${multilib_flags}" != "" } {
untested asm-source.exp
return -1
return;
return
}
}

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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.

View file

@ -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

View file

@ -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"} {

View file

@ -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

View file

@ -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

View file

@ -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"
}

View file

@ -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
}

View file

@ -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

View file

@ -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

View file

@ -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 $" {

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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"

View file

@ -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
}
#

View file

@ -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 $" { }

View file

@ -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

View file

@ -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}"

View file

@ -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

View file

@ -23,7 +23,7 @@ global GDBFLAGS
# Skip test if target does not support argument passing.
if [target_info exists noargs] {
return;
return
}
#

View file

@ -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
}
}

View file

@ -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 } {

View file

@ -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.

View file

@ -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

View file

@ -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
}
#

View file

@ -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
}
}

View file

@ -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

View file

@ -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.

View file

@ -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.

View file

@ -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)

View file

@ -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.

View file

@ -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)

View file

@ -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

View file

@ -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"]

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 {

View file

@ -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
}
}

View file

@ -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;"

View file

@ -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 {} {

View file

@ -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"

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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"

View file

@ -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
}
}
}

View file

@ -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
}
}

View file

@ -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 } {

View file

@ -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"

View file

@ -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

View file

@ -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
}

View file

@ -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 } {

View file

@ -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
}
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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" \

View file

@ -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

View file

@ -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" \

View file

@ -15,7 +15,7 @@
# Test of disconnected-tracing.
load_lib "trace-support.exp";
load_lib "trace-support.exp"
standard_testfile
set executable $testfile

View file

@ -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

View file

@ -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)

View file

@ -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" \

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -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" \

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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

Some files were not shown because too many files have changed in this diff Show more