[gdb/testsuite] Use early-out style in gdb.base/break-probes.exp

Reduce indentation and improve readability in test-case
gdb.base/break-probes.exp by replacing:
...
if { <cond> } {
  <lots-of-code>
}
...
with:
...
if { ! <cond> } {
  return -1
}
<lots-of-code>
...

Tested on x86_64-linux.
This commit is contained in:
Tom de Vries
2021-09-23 22:42:10 +02:00
parent 9b8efa2cd1
commit 04739cc7ce

View File

@ -60,7 +60,10 @@ gdb_test_multiple "bt" $test {
} }
} }
if { $using_probes } { if { ! $using_probes } {
return -1
}
set sysroot "" set sysroot ""
set test "show sysroot" set test "show sysroot"
gdb_test_multiple $test $test { gdb_test_multiple $test $test {
@ -90,4 +93,3 @@ if { $using_probes } {
# Call something to ensure that relocation occurred # Call something to ensure that relocation occurred
gdb_test "call (int) foo(23)" "\\\$.* = 31.*\\\M.*" gdb_test "call (int) foo(23)" "\\\$.* = 31.*\\\M.*"
}