[07/11,gdb/testsuite] Refactor exception handling in gdb_expect
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Simplify gdb_expect using transparent_uplevel.
---
gdb/testsuite/lib/gdb.exp | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
@@ -7531,16 +7531,9 @@ proc gdb_expect { args } {
set tmt [get_largest_timeout]
}
- set code [catch \
- {uplevel remote_expect host $tmt $expcode} string]
-
- if {$code == 1} {
- global errorInfo errorCode
-
- return -code error -errorinfo $errorInfo -errorcode $errorCode $string
- } else {
- return -code $code $string
- }
+ transparent_uplevel [subst_vars {
+ remote_expect host $tmt $expcode
+ }]
}
# gdb_expect_list TEST SENTINEL LIST -- expect a sequence of outputs