aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.asm
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-11-14 14:31:52 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-11-28 21:04:10 +0000
commitf50c72da4dc7ab67ea244e9c6e97404a04700c2d (patch)
tree4578749e362a255867a99829736e24bf543a34b0 /gdb/testsuite/gdb.asm
parent0216141ac37843192e3525dda4cc3c58810ee195 (diff)
downloadgdb-f50c72da4dc7ab67ea244e9c6e97404a04700c2d.zip
gdb-f50c72da4dc7ab67ea244e9c6e97404a04700c2d.tar.gz
gdb-f50c72da4dc7ab67ea244e9c6e97404a04700c2d.tar.bz2
gdb/testsuite: remove use of then keyword from gdb.*/*.exp scripts
The canonical form of 'if' in modern TCL is 'if {} {}'. But there's still a bunch of places in the testsuite where we make use of the 'then' keyword, and sometimes these get copies into new tests, which just spreads poor practice. This commit removes all use of the 'then' keyword from the remaining gdb.*/*.exp scripts. Previous commits have done the bulk of this removal, this commit just handles the remaining directories that each contain a low number of instances. There should be no changes in what is tested after this commit.
Diffstat (limited to 'gdb/testsuite/gdb.asm')
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index d56a507..45c8330 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -166,14 +166,14 @@ if { "${asm-arch}" == "" } {
}
# On NetBSD/ELF we need a special NetBSD-identifying note section.
-if { [istarget "*-*-netbsd*"] && ![istarget "*-*-netbsdaout*"] } then {
+if {[istarget "*-*-netbsd*"] && ![istarget "*-*-netbsdaout*"]} {
set asm-note "netbsd"
}
# On OpenBSD/ELF we need a similar note section. We make no attempt
# of handing a.out here since most OpenBSD/a.out systems use a rather
# outdated assembler that doesn't assemble this test's code anyway.
-if { [istarget "*-*-openbsd*"] } then {
+if {[istarget "*-*-openbsd*"]} {
set asm-note "openbsd"
}
@@ -212,7 +212,7 @@ if { [string equal ${debug-flags} ""] } {
}
# Allow the target board to override the debug flags.
-if { [board_info $dest exists debug_flags] } then {
+if {[board_info $dest exists debug_flags]} {
set debug-flags "[board_info $dest debug_flags]"
}
@@ -239,11 +239,11 @@ regsub "--" "-g\[0-9\]" "${debug-flags}" "" debug-flags
set asm1obj [standard_output_file asmrc1.o]
set asm2obj [standard_output_file asmrc2.o]
-if {[target_assemble ${srcdir}/${subdir}/${srcfile} $asm1obj "${asm-flags} ${debug-flags}"] != ""} then {
+if {[target_assemble ${srcdir}/${subdir}/${srcfile} $asm1obj "${asm-flags} ${debug-flags}"] != ""} {
untested "failed to assemble"
return -1
}
-if {[target_assemble ${srcdir}/${subdir}/${srcfile2} $asm2obj "${asm-flags} ${debug-flags}"] != ""} then {
+if {[target_assemble ${srcdir}/${subdir}/${srcfile2} $asm2obj "${asm-flags} ${debug-flags}"] != ""} {
untested "failed to assemble"
return -1
}
@@ -254,7 +254,7 @@ if {[target_assemble ${srcdir}/${subdir}/${srcfile2} $asm2obj "${asm-flags} ${de
# code here that provides its own startup code. Using target_link
# also avoids a lot of problems on many systems, most notably on
# *-*-*bsd* and *-*-solaris2*.
-if {[target_link [list $asm1obj $asm2obj] "${binfile}" ${link-flags}] != "" } then {
+if {[target_link [list $asm1obj $asm2obj] "${binfile}" ${link-flags}] != ""} {
untested "failed to link"
return -1
}
@@ -284,7 +284,7 @@ gdb_load ${binfile}
# Run to `main' where we begin our tests.
#
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}