From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20996 invoked by alias); 2 Jul 2019 17:55:10 -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 20607 invoked by uid 89); 2 Jul 2019 17:55:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:812 X-HELO: gateway34.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway34.websitewelcome.com) (192.185.148.142) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Jul 2019 17:55:08 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 6631F37216 for ; Tue, 2 Jul 2019 12:55:06 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id iMzihS2g24FKpiMzihgxs2; Tue, 02 Jul 2019 12:55:06 -0500 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=PaY1FinvLOg8W7tSPutkc+NEu3H0+hFYak94Sw0687w=; b=gMSkyxUjaohO4blqjjeWwtJ+UQ e2FJy85qmCISAllzIqH4Z1GX/VUqnzqfFI4gwc38Hy6saOQk4NytW30VTfw20b0XYruSETfSVZbSI yaGTvygIzzwOAYu9ua2Z227en; Received: from 174-29-48-143.hlrn.qwest.net ([174.29.48.143]:60270 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hiMzi-003v64-KD; Tue, 02 Jul 2019 12:55:06 -0500 From: Tom Tromey To: Andrew Burgess Cc: gdb-patches@sourceware.org, Sergio Durigan Junior Subject: Re: [PATCH] gdb: Remove a non-const reference parameter References: <20190629145820.GR23204@embecosm.com> <20190702152119.31612-1-andrew.burgess@embecosm.com> Date: Tue, 02 Jul 2019 17:55:00 -0000 In-Reply-To: <20190702152119.31612-1-andrew.burgess@embecosm.com> (Andrew Burgess's message of "Tue, 2 Jul 2019 16:21:19 +0100") Message-ID: <87o92cl3t2.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-07/txt/msg00062.txt.bz2 >>>>> "Andrew" == Andrew Burgess writes: Andrew> Non-const reference parameter should be avoided according to the GDB Andrew> coding standard: Andrew> https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Avoid_non-const_reference_parameters.2C_use_pointers_instead Andrew> This commit updates the gdbarch method gdbarch_stap_adjust_register, Andrew> and the one implementation i386_stap_adjust_register to avoid using a Andrew> non-const reference parameter. Thanks for doing this. I probably should have pushed back on the original patch a little for this reason. Andrew> + std::string tmp = "e" + regname; Andrew> + return tmp; This can just be `return "e" + regname' I think. Looks ok otherwise. Tom