mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
[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:
@ -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.*"
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user