qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Frédéric Pétrot" <frederic.petrot@univ-grenoble-alpes.fr>
To: alex.bennee@linaro.org, erdnaxe@crans.org, ma.mandourr@gmail.com,
	pierrick.bouvier@linaro.org
Cc: qemu-devel@nongnu.org,
	"Frédéric Pétrot" <frederic.petrot@univ-grenoble-alpes.fr>
Subject: [PATCH] plugins/execlog.c: correct dump of registers values
Date: Thu, 20 Jun 2024 10:38:05 +0200	[thread overview]
Message-ID: <20240620083805.73603-1-frederic.petrot@univ-grenoble-alpes.fr> (raw)

Register values are dumped as 'sz' chunks of two nibbles in the execlog
plugin, sz was 1 too big.

Signed-off-by: Frédéric Pétrot <frederic.petrot@univ-grenoble-alpes.fr>
---
 contrib/plugins/execlog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c
index 371db97eb1..1c1601cc0b 100644
--- a/contrib/plugins/execlog.c
+++ b/contrib/plugins/execlog.c
@@ -101,7 +101,7 @@ static void insn_check_regs(CPU *cpu)
             GByteArray *temp = reg->last;
             g_string_append_printf(cpu->last_exec, ", %s -> 0x", reg->name);
             /* TODO: handle BE properly */
-            for (int i = sz; i >= 0; i--) {
+            for (int i = sz - 1; i >= 0; i--) {
                 g_string_append_printf(cpu->last_exec, "%02x",
                                        reg->new->data[i]);
             }
-- 
2.39.2



             reply	other threads:[~2024-06-20  8:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20  8:38 Frédéric Pétrot [this message]
2024-06-20 18:38 ` [PATCH] plugins/execlog.c: correct dump of registers values Pierrick Bouvier
2024-07-17 18:09 ` Alex Bennée

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=20240620083805.73603-1-frederic.petrot@univ-grenoble-alpes.fr \
    --to=frederic.petrot@univ-grenoble-alpes.fr \
    --cc=alex.bennee@linaro.org \
    --cc=erdnaxe@crans.org \
    --cc=ma.mandourr@gmail.com \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.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 NNTP newsgroup(s).