diff options
Diffstat (limited to 'gdb/testsuite/lib/tuiterm.exp')
-rw-r--r-- | gdb/testsuite/lib/tuiterm.exp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index f53b7c3..c58b7cf 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -392,13 +392,18 @@ namespace eval Term { # Like ::clean_restart, but ensures that gdb starts in an # environment where the TUI can work. ROWS and COLS are the size - # of the terminal. EXECUTABLE is passed to clean_restart. - proc clean_restart {rows cols executable} { + # of the terminal. EXECUTABLE, if given, is passed to + # clean_restart. + proc clean_restart {rows cols {executable {}}} { global env stty_init save_vars {env(TERM) stty_init} { setenv TERM ansi _setup $rows $cols - ::clean_restart $executable + if {$executable == ""} { + ::clean_restart + } else { + ::clean_restart $executable + } } } |