From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gproxy7-pub.mail.unifiedlayer.com (gproxy7-pub.mail.unifiedlayer.com [70.40.196.235]) by sourceware.org (Postfix) with ESMTPS id B65F13858C2C for ; Mon, 20 Dec 2021 07:09:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B65F13858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw13.mail.unifiedlayer.com (unknown [10.0.90.128]) by gproxy7.mail.unifiedlayer.com (Postfix) with ESMTP id C81CEA1434F6 for ; Tue, 14 Dec 2021 21:16:45 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id xFACmjHtrR8FExFADmLtb0; Tue, 14 Dec 2021 21:16:45 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=FMbee8ks c=1 sm=1 tr=0 ts=61b909bd a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IOMw9HtfNCkA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=CCpqsmhAAAAA:8 a=N0RIE5XnGPt99-gjHbwA:9 a=ul9cdbp4aOFLsgKbc677:22 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=ShGZNxrNjo4FB3RY7Opq7RpxE0ei2m/QkZ3D6508CX4=; b=B1sLNRvMS5LzEgFA2oI9Kvj0+1 KFmLcowTDOlC5jE7q66peyWMRORy7pSstyugzle9Bz7wHMOhTCTkU7W/qxYwU+hbRMl61GMeF5EBp zoib9gGN/Vkzws3HEVJy2jRZz; Received: from 75-166-130-34.hlrn.qwest.net ([75.166.130.34]:54312 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mxFAC-000vGM-LO; Tue, 14 Dec 2021 14:16:44 -0700 From: Tom Tromey To: Zoran Zaric via Gdb-patches Subject: Re: [PATCH v4 04/28] Add to_location method to dwarf_value class References: <20211105113849.118800-1-zoran.zaric@amd.com> <20211105113849.118800-5-zoran.zaric@amd.com> X-Attribution: Tom Date: Tue, 14 Dec 2021 14:16:43 -0700 In-Reply-To: <20211105113849.118800-5-zoran.zaric@amd.com> (Zoran Zaric via Gdb-patches's message of "Fri, 5 Nov 2021 11:38:25 +0000") Message-ID: <87tufayjic.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (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: 75.166.130.34 X-Source-L: No X-Exim-ID: 1mxFAC-000vGM-LO X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-130-34.hlrn.qwest.net (murgatroyd) [75.166.130.34]:54312 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3025.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 20 Dec 2021 07:09:21 -0000 >>>>> "Zoran" == Zoran Zaric via Gdb-patches writes: Zoran> By allowing any location description to be on the DWARF stack, these Zoran> implicit conversions are expected on per operation basis which means Zoran> that the new dwarf_value class need to have a support for it. I don't really follow the meaning of "location description" in this comment. For me this term refers to the expression in DWARF, but here you seem to be using it to refer to some sort of value. Zoran> This patch adds a conversion method from a dwarf_value object into a Zoran> location description object. Zoran> --- a/gdbsupport/common-utils.h Zoran> +++ b/gdbsupport/common-utils.h Zoran> @@ -206,4 +206,22 @@ extern int hex2bin (const char *hex, gdb_byte *bin, int count); Zoran> /* Like the above, but return a gdb::byte_vector. */ Zoran> gdb::byte_vector hex2bin (const char *hex); Zoran> +#if __cplusplus >= 201402L Zoran> +#include Zoran> + Zoran> +using std::make_unique; Zoran> +#else Zoran> +namespace gdb { Zoran> + Zoran> +/* Stolen from libstdc++ and adjusted, so probably fine license-wise. */ I think it's fine to just document that this came from libstdc++. I tend to think this should go in gdbsupport/gdb_unique_ptr.h. Tom