From: Eli Zaretskii <eliz@gnu.org>
To: "Jose E. Marchesi" <jose.marchesi@oracle.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/1] Integrate GNU poke in GDB
Date: Mon, 10 May 2021 19:56:29 +0300 [thread overview]
Message-ID: <83pmxy5xz6.fsf@gnu.org> (raw)
In-Reply-To: <20210510151044.20829-2-jose.marchesi@oracle.com> (gdb-patches@sourceware.org)
> Date: Mon, 10 May 2021 17:10:44 +0200
> From: "Jose E. Marchesi via Gdb-patches" <gdb-patches@sourceware.org>
>
> This patch integrates GNU poke (http://jemarch.net/poke) in GDB by
> mean of libpoke. It allows the GDB user to execute Poke code from
> within the debugger with access to the target memory, types and
> values.
Thanks.
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -10245,6 +10245,7 @@ being passed the type of @var{arg} as the argument.
> * Caching Target Data:: Data caching for targets
> * Searching Memory:: Searching memory for a sequence of bytes
> * Value Sizes:: Managing memory allocated for values
> +* Poke:: Poking at data using GNU poke.
^^^^
@samp{poke}, please.
> +@c XXX example: saving some memory in a file (opening other IO spaces)
What's this comment about?
> +@node Poke
> +@section Poking at data using GNU poke
Likewise, please use @samp for "poke" in the section name and in the
text (but not the node name).
> +(with big P) that is specifically designed in order to describe the
^^^^^
"capital P"
> +certain GDB abstractions (such as symbols and types) visible from the
^^^
@value{GDBN}
> +the Poke language in detail. @xref{Top,,, poke, The GNU poke Manual}
> +for more information. ^
Please add a comma there.
> +* The @command{poke} Command:: Executing Poke from @value{GDBN}.
> +* Poking the Target Memory:: Accessing the target's memory from Poke.
> +* @value{GDBN} Types and Poke:: Accessing @value{GDBN} types from Poke.
> +* @value{GDBN} Values and Poke:: Accessing @value{GDBN} values from Poke.
> +@end menu
> +
> +@node The @command{poke} Command
> +@subsection The @command{poke} Command
> +
> +The @command{poke} command allows to execute arbitrary Poke code from
> +the @value{GDBN} prompt.
@command is wrong for GDB commands. Our convention is to use @code.
> +(@value{GDBP}) type Packet = struct @{ byte magic == 0x4a; byte sz; byte[sz] payload; @}
This line is too long, it will typeset badly in the printed version.
Please break it into two or more lines.
> +This loads a file @dfn{foo.pk} if it is found in the load path:
^^^^
@file, not @dfn (here and elsewhere).
> +To Poke source files containing definitions that conceptually apply to
> +some definite domain, we call them @dfn{pickles}. For example,
"To Poke ..., we call them "pickles""? That sounds incorrect English
to me, do you want to rephrase?
> +(@value{GDBP}) spoke string[3] @@ 0x5ff0#B
^^^^^
"spoke"?
> +Note that the fact the current IO space is the GDB target memory
^^^
@value{GDBN}
> +If you close the default IO space you can re-open the GDB target space
^^^
Likewise.
> +Note how two types are added: the requested @code{struct person} and
> +also @code{int}, since the struct contains a field of that basic C
> +type. Let's take a look to the type definitions:
^^
Two spaces between sentences.
> +type struct_person = struct @{int age; offset<uint<64>,B> name @@ 8#B; offset<uint<64>,B> postal_address;@};
This line is too long.
> +If we wanted to add all the types known to GDB to poke, we could so do
^^^
@value{GDBN}
> +Poke variables are not the same than GDB symbols, and live in a
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"not the same as @value{GDBN} symbols"
> +separated world of their own. However, it is possible to refer to GDB
^^ ^^^
Two spaces, and @value{GDBN} again.
> +Since many @value{GDBN} values are pointers, it is possible to access
> +to the address of a value by using the @code{$addr::IDENTIFIER} ^^^^^
^^^^^^^^^^^^^^
"access the address", without the "to".
next prev parent reply other threads:[~2021-05-10 16:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 15:10 [PATCH 0/1] " Jose E. Marchesi
2021-05-10 15:10 ` [PATCH 1/1] " Jose E. Marchesi
2021-05-10 16:56 ` Eli Zaretskii [this message]
2021-05-10 18:49 ` Jose E. Marchesi
2021-05-10 18:52 ` Eli Zaretskii
2021-05-11 7:33 ` Andrew Burgess
2021-05-11 13:07 ` Jose E. Marchesi
2021-05-12 8:52 ` Andrew Burgess
2021-05-12 10:14 ` Jose E. Marchesi
2021-05-13 16:59 ` Tom Tromey
2021-05-10 18:39 ` [PATCH 0/1] " Simon Marchi
2021-05-10 20:07 ` Jose E. Marchesi
2021-05-11 6:25 ` Andrew Burgess
2021-05-13 17:04 ` Tom Tromey
2021-05-11 18:56 ` Tom Tromey
2021-05-12 8:06 ` Jose E. Marchesi
2021-05-13 15:52 ` Tom Tromey
2021-05-14 20:52 ` Jose E. Marchesi
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=83pmxy5xz6.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=jose.marchesi@oracle.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).