From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94777 invoked by alias); 11 Feb 2020 16:38:00 -0000 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 Received: (qmail 94759 invoked by uid 89); 11 Feb 2020 16:37:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TRACKER_ID autolearn=no version=3.3.1 spammy=adopted, HX-Languages-Length:1372 X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (205.139.110.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Feb 2020 16:37:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581439077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xlhy+sPiqPt+7emTIOXDRKNFNgMlAdiZW6DjQvqm/bk=; b=CJ5Req3jg4oum20WJwfm7zJITsJ2kGdn2O3t6Vp57EpHBMrJRp/S5rabQ5bjyMuO3S23+r +6l+okRZl6QDFTWy56tJWwrT3gdwpzKXvVmKyQ+hJ+UnQu9bjZDDmjv/RbA7gllbqI1qjm Bp/LjWRd4HJGh0JJjbjQeuxpkHD3/bI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-434-lnc2lc0-MhqOTBkm_eUAuw-1; Tue, 11 Feb 2020 11:37:38 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5B41A800D53; Tue, 11 Feb 2020 16:37:37 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C8A526FD7; Tue, 11 Feb 2020 16:37:37 +0000 (UTC) From: Sergio Durigan Junior To: Andrew Burgess Cc: GDB Patches , Luis Machado Subject: Re: [PATCH v2] New testcase for PR tui/25126 (staled source cache) References: <20200206225943.26709-1-sergiodj@redhat.com> <20200210200221.14846-1-sergiodj@redhat.com> <20200211111014.GO4020@embecosm.com> Date: Tue, 11 Feb 2020 16:38:00 -0000 In-Reply-To: <20200211111014.GO4020@embecosm.com> (Andrew Burgess's message of "Tue, 11 Feb 2020 11:10:14 +0000") Message-ID: <87y2t9nkq7.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00403.txt.bz2 On Tuesday, February 11 2020, Andrew Burgess wrote: > * Sergio Durigan Junior [2020-02-10 15:02:20 -0500]: [...] >> +close $bkpsrcfd >> +close $srcfd >> +file rename -force -- $bkpsrc $srcfile >> +# Here, we have to wait 1 second because of the way GDB keeps track to >> +# check whether the binary has changed or not. GDB uses stat(2) and >> +# currently checks 'st_mtime', whose precision is measured in >> +# seconds. Since the whole file-copying/rename operation can take >> +# less than 1 second, GDB can mistakenly assume that the binary is >> +# still the same if we don't wait here. > > Maybe rewrite this comment as: > > We have to wait 1 second because of the way GDB checks whether the > binary has changed or not. GDB uses stat(2) and currently checks > 'st_mtime', whose precision is measured in seconds. Since the copy, > rename, and rebuild can take less than 1 second, GDB might mistakenly > assume that the binary is unchanged. > > Otherwise this looks good to me and can be applied. Thanks, I adopted your version of the text and pushed the patch. f6be87130b5b327075a09c05e78532816f186995 Thank you and Luis for the reviews. --=20 Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/