From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway30.websitewelcome.com (gateway30.websitewelcome.com [192.185.197.25]) by sourceware.org (Postfix) with ESMTPS id 525AF3857C45 for ; Tue, 21 Jul 2020 19:39:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 525AF3857C45 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway30.websitewelcome.com (Postfix) with ESMTP id B8E576A85 for ; Tue, 21 Jul 2020 14:39:31 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id xy6tjYRTfwgQAxy6tjbqoZ; Tue, 21 Jul 2020 14:39:31 -0500 X-Authority-Reason: nr=8 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: References:Subject:Cc: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=DZSqfWkAhwduaaSg6FaQYapn/l8DzzgqVNxG+isCJ9k=; b=np9Cc16nnbg59UjsrbPAFsFyl2 v7S1BS/iRnfjfAafBwryH95HvjwPwQCjZbtUaW8lmprH0eHkXug3UtRKIvlqk5UGnu+eUXhXuenCj cL43mfyUXT/A59i0cigyupHhe; Received: from 174-16-104-48.hlrn.qwest.net ([174.16.104.48]:43310 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jxy6t-001nMG-E3; Tue, 21 Jul 2020 13:39:31 -0600 From: Tom Tromey To: Pedro Alves via Gdb-patches Cc: Tom Tromey , Pedro Alves Subject: Re: [PATCH 2/3] Consistently use BFD's time References: <20200114210956.25115-1-tromey@adacore.com> <20200114210956.25115-3-tromey@adacore.com> <83wo9s4sac.fsf@gnu.org> <87k1044g1x.fsf@tromey.com> <83r1ucza8u.fsf@gnu.org> <87wo442wjq.fsf@tromey.com> <83o8pgz3lv.fsf@gnu.org> <83k104z2cb.fsf@gnu.org> <0b80b7da-d9f8-d517-920d-60572134096e@redhat.com> <87a70zvv6o.fsf@tromey.com> <87k102vm5y.fsf@tromey.com> <07179329-a5ac-6947-7303-c0d7b919aa39@redhat.com> X-Attribution: Tom Date: Tue, 21 Jul 2020 13:39:30 -0600 In-Reply-To: <07179329-a5ac-6947-7303-c0d7b919aa39@redhat.com> (Pedro Alves via Gdb-patches's message of "Sat, 20 Jun 2020 00:05:53 +0100") Message-ID: <874kq0fyj1.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.104.48 X-Source-L: No X-Exim-ID: 1jxy6t-001nMG-E3 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-104-48.hlrn.qwest.net (murgatroyd) [174.16.104.48]:43310 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3025.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_ABUSEAT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, URIBL_CSS, URIBL_CSS_A autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2020 19:39:34 -0000 >>>>> "Pedro" == Pedro Alves via Gdb-patches writes: Pedro> Can you clarify what do you see not work? I tried rebasing it Pedro> here, and it seems to work. I don't remember any more. It doesn't seem important anyway. Pedro> I've also added an #error in case something pulls in sys/stat.h Pedro> before we get to defs.h. I think that if that happens due to Pedro> some include in common-defs.h pulling sys/stat.h (say, Pedro> libiberty.h ever exports some API using struct stat), then it Pedro> would likely be exposing a problem similar to the bfd.h one, in Pedro> that we should be calling such an API with the stat that Pedro> libiberty was built against. I think we still have the problem where we must to be careful to avoid comparing mtime-from-bfd against mtime-from-gnulib. I think this does occur in gdb. In particular in source-cache.c: if (mtime && mtime < st.st_mtime) warning (_("Source file is more recent than executable.")); mtime comes from BFD, but st.st_mtime comes from gnulib. Pedro> Hopefully that won't Pedro> happen -- external interfaces using "struct stat" are a really bad idea, Pedro> as this whole thread shows... I think it's more a self-caused problem, in that gnulib assumes that it can freely replace anything, but on the other hand gdb relies on libraries that do not follow this same model. Tom