From: Aaron Griffith <aargri@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] gdb/doc: qSearch:memory packets use escaped binary patterns
Date: Sat, 16 Aug 2025 16:52:54 -0400 [thread overview]
Message-ID: <20250816-qsearch-doc-binary-v1-1-55e8f1864ddd@gmail.com> (raw)
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
---
base-commit: e579b537353cd91cb8fac1eaeb69901d4936766f
change-id: 20250816-qsearch-doc-binary-d30a82314be5
Best regards,
--
Aaron Griffith <aargri@gmail.com>
next reply other threads:[~2025-08-16 20:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 20:52 Aaron Griffith [this message]
2025-08-17 4:36 ` Eli Zaretskii
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=20250816-qsearch-doc-binary-v1-1-55e8f1864ddd@gmail.com \
--to=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