From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 1C0E33858CDA for ; Tue, 2 Apr 2024 13:49:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C0E33858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1C0E33858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712065798; cv=none; b=Kd1eBkut64HjHKFZ6kv7x9f6045PLJudH42Bt88MI0pERLcBwECf8uLShxD2qkg5t91j+fp9hGuCPz0TsRX6qtH8KMTQ5n6wyqL6CiIjG6FzXwYWdHH4enst2aJaFoISh4yMCVzOdxBHnV4a0pN0dXQfnAkdMbnT8hywPbWMziY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712065798; c=relaxed/simple; bh=K16KEZyPZAg2SST+dHSbJ5yg3ktyCfsTwhh+KFmjobw=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=OFaAzgW45ryozf2R16XfTy88gk4gpCuduPMSQly4GCumksl/h6UWgR+IOSfDs9Vc/JjJ5F+p+02itXEpqkV0ABfqBLdUYq+pnfyD1Sh8cDtB7GmspoEqXnfLMj1/0um69RgOI/THBqj4I5Z2iD9Xk81tLKHU4DL7+ZKyp27pErM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrd6m-0000gJ-9B; Tue, 02 Apr 2024 08:19:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tK7O4t9RwFu6R27xLqMNoURiDe8X3RE3h68PckqZuQk=; b=c4tvRjym25xi 7Ps2hrll9IQQcrcFZ417w2ZExC3iMOc/oDSDPTxpxaHazjiNKFOEIJcDa4fuvXjUuJrle9yp0/WxG 4/FU8OVljZb6TAFhctZqywf+GpsK1rg7OunpYzyCNpYb5jD6d/qJ2tlanqkaiyleDxSEPEDUdJPer QVJ7N4bEkZTI+49v10fO7rgEgjiwxjNz1YJHeXhjquHmfc6LVPzMf1mAmpb1tf8iA/XA5SmHLefVf YS8jJ6QeRPfHz8W327vHxV4o+yY3S6YjJOENU1l50yAharc7pkH+4xBmvzrDoJrzbArx7S8jqFkmE TbZfGlPGqMzCfLh5b02U/w==; Date: Tue, 02 Apr 2024 15:19:18 +0300 Message-Id: <86il109cu1.fsf@gnu.org> From: Eli Zaretskii To: Tankut Baris Aktemur Cc: gdb-patches@sourceware.org In-Reply-To: <20240402102020.2521082-2-tankut.baris.aktemur@intel.com> (message from Tankut Baris Aktemur on Tue, 2 Apr 2024 12:20:20 +0200) Subject: Re: [PATCH 2/2] gdbserver, remote: introduce "id_str" in the "qXfer:threads:read" XML References: <20240402102020.2521082-1-tankut.baris.aktemur@intel.com> <20240402102020.2521082-2-tankut.baris.aktemur@intel.com> X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: Tankut Baris Aktemur > Date: Tue, 2 Apr 2024 12:20:20 +0200 > > GDB prints the target id of a thread in various places such as the > output of the "info threads" command in the "Target Id" column or when > switching to a thread. A target can define what to print for a given > ptid by overriding the `pid_to_str` method. > > The remote target is a gateway behind which one of many various > targets could be running. The remote target converts a given ptid to > a string in a uniform way, without consulting the low target at the > server-side. > > In this patch we introduce a new attribute in the XML that is sent in > response to the "qXfer:threads:read" RSP packet, so that a low target > at the server side, if it wishes, can specify what to print as the > target id of a thread. > > Note that the existing "name" attribute or the "extra" text provided > in the XML are not sufficient for the server-side low target to > achieve the goal. Those attributes, when present, are simply appended > to the target id by GDB. > --- > gdb/NEWS | 9 +++++++++ > gdb/doc/gdb.texinfo | 7 +++++-- > gdb/remote.c | 26 +++++++++++++++++++++++++- > gdbserver/server.cc | 4 ++++ > gdbserver/target.cc | 6 ++++++ > gdbserver/target.h | 13 +++++++++++++ > 6 files changed, 62 insertions(+), 3 deletions(-) Thanks, the documentation parts are OK, with the following minor nit: > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -48081,7 +48081,7 @@ the following structure: > @smallexample > > > - > + > ... description ... > > Please replace the ellipsis with an example of a real-life value. Reviewed-By: Eli Zaretskii