Running tclint on the test-cases in gdb.multi shows a few problems.
Fix these.
Tested on x86_64-linux.
# The 64-bit compile may succeed for i386-linux, but gdb won't be able
# to load the file.
-if [istarget "i?86-*linux*"] {
+if {[istarget "i?86-*linux*"]} {
return
}
}
}
- if [istarget "powerpc64*-*-*"] {
+ if {[istarget "powerpc64*-*-*"]} {
set march "-m64"
- } elseif [istarget "s390*-*-*"] {
+ } elseif {[istarget "s390*-*-*"]} {
set march "-m31"
} else {
set march "-m32"
# The 64-bit compile may succeed for i386-linux, but gdb won't be able
# to load the file.
-if [istarget "i?86-*linux*"] {
+if {[istarget "i?86-*linux*"]} {
return
}
# Build two executables, one for each arch.
-if [istarget "s390*-*-*"] {
+if {[istarget "s390*-*-*"]} {
set march1 "-m64"
set march2 "-m31"
} elseif { [istarget "aarch64*-*-*"] } {
set options [list debug]
-if [istarget "aarch64*-*-*"] {
+if {[istarget "aarch64*-*-*"]} {
if {[arm_cc_for_target] != ""} {
lappend options "compiler=[arm_cc_for_target]"
} else {
require can_spawn_for_attach
-if [build_executable "failed to prepare" $testfile $srcfile {debug}] {
+if {[build_executable "failed to prepare" $testfile $srcfile {debug}]} {
return -1
}
# Run to main and delete breakpoints.
proc my_runto_main {} {
- if ![runto_main] {
+ if {![runto_main]} {
return 0
} else {
# Delete breakpoints otherwise GDB would try to step over
}
if {$inf_how == "run"} {
- if [my_runto_main] {
+ if {[my_runto_main]} {
global inferior_spawn_id
return $inferior_spawn_id
}
set inf_tty_name $spawn_out(slave,name)
gdb_test_no_output "tty $inf_tty_name" "tty TTY"
- if [my_runto_main] {
+ if {[my_runto_main]} {
return $inf_spawn_id
}
} elseif {$inf_how == "attach"} {
gdb_test_no_output "set follow-fork child"
gdb_test_no_output "set detach-on-fork off"
- if ![runto "child_function"] {
+ if {![runto "child_function"]} {
return
}
# displaced-stepping is also needed as other GDB sometimes still removes the
# breakpoints, even with always-inserted on.
# Without the support this test just is not as thorough as it could be.
-if [support_displaced_stepping] {
+if {[support_displaced_stepping]} {
gdb_test_no_output "set displaced-stepping on"
}