From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25622 invoked by alias); 8 May 2011 09:08:35 -0000 Received: (qmail 25610 invoked by uid 22791); 8 May 2011 09:08:34 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 08 May 2011 09:08:14 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4898773032573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 8 May 2011 05:08:07 -0400 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p48985GK008624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 May 2011 05:08:06 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p489846l026137; Sun, 8 May 2011 11:08:04 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p48983Pp026132; Sun, 8 May 2011 11:08:03 +0200 Date: Sun, 08 May 2011 09:08:00 -0000 From: Jan Kratochvil To: Janis Johnson Cc: Pedro Alves , gdb-patches@sourceware.org Subject: [patch] Regression: let gdb.base/reread.exp handle multiple binary files Message-ID: <20110508090803.GA4829@host1.jankratochvil.net> References: <4DC18331.1020505@codesourcery.com> <201105041855.32567.pedro@codesourcery.com> <4DC2D106.3060806@codesourcery.com> <20110507060431.GA28099@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110507060431.GA28099@host1.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00211.txt.bz2 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 * 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" } }