From nobody Wed May 15 10:16:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1541207243275857.9810433372312; Fri, 2 Nov 2018 18:07:23 -0700 (PDT) Received: from localhost ([::1]:53852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIkPA-0005nK-RO for importer@patchew.org; Fri, 02 Nov 2018 21:07:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIkOD-0005PY-Ha for qemu-devel@nongnu.org; Fri, 02 Nov 2018 21:06:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIkOB-0000gu-U7 for qemu-devel@nongnu.org; Fri, 02 Nov 2018 21:06:13 -0400 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]:44112) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIkOB-0000d8-5j; Fri, 02 Nov 2018 21:06:11 -0400 Received: by mail-lf1-x141.google.com with SMTP id m18-v6so2480031lfl.11; Fri, 02 Nov 2018 18:06:10 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net. (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id 67-v6sm163092ljc.26.2018.11.02.18.06.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Nov 2018 18:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=oVdPIZ8IguyG2PRRTrcGjHNDx11jLOcNrh6PqsIrbKw=; b=Pcn+g0XTRrFChFNRq89id59psPG8AQfvW+DQk1taigDIbK/0afxTdHqpuI3QvXioEd FbSmmsyUd+oXP/dS6GFV5Sc1Dlb8YrQ4wa0Owpj+O4uAssq20S9xJ4ZGMXmKF3HFYZpO MvMi0POACVPRSBc39pLN6yvbhgu5BN9/Zlr3li2tvwnE5b8dGQx5AvZbDKixxU0blb6Y jHsJgr7PlDJTXAuvjJfXQaVdJzBIE61OKG5PiQYlOiw1TA7T6vmXmkqzF/ZIfAxm/Uai QuP12cFlqQ5uWKJnOO6BuwLraK50+GooiLO1wM/JSWz9K860wnlMGT+I5JwQr79I9qe3 gYug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oVdPIZ8IguyG2PRRTrcGjHNDx11jLOcNrh6PqsIrbKw=; b=FNl8o4AhWeNzMDCEcXlGsLCp35I0s782o6iuSB0NwxIOL2Rn/CX/T8lnyf/YrM6LUc XNm4PCj8JK1Sxrw7NIOzojB5L5zPMjbaEc49yfkIywIYow1dll0qLEnALiUKNUx8CdhT ioKlFpGD493Jfy0tTr1I7pvrj9tPIUOTSFwxqqWDMv0uLSdTwn5A5Gli0aJpJP4+xbOt Aynj9m1tc7FU7K6NyGIGZStb5KhfX3/XTq24WnwfITXdFWwBZ7VK4twAPQu12dXhnDRL Uz4hGKmsiTbwHc4tvMjJY6BO+DTCCLoLmE+i3DZSYosVgjyExmbgvafFRROtBOkQgExO Klvg== X-Gm-Message-State: AGRZ1gL8oq/GBiQzJXEscjsL8ywgb/SA8DI9Po+GALMv+rJ7roE0O46K cF/yiTdDnrqvCsY+KL9MlIg/sgig X-Google-Smtp-Source: AJdET5cHbpoKmkOEwFPok/xwHNAi986noxgzCpOZ7UZuB+A3VDj+HhZDtpfqHawPvV8oWmVm+HNN9g== X-Received: by 2002:a19:5f1e:: with SMTP id t30mr7714561lfb.76.1541207168823; Fri, 02 Nov 2018 18:06:08 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Fri, 2 Nov 2018 18:05:56 -0700 Message-Id: <20181103010556.7030-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::141 Subject: [Qemu-devel] [PATCH v2] target/xtensa: drop num_[core_]regs from dc232b/dc233c configs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" gdb_regmap::num_core_regs field is initialized incorrectly in the dc232b and dc233c configurations. As a result the following message is displayed when attaching to an xtensa linux-user process: "Register 105 is not available", and gdb is unable to control the inferior. Now that xtensa_count_regs does the right thing, remove manual initialization of these fields from the affected configurations and let xtensa_finalize_config initialize them. Add XTREG_END to terminate register lists. Cc: qemu-stable@nongnu.org Signed-off-by: Max Filippov --- Changes v1->v2: - add XTREG_END terminators to the register lists target/xtensa/core-dc232b.c | 2 -- target/xtensa/core-dc232b/gdb-config.inc.c | 1 + target/xtensa/core-dc233c.c | 2 -- target/xtensa/core-dc233c/gdb-config.inc.c | 1 + 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/xtensa/core-dc232b.c b/target/xtensa/core-dc232b.c index 71313378409e..7851bcb63687 100644 --- a/target/xtensa/core-dc232b.c +++ b/target/xtensa/core-dc232b.c @@ -40,8 +40,6 @@ static XtensaConfig dc232b __attribute__((unused)) =3D { .name =3D "dc232b", .gdb_regmap =3D { - .num_regs =3D 120, - .num_core_regs =3D 52, .reg =3D { #include "core-dc232b/gdb-config.inc.c" } diff --git a/target/xtensa/core-dc232b/gdb-config.inc.c b/target/xtensa/cor= e-dc232b/gdb-config.inc.c index 13aba5edecd6..d87168628be8 100644 --- a/target/xtensa/core-dc232b/gdb-config.inc.c +++ b/target/xtensa/core-dc232b/gdb-config.inc.c @@ -259,3 +259,4 @@ 0, 0, 0, 0, 0, 0) XTREG(119, 476, 32, 4, 4, 0x000f, 0x0006, -2, 8, 0x0100, a15, 0, 0, 0, 0, 0, 0) + XTREG_END diff --git a/target/xtensa/core-dc233c.c b/target/xtensa/core-dc233c.c index d701e3f5de07..8853bfd4d08f 100644 --- a/target/xtensa/core-dc233c.c +++ b/target/xtensa/core-dc233c.c @@ -40,8 +40,6 @@ static XtensaConfig dc233c __attribute__((unused)) =3D { .name =3D "dc233c", .gdb_regmap =3D { - .num_regs =3D 121, - .num_core_regs =3D 52, .reg =3D { #include "core-dc233c/gdb-config.inc.c" } diff --git a/target/xtensa/core-dc233c/gdb-config.inc.c b/target/xtensa/cor= e-dc233c/gdb-config.inc.c index b632341b28ec..7e8963227fc0 100644 --- a/target/xtensa/core-dc233c/gdb-config.inc.c +++ b/target/xtensa/core-dc233c/gdb-config.inc.c @@ -143,3 +143,4 @@ XTREG(117, 468, 32, 4, 4, 0x000c, 0x0006, -2, 8, 0x0100= , a12, 0, 0, 0, 0 XTREG(118, 472, 32, 4, 4, 0x000d, 0x0006, -2, 8, 0x0100, a13, 0, 0= , 0, 0, 0, 0) XTREG(119, 476, 32, 4, 4, 0x000e, 0x0006, -2, 8, 0x0100, a14, 0, 0= , 0, 0, 0, 0) XTREG(120, 480, 32, 4, 4, 0x000f, 0x0006, -2, 8, 0x0100, a15, 0, 0= , 0, 0, 0, 0) +XTREG_END --=20 2.11.0