From: Bruno Larsen <blarsen@redhat.com>
To: gdb-patches@sourceware.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH v3] gdb: add 'maintenance print record-instruction' command
Date: Wed, 4 Jan 2023 11:30:23 +0100 [thread overview]
Message-ID: <46b65187-a6e8-20a1-7820-37d3dde95357@redhat.com> (raw)
In-Reply-To: <20221222154338.2223678-1-blarsen@redhat.com>
On 22/12/2022 16:43, Bruno Larsen wrote:
> 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.
>
> If there isn't enough history to print the desired instruction (such as
> when the user hasn't started recording yet or when they request 2
> instructions back but only 1 was recorded), GDB warns the user like so:
>
> (gdb) maint print record-instruction
> Not enough recorded history
>
> If there is enough, GDB prints the instruction like so:
>
> (gdb) maint print record-instruction
> 4 bytes of memory at address 0x00007fffffffd5dc changed from: 01 00 00 00
> Register eflags changed: [ IF ]
> Register rip changed: (void (*)()) 0x401115 <main+15>
>
> Approved-by: Eli Zaretskii<eliz@gnu.org>
Thanks everyone who reviewed. I implemented the suggestions and pushed
the patch
--
Cheers,
Bruno
prev parent reply other threads:[~2023-01-04 10:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 15:43 Bruno Larsen
2023-01-02 15:37 ` Alexandra Petlanova Hajkova
2023-01-03 9:00 ` Bruno Larsen
2023-01-02 16:26 ` Lancelot SIX
2023-01-02 16:56 ` Bruno Larsen
2023-01-03 16:10 ` Lancelot SIX
2023-01-03 17:04 ` Tom Tromey
2023-01-04 10:30 ` Bruno Larsen [this message]
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=46b65187-a6e8-20a1-7820-37d3dde95357@redhat.com \
--to=blarsen@redhat.com \
--cc=eliz@gnu.org \
--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).