Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb/doc: qSearch:memory packets use escaped binary patterns
@ 2025-08-16 20:52 Aaron Griffith
  2025-08-17  4:36 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Aaron Griffith @ 2025-08-16 20:52 UTC (permalink / raw)
  To: gdb-patches

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>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdb/doc: qSearch:memory packets use escaped binary patterns
  2025-08-16 20:52 [PATCH] gdb/doc: qSearch:memory packets use escaped binary patterns Aaron Griffith
@ 2025-08-17  4:36 ` Eli Zaretskii
  2025-08-30  8:05   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2025-08-17  4:36 UTC (permalink / raw)
  To: Aaron Griffith; +Cc: gdb-patches

> 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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdb/doc: qSearch:memory packets use escaped binary patterns
  2025-08-17  4:36 ` Eli Zaretskii
@ 2025-08-30  8:05   ` Eli Zaretskii
  2025-08-30 11:49     ` Aaron Griffith
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2025-08-30  8:05 UTC (permalink / raw)
  To: gdb-patches; +Cc: aargri

> Date: Sun, 17 Aug 2025 07:36:36 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: gdb-patches@sourceware.org
> 
> > 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>

Any objections to me installing these changes, anyone?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdb/doc: qSearch:memory packets use escaped binary patterns
  2025-08-30  8:05   ` Eli Zaretskii
@ 2025-08-30 11:49     ` Aaron Griffith
  0 siblings, 0 replies; 4+ messages in thread
From: Aaron Griffith @ 2025-08-30 11:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

On Sat, Aug 30, 2025 at 4:05 AM Eli Zaretskii <eliz@gnu.org> wrote:
> Any objections to me installing these changes, anyone?

Oh! I pushed this patch to master (4abe8b9) after your approval and after
waiting until the end of the week for objections. It looks like I forgot to
circle back here and say so.

That seemed like the correct thing to do, but I'm new to this process. My
apologies if that was a mistake.

 -Aaron

[-- Attachment #2: Type: text/html, Size: 584 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-30 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-16 20:52 [PATCH] gdb/doc: qSearch:memory packets use escaped binary patterns Aaron Griffith
2025-08-17  4:36 ` Eli Zaretskii
2025-08-30  8:05   ` Eli Zaretskii
2025-08-30 11:49     ` Aaron Griffith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox