mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
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:
@ -30,13 +30,13 @@ load_lib libgloss.exp
|
||||
global GDB
|
||||
|
||||
if [info exists TOOL_EXECUTABLE] {
|
||||
set GDB $TOOL_EXECUTABLE;
|
||||
set GDB $TOOL_EXECUTABLE
|
||||
}
|
||||
if ![info exists GDB] {
|
||||
if ![is_remote host] {
|
||||
set GDB [findfile $base_dir/../../gdb/gdb "$base_dir/../../gdb/gdb" [transform gdb]]
|
||||
} else {
|
||||
set GDB [transform gdb];
|
||||
set GDB [transform gdb]
|
||||
}
|
||||
}
|
||||
verbose "using GDB = $GDB" 2
|
||||
@ -112,7 +112,7 @@ proc default_gdb_version {} {
|
||||
global INTERNAL_GDBFLAGS GDBFLAGS
|
||||
global gdb_prompt
|
||||
set output [remote_exec host "$GDB $INTERNAL_GDBFLAGS --version"]
|
||||
set tmp [lindex $output 1];
|
||||
set tmp [lindex $output 1]
|
||||
set version ""
|
||||
regexp " \[0-9\]\[^ \t\n\r\]+" "$tmp" version
|
||||
if ![is_remote host] {
|
||||
@ -171,7 +171,7 @@ proc delete_breakpoints {} {
|
||||
send_gdb "delete breakpoints\n"
|
||||
gdb_expect 100 {
|
||||
-re "Delete all breakpoints.*y or n.*$" {
|
||||
send_gdb "y\n";
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
}
|
||||
-re "$gdb_prompt $" { # This happens if there were no breakpoints
|
||||
@ -183,7 +183,7 @@ proc delete_breakpoints {} {
|
||||
-re "No breakpoints or watchpoints..*$gdb_prompt $" {}
|
||||
-re "$gdb_prompt $" { perror "breakpoints not deleted" ; return }
|
||||
-re "Delete all breakpoints.*or n.*$" {
|
||||
send_gdb "y\n";
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
}
|
||||
timeout { perror "info breakpoints (timeout)" ; return }
|
||||
@ -203,12 +203,12 @@ proc gdb_run_cmd {args} {
|
||||
global gdb_prompt use_gdb_stub
|
||||
|
||||
if [target_info exists gdb_init_command] {
|
||||
send_gdb "[target_info gdb_init_command]\n";
|
||||
send_gdb "[target_info gdb_init_command]\n"
|
||||
gdb_expect 30 {
|
||||
-re "$gdb_prompt $" { }
|
||||
default {
|
||||
perror "gdb_init_command for target failed";
|
||||
return;
|
||||
perror "gdb_init_command for target failed"
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -216,57 +216,57 @@ proc gdb_run_cmd {args} {
|
||||
if $use_gdb_stub {
|
||||
if [target_info exists gdb,do_reload_on_run] {
|
||||
if { [gdb_reload] != 0 } {
|
||||
return;
|
||||
return
|
||||
}
|
||||
send_gdb "continue\n";
|
||||
send_gdb "continue\n"
|
||||
gdb_expect 60 {
|
||||
-re "Continu\[^\r\n\]*\[\r\n\]" {}
|
||||
default {}
|
||||
}
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
if [target_info exists gdb,start_symbol] {
|
||||
set start [target_info gdb,start_symbol];
|
||||
set start [target_info gdb,start_symbol]
|
||||
} else {
|
||||
set start "start";
|
||||
set start "start"
|
||||
}
|
||||
send_gdb "jump *$start\n"
|
||||
set start_attempt 1;
|
||||
set start_attempt 1
|
||||
while { $start_attempt } {
|
||||
# Cap (re)start attempts at three to ensure that this loop
|
||||
# always eventually fails. Don't worry about trying to be
|
||||
# clever and not send a command when it has failed.
|
||||
if [expr $start_attempt > 3] {
|
||||
perror "Jump to start() failed (retry count exceeded)";
|
||||
return;
|
||||
perror "Jump to start() failed (retry count exceeded)"
|
||||
return
|
||||
}
|
||||
set start_attempt [expr $start_attempt + 1];
|
||||
set start_attempt [expr $start_attempt + 1]
|
||||
gdb_expect 30 {
|
||||
-re "Continuing at \[^\r\n\]*\[\r\n\]" {
|
||||
set start_attempt 0;
|
||||
set start_attempt 0
|
||||
}
|
||||
-re "No symbol \"_start\" in current.*$gdb_prompt $" {
|
||||
perror "Can't find start symbol to run in gdb_run";
|
||||
return;
|
||||
perror "Can't find start symbol to run in gdb_run"
|
||||
return
|
||||
}
|
||||
-re "No symbol \"start\" in current.*$gdb_prompt $" {
|
||||
send_gdb "jump *_start\n";
|
||||
send_gdb "jump *_start\n"
|
||||
}
|
||||
-re "No symbol.*context.*$gdb_prompt $" {
|
||||
set start_attempt 0;
|
||||
set start_attempt 0
|
||||
}
|
||||
-re "Line.* Jump anyway.*y or n. $" {
|
||||
send_gdb "y\n"
|
||||
}
|
||||
-re "The program is not being run.*$gdb_prompt $" {
|
||||
if { [gdb_reload] != 0 } {
|
||||
return;
|
||||
return
|
||||
}
|
||||
send_gdb "jump *$start\n";
|
||||
send_gdb "jump *$start\n"
|
||||
}
|
||||
timeout {
|
||||
perror "Jump to start() failed (timeout)";
|
||||
perror "Jump to start() failed (timeout)"
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -276,7 +276,7 @@ proc gdb_run_cmd {args} {
|
||||
|
||||
if [target_info exists gdb,do_reload_on_run] {
|
||||
if { [gdb_reload] != 0 } {
|
||||
return;
|
||||
return
|
||||
}
|
||||
}
|
||||
send_gdb "run $args\n"
|
||||
@ -305,11 +305,11 @@ proc gdb_start_cmd {args} {
|
||||
global gdb_prompt use_gdb_stub
|
||||
|
||||
if [target_info exists gdb_init_command] {
|
||||
send_gdb "[target_info gdb_init_command]\n";
|
||||
send_gdb "[target_info gdb_init_command]\n"
|
||||
gdb_expect 30 {
|
||||
-re "$gdb_prompt $" { }
|
||||
default {
|
||||
perror "gdb_init_command for target failed";
|
||||
perror "gdb_init_command for target failed"
|
||||
return -1
|
||||
}
|
||||
}
|
||||
@ -743,21 +743,21 @@ proc gdb_test_multiple { command message user_code } {
|
||||
}
|
||||
|
||||
set result -1
|
||||
set string "${command}\n";
|
||||
set string "${command}\n"
|
||||
if { $command != "" } {
|
||||
set multi_line_re "\[\r\n\] *>"
|
||||
while { "$string" != "" } {
|
||||
set foo [string first "\n" "$string"];
|
||||
set len [string length "$string"];
|
||||
set foo [string first "\n" "$string"]
|
||||
set len [string length "$string"]
|
||||
if { $foo < [expr $len - 1] } {
|
||||
set str [string range "$string" 0 $foo];
|
||||
set str [string range "$string" 0 $foo]
|
||||
if { [send_gdb "$str"] != "" } {
|
||||
global suppress_flag;
|
||||
global suppress_flag
|
||||
|
||||
if { ! $suppress_flag } {
|
||||
perror "Couldn't send $command to GDB.";
|
||||
perror "Couldn't send $command to GDB."
|
||||
}
|
||||
fail "$message";
|
||||
fail "$message"
|
||||
return $result
|
||||
}
|
||||
# since we're checking if each line of the multi-line
|
||||
@ -769,36 +769,36 @@ proc gdb_test_multiple { command message user_code } {
|
||||
-notransfer -re "$multi_line_re$" { verbose "partial: match" 3 }
|
||||
timeout { verbose "partial: timeout" 3 }
|
||||
}
|
||||
set string [string range "$string" [expr $foo + 1] end];
|
||||
set string [string range "$string" [expr $foo + 1] end]
|
||||
set multi_line_re "$multi_line_re.*\[\r\n\] *>"
|
||||
} else {
|
||||
break;
|
||||
break
|
||||
}
|
||||
}
|
||||
if { "$string" != "" } {
|
||||
if { [send_gdb "$string"] != "" } {
|
||||
global suppress_flag;
|
||||
global suppress_flag
|
||||
|
||||
if { ! $suppress_flag } {
|
||||
perror "Couldn't send $command to GDB.";
|
||||
perror "Couldn't send $command to GDB."
|
||||
}
|
||||
fail "$message";
|
||||
fail "$message"
|
||||
return $result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if [target_info exists gdb,timeout] {
|
||||
set tmt [target_info gdb,timeout];
|
||||
set tmt [target_info gdb,timeout]
|
||||
} else {
|
||||
if [info exists timeout] {
|
||||
set tmt $timeout;
|
||||
set tmt $timeout
|
||||
} else {
|
||||
global timeout;
|
||||
global timeout
|
||||
if [info exists timeout] {
|
||||
set tmt $timeout;
|
||||
set tmt $timeout
|
||||
} else {
|
||||
set tmt 60;
|
||||
set tmt 60
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -810,10 +810,10 @@ proc gdb_test_multiple { command message user_code } {
|
||||
}
|
||||
-re "\\*\\*\\* DOSEXIT code.*" {
|
||||
if { $message != "" } {
|
||||
fail "$message";
|
||||
fail "$message"
|
||||
}
|
||||
gdb_suppress_entire_file "GDB died";
|
||||
set result -1;
|
||||
gdb_suppress_entire_file "GDB died"
|
||||
set result -1
|
||||
}
|
||||
}
|
||||
append code $processed_code
|
||||
@ -910,7 +910,7 @@ proc gdb_test_multiple { command message user_code } {
|
||||
set result 0
|
||||
set code [catch {gdb_expect $tmt $code} string]
|
||||
if {$code == 1} {
|
||||
global errorInfo errorCode;
|
||||
global errorInfo errorCode
|
||||
return -code error -errorinfo $errorInfo -errorcode $errorCode $string
|
||||
} elseif {$code > 1} {
|
||||
return -code $code $string
|
||||
@ -953,8 +953,8 @@ proc gdb_test { args } {
|
||||
set pattern [lindex $args 1]
|
||||
|
||||
if [llength $args]==5 {
|
||||
set question_string [lindex $args 3];
|
||||
set response_string [lindex $args 4];
|
||||
set question_string [lindex $args 3]
|
||||
set response_string [lindex $args 4]
|
||||
} else {
|
||||
set question_string "^FOOBAR$"
|
||||
}
|
||||
@ -966,8 +966,8 @@ proc gdb_test { args } {
|
||||
}
|
||||
}
|
||||
-re "(${question_string})$" {
|
||||
send_gdb "$response_string\n";
|
||||
exp_continue;
|
||||
send_gdb "$response_string\n"
|
||||
exp_continue
|
||||
}
|
||||
}]
|
||||
}
|
||||
@ -1244,22 +1244,22 @@ proc default_gdb_exit {} {
|
||||
global GDB
|
||||
global INTERNAL_GDBFLAGS GDBFLAGS
|
||||
global verbose
|
||||
global gdb_spawn_id;
|
||||
global gdb_spawn_id
|
||||
|
||||
gdb_stop_suppressing_tests;
|
||||
gdb_stop_suppressing_tests
|
||||
|
||||
if ![info exists gdb_spawn_id] {
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
verbose "Quitting $GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
|
||||
|
||||
if { [is_remote host] && [board_info host exists fileid] } {
|
||||
send_gdb "quit\n";
|
||||
send_gdb "quit\n"
|
||||
gdb_expect 10 {
|
||||
-re "y or n" {
|
||||
send_gdb "y\n";
|
||||
exp_continue;
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
}
|
||||
-re "DOSEXIT code" { }
|
||||
default { }
|
||||
@ -1267,7 +1267,7 @@ proc default_gdb_exit {} {
|
||||
}
|
||||
|
||||
if ![is_remote host] {
|
||||
remote_close host;
|
||||
remote_close host
|
||||
}
|
||||
unset gdb_spawn_id
|
||||
}
|
||||
@ -1402,9 +1402,9 @@ proc default_gdb_start { } {
|
||||
global INTERNAL_GDBFLAGS GDBFLAGS
|
||||
global gdb_prompt
|
||||
global timeout
|
||||
global gdb_spawn_id;
|
||||
global gdb_spawn_id
|
||||
|
||||
gdb_stop_suppressing_tests;
|
||||
gdb_stop_suppressing_tests
|
||||
|
||||
# Set the default value, it may be overriden later by specific testfile.
|
||||
#
|
||||
@ -1427,7 +1427,7 @@ proc default_gdb_start { } {
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]"];
|
||||
set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]"]
|
||||
if { $res < 0 || $res == "" } {
|
||||
perror "Spawning $GDB failed."
|
||||
return 1
|
||||
@ -1442,11 +1442,11 @@ proc default_gdb_start { } {
|
||||
}
|
||||
timeout {
|
||||
perror "(timeout) GDB never initialized after 10 seconds."
|
||||
remote_close host;
|
||||
remote_close host
|
||||
return -1
|
||||
}
|
||||
}
|
||||
set gdb_spawn_id -1;
|
||||
set gdb_spawn_id -1
|
||||
# force the height to "unlimited", so no pagers get used
|
||||
|
||||
send_gdb "set height 0\n"
|
||||
@ -2505,19 +2505,19 @@ set gdb_wrapper_initialized 0
|
||||
set gdb_wrapper_target ""
|
||||
|
||||
proc gdb_wrapper_init { args } {
|
||||
global gdb_wrapper_initialized;
|
||||
global gdb_wrapper_file;
|
||||
global gdb_wrapper_flags;
|
||||
global gdb_wrapper_initialized
|
||||
global gdb_wrapper_file
|
||||
global gdb_wrapper_flags
|
||||
global gdb_wrapper_target
|
||||
|
||||
if { $gdb_wrapper_initialized == 1 } { return; }
|
||||
|
||||
if {[target_info exists needs_status_wrapper] && \
|
||||
[target_info needs_status_wrapper] != "0"} {
|
||||
set result [build_wrapper "testglue.o"];
|
||||
set result [build_wrapper "testglue.o"]
|
||||
if { $result != "" } {
|
||||
set gdb_wrapper_file [lindex $result 0];
|
||||
set gdb_wrapper_flags [lindex $result 1];
|
||||
set gdb_wrapper_file [lindex $result 0]
|
||||
set gdb_wrapper_flags [lindex $result 1]
|
||||
} else {
|
||||
warning "Status wrapper failed to build."
|
||||
}
|
||||
@ -2531,10 +2531,10 @@ global gdb_saved_set_unbuffered_mode_obj
|
||||
set gdb_saved_set_unbuffered_mode_obj ""
|
||||
|
||||
proc gdb_compile {source dest type options} {
|
||||
global GDB_TESTCASE_OPTIONS;
|
||||
global gdb_wrapper_file;
|
||||
global gdb_wrapper_flags;
|
||||
global gdb_wrapper_initialized;
|
||||
global GDB_TESTCASE_OPTIONS
|
||||
global gdb_wrapper_file
|
||||
global gdb_wrapper_flags
|
||||
global gdb_wrapper_initialized
|
||||
global srcdir
|
||||
global objdir
|
||||
global gdb_saved_set_unbuffered_mode_obj
|
||||
@ -2604,7 +2604,7 @@ proc gdb_compile {source dest type options} {
|
||||
set options [concat $options2 $options]
|
||||
}
|
||||
if [info exists GDB_TESTCASE_OPTIONS] {
|
||||
lappend options "additional_flags=$GDB_TESTCASE_OPTIONS";
|
||||
lappend options "additional_flags=$GDB_TESTCASE_OPTIONS"
|
||||
}
|
||||
verbose "options are $options"
|
||||
verbose "source is $source $dest $type $options"
|
||||
@ -2673,13 +2673,13 @@ proc gdb_compile {source dest type options} {
|
||||
}
|
||||
}
|
||||
|
||||
set result [target_compile $source $dest $type $options];
|
||||
set result [target_compile $source $dest $type $options]
|
||||
|
||||
# Prune uninteresting compiler (and linker) output.
|
||||
regsub "Creating library file: \[^\r\n\]*\[\r\n\]+" $result "" result
|
||||
|
||||
regsub "\[\r\n\]*$" "$result" "" result;
|
||||
regsub "^\[\r\n\]*" "$result" "" result;
|
||||
regsub "\[\r\n\]*$" "$result" "" result
|
||||
regsub "^\[\r\n\]*" "$result" "" result
|
||||
|
||||
if {[lsearch $options quiet] < 0} {
|
||||
# We shall update this on a per language basis, to avoid
|
||||
@ -2881,7 +2881,7 @@ proc gdb_compile_objc {source dest type options} {
|
||||
}
|
||||
|
||||
proc send_gdb { string } {
|
||||
global suppress_flag;
|
||||
global suppress_flag
|
||||
if { $suppress_flag } {
|
||||
return "suppressed"
|
||||
}
|
||||
@ -2893,66 +2893,66 @@ proc send_gdb { string } {
|
||||
|
||||
proc gdb_expect { args } {
|
||||
if { [llength $args] == 2 && [lindex $args 0] != "-re" } {
|
||||
set atimeout [lindex $args 0];
|
||||
set expcode [list [lindex $args 1]];
|
||||
set atimeout [lindex $args 0]
|
||||
set expcode [list [lindex $args 1]]
|
||||
} else {
|
||||
set expcode $args;
|
||||
set expcode $args
|
||||
}
|
||||
|
||||
upvar timeout timeout;
|
||||
upvar timeout timeout
|
||||
|
||||
if [target_info exists gdb,timeout] {
|
||||
if [info exists timeout] {
|
||||
if { $timeout < [target_info gdb,timeout] } {
|
||||
set gtimeout [target_info gdb,timeout];
|
||||
set gtimeout [target_info gdb,timeout]
|
||||
} else {
|
||||
set gtimeout $timeout;
|
||||
set gtimeout $timeout
|
||||
}
|
||||
} else {
|
||||
set gtimeout [target_info gdb,timeout];
|
||||
set gtimeout [target_info gdb,timeout]
|
||||
}
|
||||
}
|
||||
|
||||
if ![info exists gtimeout] {
|
||||
global timeout;
|
||||
global timeout
|
||||
if [info exists timeout] {
|
||||
set gtimeout $timeout;
|
||||
set gtimeout $timeout
|
||||
}
|
||||
}
|
||||
|
||||
if [info exists atimeout] {
|
||||
if { ![info exists gtimeout] || $gtimeout < $atimeout } {
|
||||
set gtimeout $atimeout;
|
||||
set gtimeout $atimeout
|
||||
}
|
||||
} else {
|
||||
if ![info exists gtimeout] {
|
||||
# Eeeeew.
|
||||
set gtimeout 60;
|
||||
set gtimeout 60
|
||||
}
|
||||
}
|
||||
|
||||
global suppress_flag;
|
||||
global remote_suppress_flag;
|
||||
global suppress_flag
|
||||
global remote_suppress_flag
|
||||
if [info exists remote_suppress_flag] {
|
||||
set old_val $remote_suppress_flag;
|
||||
set old_val $remote_suppress_flag
|
||||
}
|
||||
if [info exists suppress_flag] {
|
||||
if { $suppress_flag } {
|
||||
set remote_suppress_flag 1;
|
||||
set remote_suppress_flag 1
|
||||
}
|
||||
}
|
||||
set code [catch \
|
||||
{uplevel remote_expect host $gtimeout $expcode} string];
|
||||
{uplevel remote_expect host $gtimeout $expcode} string]
|
||||
if [info exists old_val] {
|
||||
set remote_suppress_flag $old_val;
|
||||
set remote_suppress_flag $old_val
|
||||
} else {
|
||||
if [info exists remote_suppress_flag] {
|
||||
unset remote_suppress_flag;
|
||||
unset remote_suppress_flag
|
||||
}
|
||||
}
|
||||
|
||||
if {$code == 1} {
|
||||
global errorInfo errorCode;
|
||||
global errorInfo errorCode
|
||||
|
||||
return -code error -errorinfo $errorInfo -errorcode $errorCode $string
|
||||
} else {
|
||||
@ -3045,10 +3045,10 @@ proc gdb_expect_list {test sentinel list} {
|
||||
#
|
||||
#
|
||||
proc gdb_suppress_entire_file { reason } {
|
||||
global suppress_flag;
|
||||
global suppress_flag
|
||||
|
||||
warning "$reason\n";
|
||||
set suppress_flag -1;
|
||||
warning "$reason\n"
|
||||
set suppress_flag -1
|
||||
}
|
||||
|
||||
#
|
||||
@ -3057,17 +3057,17 @@ proc gdb_suppress_entire_file { reason } {
|
||||
# gdb_stop_suppressing_tests).
|
||||
#
|
||||
proc gdb_suppress_tests { args } {
|
||||
global suppress_flag;
|
||||
global suppress_flag
|
||||
|
||||
return; # fnf - disable pending review of results where
|
||||
# testsuite ran better without this
|
||||
incr suppress_flag;
|
||||
incr suppress_flag
|
||||
|
||||
if { $suppress_flag == 1 } {
|
||||
if { [llength $args] > 0 } {
|
||||
warning "[lindex $args 0]\n";
|
||||
warning "[lindex $args 0]\n"
|
||||
} else {
|
||||
warning "Because of previous failure, all subsequent tests in this group will automatically fail.\n";
|
||||
warning "Because of previous failure, all subsequent tests in this group will automatically fail.\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3076,22 +3076,22 @@ proc gdb_suppress_tests { args } {
|
||||
# Clear suppress_flag.
|
||||
#
|
||||
proc gdb_stop_suppressing_tests { } {
|
||||
global suppress_flag;
|
||||
global suppress_flag
|
||||
|
||||
if [info exists suppress_flag] {
|
||||
if { $suppress_flag > 0 } {
|
||||
set suppress_flag 0;
|
||||
clone_output "Tests restarted.\n";
|
||||
set suppress_flag 0
|
||||
clone_output "Tests restarted.\n"
|
||||
}
|
||||
} else {
|
||||
set suppress_flag 0;
|
||||
set suppress_flag 0
|
||||
}
|
||||
}
|
||||
|
||||
proc gdb_clear_suppressed { } {
|
||||
global suppress_flag;
|
||||
global suppress_flag
|
||||
|
||||
set suppress_flag 0;
|
||||
set suppress_flag 0
|
||||
}
|
||||
|
||||
proc gdb_start { } {
|
||||
@ -3337,7 +3337,7 @@ proc default_gdb_init { args } {
|
||||
|
||||
set cleanfiles {}
|
||||
|
||||
gdb_clear_suppressed;
|
||||
gdb_clear_suppressed
|
||||
|
||||
set gdb_test_file_name [file rootname [file tail [lindex $args 0]]]
|
||||
|
||||
@ -3358,13 +3358,13 @@ proc default_gdb_init { args } {
|
||||
if { [llength $args] > 0 } {
|
||||
global pf_prefix
|
||||
|
||||
set file [lindex $args 0];
|
||||
set file [lindex $args 0]
|
||||
|
||||
set pf_prefix "[file tail [file dirname $file]]/[file tail $file]:";
|
||||
set pf_prefix "[file tail [file dirname $file]]/[file tail $file]:"
|
||||
}
|
||||
global gdb_prompt;
|
||||
global gdb_prompt
|
||||
if [target_info exists gdb_prompt] {
|
||||
set gdb_prompt [target_info gdb_prompt];
|
||||
set gdb_prompt [target_info gdb_prompt]
|
||||
} else {
|
||||
set gdb_prompt "\\(gdb\\)"
|
||||
}
|
||||
@ -3619,7 +3619,7 @@ proc test_debug_format {format} {
|
||||
# expected to fail, 0 otherwise (or if it is unknown). Must have
|
||||
# previously called get_debug_format.
|
||||
proc setup_xfail_format { format } {
|
||||
set ret [test_debug_format $format];
|
||||
set ret [test_debug_format $format]
|
||||
|
||||
if {$ret} then {
|
||||
setup_xfail "*-*-*"
|
||||
@ -3807,7 +3807,7 @@ proc rerun_to_main {} {
|
||||
|
||||
proc gdb_skip_float_test { msg } {
|
||||
if [target_info exists gdb,skip_float_tests] {
|
||||
verbose "Skipping test '$msg': no float tests.";
|
||||
verbose "Skipping test '$msg': no float tests."
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
@ -3818,7 +3818,7 @@ proc gdb_skip_float_test { msg } {
|
||||
|
||||
proc gdb_skip_stdio_test { msg } {
|
||||
if [target_info exists gdb,noinferiorio] {
|
||||
verbose "Skipping test '$msg': no inferior i/o.";
|
||||
verbose "Skipping test '$msg': no inferior i/o."
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
|
Reference in New Issue
Block a user