From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KfPzIqX4dmHIfQAAWB0awg (envelope-from ) for ; Mon, 25 Oct 2021 14:34:13 -0400 Received: by simark.ca (Postfix, from userid 112) id 7858E1ECEB; Mon, 25 Oct 2021 14:34:13 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,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 C57651ECEB for ; Mon, 25 Oct 2021 14:34:12 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 441143857002 for ; Mon, 25 Oct 2021 18:34:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 441143857002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635186852; bh=rFGqNpevpTfoVsi/xXb6OY2CBE1JF8z+X6bVouELs3w=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=iFQbMYJxaQZ1XLuDBG1WhW7DeuuIOBW88McMjMT0KgnA10Fo66W3kIZFuNymgeyj1 eJuGpddYkySxZbBZmLQFJKLCi/K4oPEhsMMx7M8d91KfP4Aui2y1SvzXuGYlGWUgFm 21PWeSEnNlN5Z8maZ9p2bsuiejvTF8JxEMBQS5S8= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 0F1AB3857432 for ; Mon, 25 Oct 2021 18:33:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0F1AB3857432 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 19PIXfWu017187 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Oct 2021 14:33:45 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 19PIXfWu017187 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (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 E7D251ECEB; Mon, 25 Oct 2021 14:33:40 -0400 (EDT) Message-ID: <190e0714-617a-7a96-b586-7a22a3db987c@polymtl.ca> Date: Mon, 25 Oct 2021 14:33:40 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH] gdbserver: make target_pid_to_str return std::string Content-Language: en-US To: Tom Tromey , Simon Marchi via Gdb-patches References: <20211025142033.420979-1-simon.marchi@efficios.com> <877de1q7pc.fsf@tromey.com> In-Reply-To: <877de1q7pc.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 25 Oct 2021 18:33:41 +0000 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Cc: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-10-25 14:29, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi via Gdb-patches writes: > > Simon> This doesn't work, because target_pid_to_str stores its result in a > Simon> static buffer, so my message would show twice the same ptid. Change > Simon> target_pid_to_str to return an std::string to avoid this. I don't think > Simon> we save much by using a static buffer, but it is more error-prone. > > I agree and I think this is fine. > > thanks, > Tom > Thanks, pushed. Simon