From nobody Thu Jan 8 13:17:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767128939; cv=none; d=zohomail.com; s=zohoarc; b=UEpukQuCUq5ymKczI0J4nvCNKWm5nEC8t7Q4oN+2uyXOP3Vh2eNjpliy63JjPZofR0EcrjBtG6GC1oInOaVFyF7+0ofZcYg6C/FOhqum3RLi4d7PsgouCJFhaJWALyd/W7dLHqwmc8Mfn+ikic8qMb6S3rtfqhnhzPiE4sNPQng= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767128939; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=J6K9VfrYM9O58NYLBO+LcXYAGm/XGIvX82MjEg9FdAU=; b=H9DWeCXLum2AFIt+GXTK5GwQj3JPoXuYR4C99FICGtDGbC/JVgjstygP2eQbLjuJhiKyF21jGrUo1l6UyRc0xpiKPm8wuxlda9TXFg7fEnbjcKwkEU004H3uu6TBECCnMEAiHgc5sNq9nsgZ8uZsoWsXI5OPJJXM5QSu2D6NwzM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767128939052895.533920834103; Tue, 30 Dec 2025 13:08:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vagxW-00053s-DU; Tue, 30 Dec 2025 16:08:50 -0500 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 1vagxU-000537-Jv for qemu-devel@nongnu.org; Tue, 30 Dec 2025 16:08:48 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vagxT-0002G0-3O for qemu-devel@nongnu.org; Tue, 30 Dec 2025 16:08:48 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4779aa4f928so103152855e9.1 for ; Tue, 30 Dec 2025 13:08:46 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d193621c8sm609217975e9.7.2025.12.30.13.08.44 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 30 Dec 2025 13:08:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767128925; x=1767733725; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=J6K9VfrYM9O58NYLBO+LcXYAGm/XGIvX82MjEg9FdAU=; b=uz3CsImxacePYGEQ3lQ+2edmNcwQDxP3cdcpB541ZJ7bM2oYb9l9zdRisR6HOjiTBh xVGI9SRHEM+J7NM08GEEWNQBs62phaaidzN/9dP0MMSVVKOBG4qIGcLkPEy8DjfYPm28 XsvnSnDN2zYQfcyOPXYch3pA6QqwtYSpxrpvMfcKXhZ1mkLQ8LtFOYoMDlsZYoIWrywZ mpoqzKWmYd4g9J+vObnr3/JRRThnG4m9v1kL/kBXGWP21zocvehfD4FRmuasNC6RM+nU pVF5L7cLAqZk3KK6N5Fdg2MzVBnqlUgXBwscDC+iCXw0ON5PaY1IiviE+qGQjHtmS4Rs 4Jjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767128925; x=1767733725; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=J6K9VfrYM9O58NYLBO+LcXYAGm/XGIvX82MjEg9FdAU=; b=BZ6bTVlhwqept6y5RRnV8x4AtS9jkrhlh6EpqFG44JzwIdMKH/3b8bFDwb4Ci5MluO UURp2yZgz7jLHQwEuSTPHpbyajbxocS2uJoDewMEK4Chw+4mMwuiFWS9znUM1scKsIEb Uhw2ifpHPQcIwyv1lNVkgm8XonVJXqdyAy3DFz4jJuReylFM/LcYwyEdeY5bWiTefaqQ qjqVzcdp6+Z4TzFB+ZzX6JK1AnPVaicCybLsiuJHFBkdhtVndkAJsgaEjjYe7jGoh5Kn oCfmUUp//jQIw7q3KdmGqJEmWv0AMd4RbCCaQ+g016jpE0X1LA+b32FwU8urqnv6XcSN CeoQ== X-Gm-Message-State: AOJu0YyX7GpDHXotIl8ONJLzNTvbSf5QSagZYIkFI1aaKStsMuqBrCT9 YZyrsrDhGcLfnkZ5P1hXeKhnZ+omJCKpNA2zWIf0tApNRKm2SbkvlDM4KY5uldQR7WKvTUdUhYC bbgrnbFo= X-Gm-Gg: AY/fxX5EJHBNZTUs/bSgYsRKBO4pNX/HuXCMIBuqP1NGlaMkOFWsHDR9MlqVS5MsBGK AUeCZh0NApj7aOocRRxaK3jsUf2uMoKk13efQS/zv0sKkN936qTjCFhZYzMRFRQT4A6y+d9VfjU OyW2pNZUuOOHuO3MmvNiYS01g/T1ix9UDTN5+2Xj5IUz9nHzCY6+DWrCdtRqahH91VbGQvK3sVj DKy84LjU6DXwReBbxEOVuJ4yGxsz50aQamEbd9ML1qGafGkswnPyVO0Dud/E4nX3Csk5QaDcwW6 tO0pEs3BQ+gODRAD+aMBvDAI7cyvD52PpABm39tUHXXVh14kCc8igMQwrVyNKw132xpEjJkbnpR V/GyMMYHYtQMMYiXK7i7nNi4JLRuFoWEo/gOxpjrDIulSIzjayw5EO2Hip3RIVDVqG0q1QbFoaJ KMKdbpYQq0BNuSP10sz6h3W+1LTuAj+EIAXC4+E3tlzuto6SFFfkIif8WXfkzK X-Google-Smtp-Source: AGHT+IHjRJFEPCpmtF1d1fOUz6/NeEeSSDi7ivz4NbqDULRUK52RohkvYyyH+icCxmzz4YWOGdHf1g== X-Received: by 2002:a05:600c:524f:b0:45d:d8d6:7fcc with SMTP id 5b1f17b1804b1-47d1958b73cmr422165405e9.27.1767128925308; Tue, 30 Dec 2025 13:08:45 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 07/34] monitor/hmp: Use plain uint64_t @addr argument in memory_dump() Date: Tue, 30 Dec 2025 22:07:29 +0100 Message-ID: <20251230210757.13803-8-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251230210757.13803-1-philmd@linaro.org> References: <20251230210757.13803-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767128941152158500 memory_dump() takes either hwaddr or vaddr type, depending on the @is_physical argument. Simply use uint64_t type which is common to both. Pad address using field width formatting, removing the need for the target_ulong type. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Manos Pitsidianakis Reviewed-by: Dr. David Alan Gilbert Message-Id: <20251229231546.50604-4-philmd@linaro.org> --- monitor/hmp-cmds-target.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/monitor/hmp-cmds-target.c b/monitor/hmp-cmds-target.c index 51dcb9e314c..e855c0d8a2c 100644 --- a/monitor/hmp-cmds-target.c +++ b/monitor/hmp-cmds-target.c @@ -122,12 +122,13 @@ void hmp_info_registers(Monitor *mon, const QDict *qd= ict) } =20 static void memory_dump(Monitor *mon, int count, int format, int wsize, - hwaddr addr, bool is_physical) + uint64_t addr, bool is_physical) { int l, line_size, i, max_digits, len; uint8_t buf[16]; uint64_t v; CPUState *cs =3D mon_get_cpu(mon); + const unsigned int addr_width =3D is_physical ? 8 : (target_long_bits(= ) * 2); =20 if (!cs && (format =3D=3D 'i' || !is_physical)) { monitor_printf(mon, "Can not dump without CPU\n"); @@ -165,11 +166,7 @@ static void memory_dump(Monitor *mon, int count, int f= ormat, int wsize, } =20 while (len > 0) { - if (is_physical) { - monitor_printf(mon, HWADDR_FMT_plx ":", addr); - } else { - monitor_printf(mon, TARGET_FMT_lx ":", (target_ulong)addr); - } + monitor_printf(mon, "%0*" PRIx64 ":", addr_width, addr); l =3D len; if (l > line_size) l =3D line_size; --=20 2.52.0