From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30745 invoked by alias); 2 Jul 2019 15:35:31 -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 30737 invoked by uid 89); 2 Jul 2019 15:35:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=controversial X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Jul 2019 15:35:29 +0000 Received: from [172.16.0.120] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id CAA911E05A; Tue, 2 Jul 2019 11:35:27 -0400 (EDT) Subject: Re: [PATCH] gdb: Remove a non-const reference parameter To: Andrew Burgess , gdb-patches@sourceware.org Cc: Sergio Durigan Junior , Pedro Alves References: <20190629145820.GR23204@embecosm.com> <20190702152119.31612-1-andrew.burgess@embecosm.com> From: Simon Marchi Message-ID: Date: Tue, 02 Jul 2019 15:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190702152119.31612-1-andrew.burgess@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-07/txt/msg00050.txt.bz2 On 2019-07-02 11:21 a.m., Andrew Burgess wrote: > Non-const reference parameter should be avoided according to the GDB > coding standard: > > https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Avoid_non-const_reference_parameters.2C_use_pointers_instead > > This commit updates the gdbarch method gdbarch_stap_adjust_register, > and the one implementation i386_stap_adjust_register to avoid using a > non-const reference parameter. > > I've also removed the kfail from the testsuite for bug 24541, as this > issue is now resolved. Hi Andrew, So I was the one who added this rule to the guide. When I asked for opinions and didn't get any, I thought it was because it wasn't very controversial and chose to add it. Since then, Pedro mentioned a few times he didn't agree with it. I'd like to know what others think, should we keep it (and enforce it) or remove it? Simon