From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116889 invoked by alias); 14 Jan 2020 17:03:58 -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 116819 invoked by uid 89); 14 Jan 2020 17:03:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:sk:sonic.g, H*x:WebService, H*x:Mozilla, H*M:yahoo X-HELO: sonic304-22.consmr.mail.ir2.yahoo.com Received: from sonic304-22.consmr.mail.ir2.yahoo.com (HELO sonic304-22.consmr.mail.ir2.yahoo.com) (77.238.179.147) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Jan 2020 17:03:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1579021424; bh=mxL8qlg1DeVIbSv7HnviPCiJ6724PvoHdNorVT66BEA=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=UlNpcwbDyQByggOVK77QQXP5lJvLoSdnHiCImqo7E+eo1tUwcY0pz1AMttYkK7fTJV/ELTlrR4YpGevaJjg8WzrRRuIoHqhWdbB67XUELY7GAOG4dS+XGrrkAmgBz5Ee85p1/C2/h2//FBkCslQMd5DgePlrZROiPm2uQzOSluCcWlKPI5LsFzng+Q3n7jsWhAvyrJaggAU9NrCkGCQ1varRccM8wIbmKlD32yYHQBSN3G3qUPYTv2vDwgfjAeTnlVPdBj2UQD2tDA+Ud7ugNrE2tTfTYbTqpfmUjUsstmSl5OQlrf0o4rQ3EcuZGQC2cjBxZOynZccFItCF8UVYFg== Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Tue, 14 Jan 2020 17:03:44 +0000 Date: Tue, 14 Jan 2020 17:32:00 -0000 From: "Hannes Domani via gdb-patches" Reply-To: Hannes Domani To: Christian Biesinger , Tom Tromey Cc: Simon Marchi , gdb-patches@sourceware.org, palves@redhat.com Message-ID: <112628616.18983668.1579021401412@mail.yahoo.com> In-Reply-To: <87imle7z8x.fsf_-_@tromey.com> References: <20191216182208.22D882816F@gnutoolchain-gerrit.osci.io> <87imle7z8x.fsf_-_@tromey.com> Subject: Re: gnulib stat problem (Was: [pushed] Update Gnulib to the latest git version) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00381.txt.bz2 Am Dienstag, 14. Januar 2020, 17:57:10 MEZ hat Tom Tromey = Folgendes geschrieben: > >> Update Gnulib to the latest git version > > I think that this patch introduced a regression on Windows, and I'm > wondering what to do about it. > > After merging this in locally, we saw some gdb crashes.=C2=A0 I have a pa= tch > for the crash (will send it soon), but there's still a problem. > Specifically, the first time I "run", gdb always thinks the executable > has changed, even if it has not: > >=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) file ./t.exe >=C2=A0=C2=A0=C2=A0=C2=A0 Reading symbols from ./t.exe... >=C2=A0=C2=A0=C2=A0=C2=A0 (gdb) run >=C2=A0=C2=A0=C2=A0=C2=A0 `C:\home\tromey\t.exe' has changed; re-reading sy= mbols. >=C2=A0=C2=A0=C2=A0=C2=A0 Starting program: C:\home\tromey\t.exe > > I believe what is happening here is that gdb is using the gnulib stat > (or fstat or whatever), which adjusts for timezone; but BFD is using > plain stat, which does not.=C2=A0 However, gdb will end up comparing an > time_t coming from the gnulib stat with a time_t coming from > bfd_get_mtime, which causes this problem. > > I suppose the principled answer is to change BFD and the rest of the > tree to use gnulib.=C2=A0 This seems like a pain, so I'd rather avoid it. > Also, if binutils doesn't want this, we'll still have the bug. > > Another idea would be to avoid bfd_get_mtime entirely in gdb.=C2=A0 I don= 't > know how feasible this is, given that (I think) we need it to call > through the iovec. > > Maybe gdb could *only* use bfd_get_mtime when it matters.=C2=A0 This would > mean changing gdb_bfd_open to create a BFD before checking the cache, > but maybe that's not very expensive. > > I'd appreciate your thoughts on the topic. I reported this issue some time ago: https://sourceware.org/bugzilla/show_bug.cgi?id=3D25302