From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id B79F73858D37 for ; Mon, 17 Aug 2020 01:51:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B79F73858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 2223D1E554; Sun, 16 Aug 2020 21:51:30 -0400 (EDT) Subject: Re: [PATCH] gdb: fix IA64 build failure of linux-nat To: Sergei Trofimovich , Kevin Buettner Cc: Sergei Trofimovich , gdb-patches@sourceware.org References: <20200519212710.1417100-1-slyfox@gentoo.org> <20200519150041.13df2b38@f31-4.lan> <20200816094521.061554bb@sf> From: Simon Marchi Message-ID: Date: Sun, 16 Aug 2020 17:51:28 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200816094521.061554bb@sf> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DATE_IN_PAST_03_06, GIT_PATCH_0, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham 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: Mon, 17 Aug 2020 01:51:32 -0000 On 2020-08-16 4:45 a.m., Sergei Trofimovich via Gdb-patches wrote: > On Tue, 19 May 2020 15:00:41 -0700 > Kevin Buettner wrote: > >> On Tue, 19 May 2020 22:27:10 +0100 >> Sergei Trofimovich via Gdb-patches wrote: >> >>> From: Sergei Trofimovich >>> >>> On IA64 built failed as: >>> >>> ``` >>> ia64-linux-nat.c:352:29: error: 'gdbarch_num_regs' was not declared in this scope >>> 352 | if (regno < 0 || regno >= gdbarch_num_regs (gdbarch)) >>> | ^~~~~~~~~~~~~~~~ >>> ``` >>> >>> The fix includes "gdbarch.h" header where symbol is declared. >>> >>> * gdb/ia64-linux-nat.c: include "gdbarch.h" to declare used >>> 'gdbarch_num_regs'. >> >> Okay, but please capitalize "include" in the ChangeLog entry prior >> to pushing this change. > > Attached v2-* patch with capitalization changes. > > I don't have a 'gdb' write access yet (I think), but I do have GCC one. > > Should I request 'gdb' access as well as specified in > https://sourceware.org/cgi-bin/pdw/ps_form.cgi ? Yes, that would be useful if you plan on contributing regularly. If it's just a occasional patch, we can also push for you. As you wish. > > Thank you for the review! A few more styling nits: > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 9cc7e44cba7..8865e6949d6 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -4564,6 +4564,11 @@ > > * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open. > > +2020-05-19 Sergei Trofimovich > + > + * gdb/ia64-linux-nat.c: Include "gdbarch.h" to declare used > + 'gdbarch_num_regs'. The file path should be relative to the ChangeLog location, so here just "ia64-linux-nat.c". Also, make sure that your new entry is at the top of the file (here, it's at line 4564), and that you update the date to $TODAY when you push. For these reasons, most people don't include the ChangeLog bits in the patch directly, but just include it in the commit log (as you did). Of course, when pushing the patch, then you need to insert it in the ChangeLog file. Simon