From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id tdUcCL9JqV8DbAAAWB0awg (envelope-from ) for ; Mon, 09 Nov 2020 08:53:03 -0500 Received: by simark.ca (Postfix, from userid 112) id 14C451F08B; Mon, 9 Nov 2020 08:53:03 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=DKIM_SIGNED,MAILING_LIST_MULTI, RCVD_IN_BL_SPAMCOP_NET,RDNS_NONE,T_DKIM_INVALID,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 79F101E58E for ; Mon, 9 Nov 2020 08:53:02 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DCC44385E830; Mon, 9 Nov 2020 13:53:01 +0000 (GMT) Received: from gateway34.websitewelcome.com (gateway34.websitewelcome.com [192.185.149.222]) by sourceware.org (Postfix) with ESMTPS id BD1C2385E830 for ; Mon, 9 Nov 2020 13:52:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BD1C2385E830 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 cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway34.websitewelcome.com (Postfix) with ESMTP id E94273324B1 for ; Mon, 9 Nov 2020 07:52:53 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id c7bJkYPN0iQiZc7bJkKXrz; Mon, 09 Nov 2020 07:52:53 -0600 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=xolXwyq/rB3+Us+kHXfnb5+0T5JeZXOfzq1FY50gCx4=; b=W0eXrSASoJ4MIAbkzIsAOG7IfL ii6u9XcTWYB+1UChT3FxwA/TyOwcaGnu0GBAeHiC7sw3gEBRzKontAYSO6zpJkJZxncj/WVq09tv6 O/Yb6LJ9ZdzFzT3Dw08zezHRU; Received: from 97-122-89-243.hlrn.qwest.net ([97.122.89.243]:48154 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 1kc7bJ-004ETC-HP; Mon, 09 Nov 2020 06:52:53 -0700 From: Tom Tromey To: Andrew Burgess Subject: Re: [PATCH 2/7] gdb: use get_standard_config_dir when looking for .gdbinit References: <92f3b4d4a87643bbb9768fbcb9ee8c77cd5ba8de.1601927355.git.andrew.burgess@embecosm.com> X-Attribution: Tom Date: Mon, 09 Nov 2020 06:52:51 -0700 In-Reply-To: <92f3b4d4a87643bbb9768fbcb9ee8c77cd5ba8de.1601927355.git.andrew.burgess@embecosm.com> (Andrew Burgess's message of "Wed, 7 Oct 2020 21:05:06 +0100") Message-ID: <87a6vqiqmk.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.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: 97.122.89.243 X-Source-L: No X-Exim-ID: 1kc7bJ-004ETC-HP X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-89-243.hlrn.qwest.net (murgatroyd) [97.122.89.243]:48154 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes 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: , Cc: Tom Tromey , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" >>>>> "Andrew" == Andrew Burgess writes: Andrew> This commit effectively changes the default location of the .gdbinit Andrew> file, while maintaining backward compatibility. Andrew> diff --git a/gdbsupport/pathstuff.cc b/gdbsupport/pathstuff.cc Andrew> index 9fb5e5cf614..a52e53b8671 100644 Andrew> --- a/gdbsupport/pathstuff.cc Andrew> +++ b/gdbsupport/pathstuff.cc Andrew> @@ -23,6 +23,10 @@ Andrew> #include "filenames.h" Andrew> #include "gdb_tilde_expand.h" Andrew> +#include Andrew> +#include Andrew> +#include Andrew> + Andrew> #ifdef USE_WIN32API Andrew> #include Andrew> #endif Andrew> @@ -298,6 +302,51 @@ get_standard_config_dir () Andrew> return {}; Andrew> } Andrew> +std::string Andrew> +find_gdb_home_config_file (const char *name, struct stat *buf) Andrew> +{ For my mingw build, this fails with: CXX pathstuff.o ../../binutils-gdb/gdbsupport/pathstuff.cc:324:1: error: no previous declaration for 'std::string find_gdb_home_config_file(const char*, _stati64*)' [-Werror=missing-declarations] 324 | find_gdb_home_config_file (const char *name, struct stat *buf) | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors I suppose the definition of "stat" changes between the header and the .cc file, probably due to the new includes somehow. I configure like this: ../binutils-gdb/configure '--host=i686-w64-mingw32' '--target=i686-w64-mingw32' '--disable-binutils' '--disable-gas' '--disable-gold' '--disable-gprof' '--disable-ld' '--disable-guile' '--disable-source-highlight' 'host_alias=i686-w64-mingw32' 'target_alias=i686-w64-mingw32' '--without-debuginfod' This build is done on x86-64 Fedora 32. Tom