From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Janis Johnson <janisjo@codesourcery.com>
Cc: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org
Subject: [patch] Regression: let gdb.base/reread.exp handle multiple binary files
Date: Sun, 08 May 2011 09:08:00 -0000 [thread overview]
Message-ID: <20110508090803.GA4829@host1.jankratochvil.net> (raw)
In-Reply-To: <20110507060431.GA28099@host1.jankratochvil.net>
Hello Janis,
tcl `file -copy' really preserves file attributes / modification time, at
least on tcl-8.5.9-3.fc15.x86_64.
Does this patch work even on the exotic platform(s)?
Also I would prefer to remove those `catch'es - the functionality of
gdb_rename_execfile and gdb_touch_execfile is essential to gdb/reread.exp, if
errors occur gdb/reread.exp cannot work and such hidden error will just
confuse the testfile results afterwards.
Thanks,
Jan
gdb/testsuite/
2011-05-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* lib/gdb.exp (gdb_touch_execfile): New variable time. Replace `file
copy' and `file rename' by `file mtime'. Twice.
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2685,19 +2685,10 @@ proc gdb_rename_execfile { binfile1 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]
+ catch "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}] }
+ catch "file mtime \"[exec_symbol_file ${binfile}]\" $time"
}
}
next prev parent reply other threads:[~2011-05-08 9:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 16:47 [patch] " Janis Johnson
2011-05-04 17:55 ` Pedro Alves
2011-05-05 16:32 ` Janis Johnson
2011-05-07 6:05 ` Regression: " Jan Kratochvil
2011-05-08 9:08 ` Jan Kratochvil [this message]
2011-05-11 7:08 ` [patch#2] Regression: " Jan Kratochvil
2011-05-11 9:03 ` Pedro Alves
2011-05-11 9:12 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110508090803.GA4829@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=janisjo@codesourcery.com \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox