From: Eli Zaretskii <eliz@gnu.org>
To: Aaron Griffith <aargri@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/doc: qSearch:memory packets use escaped binary patterns
Date: Sun, 17 Aug 2025 07:36:36 +0300 [thread overview]
Message-ID: <86y0riimy3.fsf@gnu.org> (raw)
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)
> From: Aaron Griffith <aargri@gmail.com>
> 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 <eliz@gnu.org>
next prev parent reply other threads:[~2025-08-17 4:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 20:52 Aaron Griffith
2025-08-17 4:36 ` Eli Zaretskii [this message]
2025-08-30 8:05 ` Eli Zaretskii
2025-08-30 11:49 ` Aaron Griffith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86y0riimy3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=aargri@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox