diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-05-11 09:11:17 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-05-11 09:11:17 +0000 |
commit | faf067f1a354df9682137d4910540c74ee7c929c (patch) | |
tree | 67a570ccc58a73716c268fddb54171e189a252e4 /gdb | |
parent | 7ff911a38f9de56d82fbe7db1e37166532694dbd (diff) | |
download | gdb-faf067f1a354df9682137d4910540c74ee7c929c.zip gdb-faf067f1a354df9682137d4910540c74ee7c929c.tar.gz gdb-faf067f1a354df9682137d4910540c74ee7c929c.tar.bz2 |
gdb/testsuite/
* lib/gdb.exp (gdb_rename_execfile): Remove catch wrappers.
(gdb_touch_execfile): Remove catch wrappers. New variable time.
Replace `file copy' and `file rename' by `file mtime'. Twice.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 25 |
2 files changed, 13 insertions, 18 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index fd82e53..d855ea2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2011-05-11 Jan Kratochvil <jan.kratochvil@redhat.com> + * lib/gdb.exp (gdb_rename_execfile): Remove catch wrappers. + (gdb_touch_execfile): Remove catch wrappers. New variable time. + Replace `file copy' and `file rename' by `file mtime'. Twice. + +2011-05-11 Jan Kratochvil <jan.kratochvil@redhat.com> + * gdb.base/readline-ask.c: New file. * gdb.base/readline-ask.exp: New file. * gdb.base/readline-ask.inputrc: New file. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index c50a732..17ea0b7 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2672,32 +2672,21 @@ proc exec_symbol_file { binfile } { # Rename the executable file. Normally this is just BINFILE1 being renamed # to BINFILE2, but some targets require multiple binary files. proc gdb_rename_execfile { binfile1 binfile2 } { - catch { file rename -force \ - [exec_target_file ${binfile1}] \ - [exec_target_file ${binfile2}] } + file rename -force [exec_target_file ${binfile1}] \ + [exec_target_file ${binfile2}] if { [exec_target_file ${binfile1}] != [exec_symbol_file ${binfile1}] } { - catch { file rename -force \ - [exec_symbol_file ${binfile1}] \ - [exec_symbol_file ${binfile2}] } + file rename -force [exec_symbol_file ${binfile1}] \ + [exec_symbol_file ${binfile2}] } } # "Touch" the executable file to update the date. Normally this is just # BINFILE, but some targets require multiple files. proc gdb_touch_execfile { binfile } { - catch { file copy -force \ - [exec_target_file ${binfile}] \ - [exec_target_file ${binfile}.tmp] } - catch { file rename -force \ - [exec_target_file ${binfile}.tmp] \ - [exec_target_file ${binfile}] } + set time [clock seconds] + file mtime [exec_target_file ${binfile}] $time if { [exec_target_file ${binfile}] != [exec_symbol_file ${binfile}] } { - catch { file copy -force \ - [exec_symbol_file ${binfile}] \ - [exec_symbol_file ${binfile}.tmp] } - catch { file rename -force \ - [exec_symbol_file ${binfile}.tmp] \ - [exec_symbol_file ${binfile}] } + file mtime [exec_symbol_file ${binfile}] $time } } |