From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80188 invoked by alias); 14 Jan 2020 16:57:02 -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 80128 invoked by uid 89); 14 Jan 2020 16:57:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=Reading, pain X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.55.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Jan 2020 16:56:51 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 91EE1400C4A33 for ; Tue, 14 Jan 2020 09:44:41 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id rPUniuXwSqNtvrPUniWe5T; Tue, 14 Jan 2020 10:56:49 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:CC: References:Subject:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TntxuqjQL6+z2Cb6njNv1pkRm8QYSWpKAjeF+y5rDDg=; b=gRQeopYoW6fmzE43ehwbKrNZyp Ctpf0yJIAPrjR5FbW4P6PeKLUyPoemneZI5y0z+us84kOxpGQO2ppklnQ0TNLtrS88k13o2HSHaJB +mEXpa+dEx/292AWUqHcx+Qgw; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:47676 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1irPUm-000syL-Jh; Tue, 14 Jan 2020 09:56:48 -0700 From: Tom Tromey To: Christian Biesinger Subject: gnulib stat problem (Was: [pushed] Update Gnulib to the latest git version) References: <20191216182208.22D882816F@gnutoolchain-gerrit.osci.io> CC: Simon Marchi , gdb-patches@sourceware.org, palves@redhat.com Date: Tue, 14 Jan 2020 17:03:00 -0000 In-Reply-To: <20191216182208.22D882816F@gnutoolchain-gerrit.osci.io> (Sourceware to Gerrit sync's message of "Mon, 16 Dec 2019 13:22:07 -0500") Message-ID: <87imle7z8x.fsf_-_@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2020-01/txt/msg00380.txt.bz2 >> 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. I have a patch 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: (gdb) file ./t.exe Reading symbols from ./t.exe... (gdb) run `C:\home\tromey\t.exe' has changed; re-reading symbols. 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. 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. 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. 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. 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. Tom