From: Eli Zaretskii <eliz@gnu.org>
To: Bruno Larsen <blarsen@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb: add 'maintenance print record-instruction' command
Date: Mon, 12 Dec 2022 15:54:10 +0200 [thread overview]
Message-ID: <83a63ssp6l.fsf@gnu.org> (raw)
In-Reply-To: <20221212104417.136536-1-blarsen@redhat.com> (message from Bruno Larsen via Gdb-patches on Mon, 12 Dec 2022 11:44:17 +0100)
> Cc: Bruno Larsen <blarsen@redhat.com>
> Date: Mon, 12 Dec 2022 11:44:17 +0100
> From: Bruno Larsen via Gdb-patches <gdb-patches@sourceware.org>
>
> While chasing some reverse debugging bugs, I found myself wondering what
> was recorded by GDB to undo and redo a certain instruction. This commit
> implements a simple way of printing that information.
> ---
> gdb/NEWS | 6 ++++
> gdb/doc/gdb.texinfo | 8 +++++
> gdb/record-full.c | 81 +++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 95 insertions(+)
Thanks.
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -103,6 +103,12 @@
>
> * New commands
>
> +maintenance print record-instruction [ N ]
> + Print the recorded information for a given instruction. If N is not given
> + prints how GDB would undo the last instruction executed. If N is negative,
> + prints how GDB would undo the N-th previous instruction, and if N is
> + positive, it prints how GDB will redo the N-th following instruction.
This part is OK.
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -40531,6 +40531,14 @@ that symbol is described. The type chain produced by this command is
> a recursive definition of the data type as stored in @value{GDBN}'s
> data structures, including its flags and contained types.
>
> +@kindex maint print record-instruction
> +@item maint print record-instruction
> +@itemx maint print record-instruction @var{N}
> +@cindex print how GDB recorded a given instruction. If N is not positive
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Some editing snafu happened here, it seems?
> +number, it prints the values stored by the inferior before the N-th previous
> +instruction was exectued. If N is positive, print the values after the N-th
> +following instruction is executed. If N is not given, 0 is assumed.
In all places where you use "M" (upper-case), you should use "@var{n}"
(with @var and in lower-case).
The gdb.texinfo part is OK with those nits fixed.
next prev parent reply other threads:[~2022-12-12 13:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 10:44 Bruno Larsen
2022-12-12 13:54 ` Eli Zaretskii [this message]
2022-12-14 0:46 ` Lancelot SIX
2022-12-14 10:04 ` Lancelot SIX
2022-12-14 16:30 ` Tom Tromey
2022-12-16 10:03 ` Bruno Larsen
2022-12-16 13:25 ` Pedro Alves
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=83a63ssp6l.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=blarsen@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).