From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by sourceware.org (Postfix) with ESMTPS id 245153858C52 for ; Sat, 4 Feb 2023 06:09:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 245153858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-16346330067so9184827fac.3 for ; Fri, 03 Feb 2023 22:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=g3DFRXxbDSOpW6iOOM7aNjh+Zd1Zm+PG91BLNIJomL0=; b=Q/Kp8E9a/ujG+7DlkySrOtpaCRGKKBl98WmMwhr5SM1+eDPCVa8wOUo8bWNzI5XKzk ddrke8Ia+Pk9bxj1ksUA6mwfTlHCbQwWlcFkEtPmXzRnjiLCs9LlBd6ib3ugTJ9d9RNb raPIontY1Q1d+Q1Knf0A4PFSc/Ik0xZWskEtH7a9U7G5PlQ/sqGkvZRpALLJ8GJcIprV R1DGYh1vDxNk8FR6UE4KKNPrxP9F+xqF+52SdRoBMaSTndiSZfo8KJBussz2aIGfgzKs Z2iLy9GNuh9ifqo1a8fPOLmHQHjAISWInggYb4qmlkYo/QBsxowvCuGmWj7OSPYOg19p RG5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=g3DFRXxbDSOpW6iOOM7aNjh+Zd1Zm+PG91BLNIJomL0=; b=bA4FPkubsQpkBz/YMw10RByoCn7J9OMDWzIhSRa+rHwjD1e9ARhlxtaUZeiooMJRgt nstn/sbFv3zL+KaSwO9TeXWqbhQR1lWYNiGyEEMS1CF411lBW572SOuom047yX8eSqkd 55B81qOuc8gVlb4CjHfXQBwIU+JO/TLZMKwOoM2hyEyfUd9R91ZEk40hqzpGrW2aVLY0 Rr2+4CUQ7VgsXVg3hDlamaO6/c1674Cdy6zilw5STUCtz0Z/oMIzQFREIedbPhZ8GPYM UzHvnV+DF1ar6CJlc92Rvh19qpXDZUPLe7dnZu9P5S4TZc//k/G0HlwOV0eX8J8LSVp1 hozQ== X-Gm-Message-State: AO0yUKXylNuhj4YxCbdYdhZ48BRI+2/TevzBmZ8Aq1qE1zt97iKnwex6 ggdhdHZgzEzTOYaMzPwPRtlXaA== X-Google-Smtp-Source: AK7set/9NlU2XvBM44O36KyKDqu4jGjPUE1J4K5RfD6p9LeuiO/0tRaayjwnEMk7x03ILNMqp8dz6Q== X-Received: by 2002:a05:6870:a552:b0:15e:cbdb:ad7b with SMTP id p18-20020a056870a55200b0015ecbdbad7bmr8100036oal.52.1675490943548; Fri, 03 Feb 2023 22:09:03 -0800 (PST) Received: from localhost ([189.100.172.221]) by smtp.gmail.com with ESMTPSA id f4-20020a056870d30400b001631c5f7404sm1579039oag.22.2023.02.03.22.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 22:09:03 -0800 (PST) References: <20230130044518.3322695-1-thiago.bauermann@linaro.org> <20230130044518.3322695-6-thiago.bauermann@linaro.org> <87bkmdtp4n.fsf@redhat.com> <502f0bd0-9b18-9a31-0094-7a9bd4778bd2@simark.ca> <87r0v7alq1.fsf@linaro.org> <45bd55f5-d33b-58f7-0ac6-13d31c4d03f5@simark.ca> <875ycja2n6.fsf@linaro.org> <87v8kir9tw.fsf@redhat.com> User-agent: mu4e 1.8.13; emacs 28.2 From: Thiago Jung Bauermann To: Andrew Burgess Cc: Simon Marchi , Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH v3 5/8] gdbserver: Transmit target description ID in thread list and stop reply In-reply-to: <87v8kir9tw.fsf@redhat.com> Date: Sat, 04 Feb 2023 06:08:59 +0000 Message-ID: <87tu02m078.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Andrew Burgess via Gdb-patches writes: > Thiago Jung Bauermann writes: > >> I suggested a prefix to designate an integer ID as a way to implement >> only this possibility for now, but which would allow implementing hash >> IDs later, as additional prefixes. Or another possibility is that if we >> later decide to support hashes, we could add a separate protocol feature >> to signal that. > > So, I'd also be in favour of supporting the simple "just a number" > scheme. Not everything that talks to GDB is our GDBServer, and not > every target might have the right hashing library. I'd hate to force > folk to have to implement some hashing code, just to use this feature of > the remote protocol. Yes, that is a good point. > I have a proposal for how to negotiate different ID types without > adding a prefix to every ID sent from gdbserver... > > We don't need to use a prefix in the actual ID. I believe you're > already adding a qSupported feature for per-thread-tdesc. The > qSupported mechanism already supports value passing. > > So, we could pass a value back and forth in the qSupported negotiation > where GDB and GDBServer can agree on a numbering scheme. =E2=8B=AE =E2=8B=AE > The great thing about this is that the hard work here is all in writing > the documentation. :-) > To begin with you _only_ need to support the 'N' scheme. GDB always > sends out just 'per-thread-tdesc=3DN', GDBServer just checks that the > value is 'N', and replies 'per-thread-tdesc=3DN'. GDB checks that the > return value is also 'N', and then we carry on as before. BUT, we now > have a planned route to add more complex schemes in the future. This is a great idea! Thank you for coming up with it. I will implement it for the next version of the patch series. --=20 Thiago