public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Bruno Larsen via Gdb-patches <gdb-patches@sourceware.org>
Cc: Bruno Larsen <blarsen@redhat.com>
Subject: Re: [PATCH] gdb: add 'maintenance print record-instruction' command
Date: Thu, 15 Dec 2022 14:29:21 -0700	[thread overview]
Message-ID: <87cz8kcq4u.fsf@tromey.com> (raw)
In-Reply-To: <20221207135000.1344331-1-blarsen@redhat.com> (Bruno Larsen via Gdb-patches's message of "Wed, 7 Dec 2022 14:50:00 +0100")

>>>>> "Bruno" == Bruno Larsen via Gdb-patches <gdb-patches@sourceware.org> writes:

Bruno> While chasing some reverse debugging bugs, I found myself wondering what
Bruno> was recorded by GDB to undo and redo a certain instruction. This commit
Bruno> implements a simple way of printing that information.

Thanks.  The idea seems fine to me.

Bruno> +	      gdb_byte* b = record_full_get_loc (to_print);

The "* " should be " *", there's a few of these.

Bruno> +		gdb_printf (" %02x",b[i]);

Missing a space after the ",", also a few of these.

Bruno> +  add_cmd ("record-instruction", class_maintenance,
Bruno> +	   maintenance_print_record_instruction,
Bruno> +	   _("\
Bruno> +Print a recorded instruction.\nIf no argument is provided, print the last \
Bruno> +instruction recorded.\nIf a negative argument is given, prints how the nth \
Bruno> +previous instruction will be undone.\nIf a positive argument is given, prints \
Bruno> +how the nth following instruction will be redone."), &maintenanceprintlist);

IMO it's better to end the lines with \n\ so that the line breaks are
very clear when reading the text in the source.

Tom

      parent reply	other threads:[~2022-12-15 21:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 13:50 Bruno Larsen
2022-12-07 14:37 ` Lancelot SIX
2022-12-08  8:45   ` Bruno Larsen
2022-12-08  9:32     ` Lancelot SIX
2022-12-15 21:27   ` Tom Tromey
2022-12-15 21:29 ` Tom Tromey [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=87cz8kcq4u.fsf@tromey.com \
    --to=tom@tromey.com \
    --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).