From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 58jFLZO912MrRSUAWB0awg (envelope-from ) for ; Mon, 30 Jan 2023 07:52:35 -0500 Received: by simark.ca (Postfix, from userid 112) id AE10C1E128; Mon, 30 Jan 2023 07:52:35 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=oDisMoNS; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 2CD651E0D3 for ; Mon, 30 Jan 2023 07:52:35 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 293633858C2F for ; Mon, 30 Jan 2023 12:52:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 293633858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675083154; bh=+3fxxsWGjLCWHadjzy4VlqXyChLHAkBYQMVozAQDm0o=; h=Date:To:Cc:In-Reply-To:Subject:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=oDisMoNSfflEOaZ/1Az2nRQ2B9uoAw/p2AcWEhRpX+a2ktMzuvoczDA9N1kShUPtS jS9/l6KxNMUw1QuKful1AklXwL3t6VpTkICrdx92PDxFn+NTpEoC/H6IXLRnEkVZ1i yQZLd1NjDQK9xPYcbVt00HLfRPoEUm6zclHTDGZE= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 220C83858D1E for ; Mon, 30 Jan 2023 12:52:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 220C83858D1E 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 1pMTdu-0008JN-L0; Mon, 30 Jan 2023 07:52:14 -0500 Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMTdt-0005I9-TI; Mon, 30 Jan 2023 07:52:14 -0500 Date: Mon, 30 Jan 2023 14:52:07 +0200 Message-Id: <83ilgo5gnc.fsf@gnu.org> To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org, simon.marchi@efficios.com In-Reply-To: <20230130044518.3322695-6-thiago.bauermann@linaro.org> (message from Thiago Jung Bauermann via Gdb-patches on Mon, 30 Jan 2023 04:45:15 +0000) Subject: Re: [PATCH v3 5/8] gdbserver: Transmit target description ID in thread list and stop reply References: <20230130044518.3322695-1-thiago.bauermann@linaro.org> <20230130044518.3322695-6-thiago.bauermann@linaro.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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Cc: Thiago Jung Bauermann , > Simon Marchi > Date: Mon, 30 Jan 2023 04:45:15 +0000 > From: Thiago Jung Bauermann via Gdb-patches > > Now that an inferior thread can have a different target description than > its process, there needs to be a way to communicate this target > description to GDB. So add the concept of a target description ID to the > remote protocol, which is used to reference them and allows them to be > transferred only once over the wire. > > The ID is an unsigned integer, and is sent in the 'T AA n1:r1;n2:r2;...' > stop reply packet as a new 'n:r' pair, where n is "tdesc" and "r" is an > unsigned integer containing the ID. > > It is also sent in the threads list XML in the response of a > qXfer:threads:read request. The ID is sent as a new "tdesc" attribute of > the node. > > To request the target description XML of a given ID, GDB sends the > qXfer:features:read request with "target-id-%u.xml" as the annex, where %u > is the target description ID. > > Suggested-By: Simon Marchi > --- > gdb/doc/gdb.texinfo | 27 ++++++++++++++++--- > gdbserver/remote-utils.cc | 57 +++++++++++++++++++++++++++++++++++++++ > gdbserver/remote-utils.h | 9 +++++++ > gdbserver/server.cc | 17 ++++++++++-- > gdbserver/server.h | 4 +++ > 5 files changed, 109 insertions(+), 5 deletions(-) Thanks. > +If target description IDs are being used (@pxref{Target Description ID}), > +@value{GDBN} can retrieve a target description with a given ID by using > +@samp{target-id-ID.xml} as the @var{annex}, where @var{ID} is the ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ @file{target-id-@var{id}.xml} @var{id} The arguments of @var should be in lower-case, as that looks better in the printed and HTML versions of the manual. The documentation part is OK with these problems fixed.