From patchwork Thu Jul 18 09:45:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 813158 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp209045wro; Thu, 18 Jul 2024 02:47:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXWqaLvXLA6ecIj7YIxnHmo3cAE79nur7WIsGsrU7Lg5w+cOIUUDjhmIuRnELcwDlTmqu3GA1xlHaxmHjJpLAXU X-Google-Smtp-Source: AGHT+IEBWw/4BkcWOkYiNVibYAGcFJ/dHJ83RI0x76L/VcXqtqiWjAhjbaPNbN0zNoVKRDFPuoFj X-Received: by 2002:a05:6214:f29:b0:6b5:e852:725f with SMTP id 6a1803df08f44-6b79c65e9a1mr22969186d6.24.1721296036043; Thu, 18 Jul 2024 02:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721296036; cv=none; d=google.com; s=arc-20160816; b=xH37Z+ph0ITPQWa7K0rRPlICPGgjhgYKqetSIzSDT1Zu+z46Iu2+360bwPI0Hrymow JU210KdLGdxoG+So/wivbLJWS2iyuwYkIKAl4Frs6tf2/KTh6fUVZvUZAkQXgBkvJWBI zrBW+ZY59ioGYjBdrsoWq4yDSsSvF11g13iPFue/yofQr05llLwAaqCeJq1u9N2yC5AU S5JIczE2ipYZPGvy4tX7hReUyLjkYwpI1Jcd70sgRjN7V+NF1FQVfSDU77Jd39AvnucV SD4xRySXupz0QGPkejClcHb3OKSMnICv8wWbXygaadHXUQGZlGnzpDQSRjU6AYMtr05o 3amQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2cfYyhSqeU6lh61PrlYddSdndv7Xezjj0qPHaR6Sb3o=; fh=F2hKSArt4PB9gDPPa8OyXpjrWfyr8VkdzeBnc62+l2E=; b=fFa0o/pf3kVk0YF6FN3zpWp+iJkRmRj3OpgpMHi1NgoC1XNmoKFJOH7jBZup5rSGMv oDDfIZ7N8bqHpVCLXwT4QbTrkQ8tnJbSoxrHL6wXKQakya3tQ4zX0X4ig8cgtmlFxpog ZGAOmDLfPPkQDIz2SQRfponnmhde8gPQjRHuz0eDnbW5Qe00Uq3c0xVmlgfzwLej16Oz QsUghKHHA5kl+Zc7QyEApURNyYvyVAd5yfTYo0g4h+b1D1RdqGoA9xPxxvI1KaZyfUs0 9y8BTZsD3U3Ooq+t5POGtsMlLxuFt0myvf6EB6WYWLfwUCtVbge3bAEUlPiNcDosKnBK RYSw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dMAHTH8x; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b79c93269esi15440656d6.521.2024.07.18.02.47.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 02:47:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dMAHTH8x; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUNhn-0003wR-2f; Thu, 18 Jul 2024 05:45:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNhh-0003Wk-82 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:37 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUNhb-0007dA-Ko for qemu-devel@nongnu.org; Thu, 18 Jul 2024 05:45:37 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a77c1658c68so62453066b.0 for ; Thu, 18 Jul 2024 02:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721295930; x=1721900730; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2cfYyhSqeU6lh61PrlYddSdndv7Xezjj0qPHaR6Sb3o=; b=dMAHTH8xBY2EHU2pf2H0Y3UDAFhH+mmoc4LWBCoD5uaIX2u82EerR+l2OLNW7a7PzD XNz7XPSvfTuF5GEzbkFamRjon/rBu0tsnhbFszqN1O+BKsT+E5iz6pdqiPd16J+RjgS6 u8XUHhQo8fEzFpj6Be2M7PBu3BabKF2Y2fJrdz/Y0vHgxpbGytRdBii0PL2p2FGpXPrk RTO9zEBn7G7ozP6rHb5A5l+M48/vw/Yoyv4v4HqjYs7zTYsyQ5+LU23aPHoFJhCDycFn rTOE/uLSFzjXlJUUGIZZF2+4VUCGXfyIZaHG/pU0VjTXJ1L/P5jZZzFyzbMWQp9uJpLO eMdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721295930; x=1721900730; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2cfYyhSqeU6lh61PrlYddSdndv7Xezjj0qPHaR6Sb3o=; b=ZLcQWS7h8esotnh3WVM6Q5IPymf7C879Rj3bCnk+lOvcPS/MOu+0x1C+vPSTD1+6FO 5zfQlfDbRXcN6vsFkvhsBd0SFSjRGBNVsi0Ng2+oLDAeh6zUvJVxyEUEZn6siwVYbrcF N1BzDWpYTPsxXyy9o0POZeZG4YRj1ycb2fFyuoyhQqYskKrAvh0bUwR5CUuuvXSBlKLP axiEJUOJARVVUKX7lgmfQqGidXgdp6PGMgBKezlXiyr71N4vMHiE0hD3m+pgbY6jtFVl j0LUdTjUru0j/QqG77gY0lJZ3zpM5f/qyskv++kZKPmFYuB6QCjecy9zzsARbzcs9VZE B8Zg== X-Gm-Message-State: AOJu0Yz4THDfUqJrgTaol2cbsLpPDMWpXrNgK44yBf74LatG0pvkDmrI 1sDtbfBni8gbBJQWJGugBVItYUG3dB8ZPyLZxxA+tT+qYiRih3CxFc1mQqrtgK8= X-Received: by 2002:a17:906:fd8b:b0:a77:a630:cf89 with SMTP id a640c23a62f3a-a7a00ef47a6mr364181766b.0.1721295929671; Thu, 18 Jul 2024 02:45:29 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc5b7e50sm537503566b.69.2024.07.18.02.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 02:45:28 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AB4EC5FA3B; Thu, 18 Jul 2024 10:45:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aurelien Jarno , Thomas Huth , Daniel Henrique Barboza , Alexandre Iooss , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , qemu-arm@nongnu.org, Bin Meng , qemu-riscv@nongnu.org, Aleksandar Rikalo , Pierrick Bouvier , Liu Zhiwei , Peter Maydell , Wainer dos Santos Moschetta , Palmer Dabbelt , Beraldo Leal , Li-Wen Hsu , Ed Maste , Richard Henderson , Weiwei Li , Alistair Francis , Max Filippov , Mahmoud Mandour , Paolo Bonzini , Laurent Vivier , =?utf-8?b?RnLDqWTDqXJpYyBQw6l0cm90?= Subject: [PATCH 07/15] plugins/execlog.c: correct dump of registers values Date: Thu, 18 Jul 2024 10:45:15 +0100 Message-Id: <20240718094523.1198645-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718094523.1198645-1-alex.bennee@linaro.org> References: <20240718094523.1198645-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Frédéric Pétrot 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 Reviewed-by: Pierrick Bouvier Message-Id: <20240620083805.73603-1-frederic.petrot@univ-grenoble-alpes.fr> Signed-off-by: Alex Bennée --- 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]); }