From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gBtzFMntjl+/bQAAWB0awg (envelope-from ) for ; Tue, 20 Oct 2020 10:01:45 -0400 Received: by simark.ca (Postfix, from userid 112) id 518381EFC3; Tue, 20 Oct 2020 10:01:45 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [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 5FCE81EFBF for ; Tue, 20 Oct 2020 10:01:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CFB6D3944437; Tue, 20 Oct 2020 14:01:42 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 67FEA385782C for ; Tue, 20 Oct 2020 14:01:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 67FEA385782C 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) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id F301D1EF48; Tue, 20 Oct 2020 10:01:40 -0400 (EDT) Subject: Re: [PP?] [PATCH v2 04/16] Remove commented-out code from gcore.c To: Tom Tromey , gdb-patches@sourceware.org References: <20201019214429.13815-1-tom@tromey.com> <20201019214429.13815-5-tom@tromey.com> From: Simon Marchi Message-ID: <8a26934f-d928-9ac5-0229-b1efb588bc04@simark.ca> Date: Tue, 20 Oct 2020 10:01:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201019214429.13815-5-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-10-19 5:44 p.m., Tom Tromey wrote: > I found some code in gcore.c that has been commented out since > > d3420b2fce5e (Mark Kettenis 2003-09-04 166) #if 1 /* See if this even matters... */ > > This patch deletes this code. > > gdb/ChangeLog > 2020-10-19 Tom Tromey > > * gcore.c (default_gcore_mach): Remove commented-out code. > --- > gdb/ChangeLog | 4 ++++ > gdb/gcore.c | 12 ------------ > 2 files changed, 4 insertions(+), 12 deletions(-) > > diff --git a/gdb/gcore.c b/gdb/gcore.c > index db82eaac3dd..c1ea7a6c481 100644 > --- a/gdb/gcore.c > +++ b/gdb/gcore.c > @@ -168,19 +168,7 @@ gcore_command (const char *args, int from_tty) > static unsigned long > default_gcore_mach (void) > { > -#if 1 /* See if this even matters... */ > return 0; > -#else > - > - const struct bfd_arch_info *bfdarch = gdbarch_bfd_arch_info (target_gdbarch ()); > - > - if (bfdarch != NULL) > - return bfdarch->mach; > - if (exec_bfd == NULL) > - error (_("Can't find default bfd machine type (need execfile).")); > - > - return bfd_get_mach (exec_bfd); > -#endif /* 1 */ > } The default_gcore_mach function is not needed then, you can remove it too (replace where it is called with just "0"). Simon