From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id vJcZAH1coWiISQUAWB0awg (envelope-from ) for ; Sun, 17 Aug 2025 00:37:17 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=PUSotcvd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E42741E048; Sun, 17 Aug 2025 00:37:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8D92A1E048 for ; Sun, 17 Aug 2025 00:37:13 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 234CF3858C41 for ; Sun, 17 Aug 2025 04:37:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 234CF3858C41 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=PUSotcvd Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id C0D563858C5E for ; Sun, 17 Aug 2025 04:36:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C0D563858C5E 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 C0D563858C5E 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=1755405404; cv=none; b=o0nKPD7X9oaqp9kbz7sp+SOcoDQwnC73Q5fQ6TGafo8Pa4B0NJPZ9DmfZDx0dJLamfctV08Yi7ZU4z3YQq3YfK/w7t2pQwcImebhV892DioedGVB2kMdwTP/EAj7AoUTARUqaYupS6CfD9hudn36BJ3PIX/P2LtlGmIZXdBFtdM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755405404; c=relaxed/simple; bh=dCDntfTzBIm0fs2Sc1o4wXORk65F1o1QWM7EpbgPGrk=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=rvmeyjSL6tr3+IvlR77Oqu1S/U9yhOnO4EyCqJmb49mSrKR9M0HY2g/KNXOKyU/hnAieDSqwk6C86XHLBqr8uTDJTn2QAg0W9Lrwyl6CY7FvnKp3m+nVVu+xuM8w+i+xUUqDjmkPI6bEhol6TThFylBTF8z2WXeLP7Pdy+E4zOk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C0D563858C5E 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 1unV8M-0005EB-Ko; Sun, 17 Aug 2025 00:36:43 -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=vE4cfhNoGcLbwwsaUrBb6DW4JLX7u/Q9Rv/8P6nakso=; b=PUSotcvdWFA2 KNDerl0xSf853tFi/6KEFd7RoKe39CMhBJKeOdF04nfvduCVhYKeoShl5E+cGgVO5eXj4SHN3I3HF k5yc/uJvvty6/Po9VtZHZWdWqulBVxLXL1XIum/RXVYsI5cnuuLePZA85IAKG4BUqnS3kIj3sHsGy /LR2pkLlI53EJ3Hwg2QJPT3hH+0NiSqSPZ/gqM5/cpyygDH3ogaQQKQj0foKx5S6t8eKXaud5+cPl Ek6i/nTbezvAqoxWYbA323LyLjhqmK5lu0Urjh63/Y5F5b3zx0j4d85a7jr+xXgX9s0IbNlkMe0kl 6gh7v0X+VlrwJin7omCavA==; Date: Sun, 17 Aug 2025 07:36:36 +0300 Message-Id: <86y0riimy3.fsf@gnu.org> From: Eli Zaretskii To: Aaron Griffith Cc: gdb-patches@sourceware.org In-Reply-To: <20250816-qsearch-doc-binary-v1-1-55e8f1864ddd@gmail.com> (message from Aaron Griffith on Sat, 16 Aug 2025 16:52:54 -0400) Subject: Re: [PATCH] gdb/doc: qSearch:memory packets use escaped binary patterns References: <20250816-qsearch-doc-binary-v1-1-55e8f1864ddd@gmail.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > From: Aaron Griffith > Date: Sat, 16 Aug 2025 16:52:54 -0400 > > The `qSearch:memory` packet uses hex encoding for the address and > length arguments, but the search-pattern argument uses escaped binary. > > --- > This documentation change can be confirmed two ways: > > * Inspect the packets sent by gdb with `set debug remote`, and then > search memory with e.g. `find &buf[0], +sizeof(buf), "foo"`. > > * The implementation `search_memory` in gdb/remote.c uses > `remote_escape_output` for the pattern argument, and this function > is documented as encoding escaped binary data. > --- > gdb/doc/gdb.texinfo | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index d4a5a632c24306f6c0ff6bd6d14e01a847e9a494..0ae15642c0d1b92f08bbd16011cf0214deec6dfa 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -44887,7 +44887,8 @@ packets.) > @anchor{qSearch memory} > Search @var{length} bytes at @var{address} for @var{search-pattern}. > Both @var{address} and @var{length} are encoded in hex; > -@var{search-pattern} is a sequence of bytes, also hex encoded. > +@var{search-pattern} is a sequence of binary-encoded bytes > +(@pxref{Binary Data}). > > Reply: > @table @samp Thanks, this is okay, as far as the Texinfo markup and the language are concerned (I have no knowledge about the actual issue, but I expect others to comment if they disagree). Approved-By: Eli Zaretskii