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 220C83858D1E for ; Mon, 30 Jan 2023 12:52:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 220C83858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.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 1pMTdu-0008JN-L0; Mon, 30 Jan 2023 07:52:14 -0500 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=+3fxxsWGjLCWHadjzy4VlqXyChLHAkBYQMVozAQDm0o=; b=XntTbh4iIzFg yf9mAniNxHi0XcfiB0uj2tTWFPvB4KnhZe7vEpWHVt3/VawsvlY0gKoW5jgA8U8HdsgLLA1e7Kt7p Ndo4VUiEIa3rqsYN44VfWJDsFi3JqM1dQDZ/uinklZpIWflav64yx9q6yu/mcx/x2izKqeC3C69PI pxUxRnJ30jLkE05Ki6/5XgOEcA+zTuoYZa4JIVYB+OSdO7nwofJB5Q4RRN6IaB7b9X091LleP4sZ6 9qxVGi2DtXzx1Be1Kv8sMTYO+lGrVlSPE4P5dDfIglQ3g5Pz0nFktyQowCPGvc7O7ce21/F4Y+GyX yFl/5122uPdmyVmDU/mTwQ==; 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> From: Eli Zaretskii 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-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > 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.