From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 1mHJDJqFNGh4RjUAWB0awg (envelope-from ) for ; Mon, 26 May 2025 11:15:38 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=HwALk/1z; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 202D21E11C; Mon, 26 May 2025 11:15:38 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B2A491E102 for ; Mon, 26 May 2025 11:15:36 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E0BC385DC1F for ; Mon, 26 May 2025 15:15:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E0BC385DC1F Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=HwALk/1z Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by sourceware.org (Postfix) with ESMTPS id B80A7385C416 for ; Mon, 26 May 2025 15:12:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B80A7385C416 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B80A7385C416 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::243 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1748272351; cv=none; b=JcVnpfmWWFraBrsv70IZmmdid085ZIyLVja16CV6KZwdGuh96gjxhcLwnyvWIG8v2rlgpg+YFnFfFYjVMyV/RwBcf+7b/nx5pOBSCJyHaNqO41Wr5fnl4urRGbIUsqiYeFSYfBX25CTyE7MJVwL7PMOmnO06bdxAnFzX2TcHJbs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1748272351; c=relaxed/simple; bh=Xj43jUkIp69U4fQTZusrUks21p4fdHRETHX7kpLgkDE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=iizkqy2XE4NoRc2HXobg13VDEvz8Xkg32Pwx8ij+4ZyEkC9fhnAUtahvbjn3KaMSf4aSQl74N1ODOKkuTP/xOUOup1W8oim29jLawMutvDXztTZz1pk8UpHE+MAiS039UwyjQm9Adzgi13bZhidYTk7qK5WYwjM3cqwBOzsPzLE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B80A7385C416 Received: by mail-oi1-x243.google.com with SMTP id 5614622812f47-3fbc00143d6so1452894b6e.3 for ; Mon, 26 May 2025 08:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748272351; x=1748877151; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=cwO2JEzBesChIXW5gfEd1luP+o8HBcRV6RDHv6ZZGGU=; b=HwALk/1z8+esin7w4BTluHQCYn+lPm2LGZbGHodwzpF1BC5+zxzY6ravIDL6LbhmKP FWdYD+Ahd9VDJpiMMaKILvsC9UxuZksl6HiFLe1LezOz8zCXF49CgRJr3NeccrjQnueP MCRtGSrJ12JDyJ3+zOQVD6aJHRTm6FP0581YlNWKpBWsIYqxMpc7vji4Uusl0TOa0Kwl 97S/MIDW8EjpAcSHLh9Ayt8YoS9q+xqqM3vCPNZ1mRqz3AeHE5zz27wPio1CQeS+rSg3 CpBYyLjEw5i9tVMJYuvEMxsOKhWuanvjUUzTLcJ15hs2wr5agFPLjSixT2ld2VUREhNP vFkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748272351; x=1748877151; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cwO2JEzBesChIXW5gfEd1luP+o8HBcRV6RDHv6ZZGGU=; b=WrEebwVo3MXY+mNqGyrMENOyY6931daEwHlsISdmi1x9Amz2G5X1KeWgu5LCo/FZdQ 4uWk7MQfNm197WrqLWlNnQqRN+mM1cuorjj6nAVod2J5rZAX7NVVB6TQdOkLsPf+81zy kfohmvWdJexRe5RLjEF9Of9JooMcwowUbBXBVP7M/lapgIlty0ZLPTo1Ywmbw5uRSgl8 p9mstU125v66J7jwoh1XXMlD1OgcqnoqWMuwlLACs7iKErCkAHj7ETXndYyn0xuyTr3i urGh+yD+bWL7HSillt2AuQ7EufZosm6rn+wbpb2So1SSc0Us0+HbKK2A9Iho6JZzzmCH Ovdw== X-Gm-Message-State: AOJu0YyMQISm/11TXtSGQYiGZ4JFozaRm9h4gyp+PYfMyc1IRCZk6S8W FEGLKTiNxhxxzUUIByqahf6+gwfFU7c0l9tYWpLw6RdWxmaZ/wo1UBF17g3SaqhR0CU= X-Gm-Gg: ASbGnct9BBByZxEHLQGG5A42/IPy0PTy6zjglrDx5SBnLp2pJKlzHn50gHR5gnA/SlP AuOBJXpjojGHpiH4vI0BSTzvm8/VTj1f5GmGrC9rTbUiKxeqX+6viYfxesSJ6RJK9egi7rxdUh8 ybK89MICati2NylDjMhuzO4THOes0hl4vMc3HE3xCyVuap8FN3zDKcNeThKQPgLJeYESEgvC6fS hnry2dhNQCz6QUeZ7J+WPItXuCpfjOKGp6R+J1bb/TSsMEhwXHGBtDEPaab3342JyAyg612GL67 StpSxPrNKrBgZv7iQKqMtwCa6B6w9xo103woYVeyqRm/yALPq1dLQz4zEwD0BF08H61iiLgRhvB OpLEcqy7VPx0CZ4ZJfvrM8AvA/PppEOmNXLsz74HWgxjTsHgTEJIj X-Google-Smtp-Source: AGHT+IFS1hsi+l52ca5yKS/JrTyBalA5HRFwyRmef2Fd4GWGcS+PEJeZUTI7dHG7Lne38Ppr4vHBCw== X-Received: by 2002:a05:6808:398d:b0:402:1caf:7789 with SMTP id 5614622812f47-4064680f4c4mr5288604b6e.14.1748272350878; Mon, 26 May 2025 08:12:30 -0700 (PDT) Received: from localhost.localdomain (99-62-247-245.lightspeed.hstntx.sbcglobal.net. [99.62.247.245]) by smtp.gmail.com with ESMTPSA id 5614622812f47-404d97ed096sm4224518b6e.19.2025.05.26.08.12.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 May 2025 08:12:30 -0700 (PDT) From: Yodel Eldar To: gdb-patches@sourceware.org Cc: Yodel Eldar Subject: [PATCH 0/2] gdb/alpha: Add target description support and fpcr flags Date: Mon, 26 May 2025 10:12:17 -0500 Message-ID: <20250526151219.399450-1-yodel.eldar@gmail.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Please note that the second patch depends on the first. I initially wrote the target description for use in another project, but when I connected GDB to that project's gdbstub during testing, GDB emitted a warning about rejecting the target description (because it does not support them for Alpha); so, I firstly submit it here (along with some plumbing) and would like to assign the copyright to the FSF for the first time. Target description support will allow Alpha target users to easily specify features of their system at hand that GDB does not have itself; e.g., according to [1] (see below), Alpha 21264 (EV6) does not implement the DNOD flag (bit 47) of the fpcr, contrary to other versions; users can easily inform GDB of this difference by dynamically feeding it their desired target description instead of modifying code for recompilation. Furthermore, Alpha's target-dependent code no longer needs helper functions to get the name or type of a requested register as seen with the removal of alpha_register_name and alpha_register_type in patch one; this separation of concerns improves maintainability over the long run. Converting fpcr from an int64 to a flags type with just a few lines of XML in the second patch demonstrates the power of the target description framework in the convenience that it affords. As a control register, the flags type suits the fpcr better than an int64, because it is a bitfield of flags; admittedly, sixteen flags are a lot, but the fpcr does not appear in "info regs" unless the command is invoked with "float" or "all," and its flags will not appear in the output unless they are set. Lastly, this is my first submission to GDB, and I want to take this opportunity to thank all of the incredible folks who have contributed to this beloved project that has helped me better understand what occurs under the hood of programs over the years. Thank you! I welcome any and all suggestions for improvement. [1] https://www.star.bnl.gov/public/daq/HARDWARE/21264_data_sheet.pdf Yodel Eldar (2): gdb/alpha: Add target description support gdb/alpha: Redefine fpcr with fpcr_flags type gdb/NEWS | 2 + gdb/alpha-tdep.c | 87 ++++++++++++----------- gdb/doc/gdb.texinfo | 42 +++++++++++ gdb/features/Makefile | 1 + gdb/features/alpha-core.xml | 136 ++++++++++++++++++++++++++++++++++++ gdb/features/alpha.c | 111 +++++++++++++++++++++++++++++ gdb/features/alpha.xml | 11 +++ 7 files changed, 351 insertions(+), 39 deletions(-) create mode 100644 gdb/features/alpha-core.xml create mode 100644 gdb/features/alpha.c create mode 100644 gdb/features/alpha.xml -- 2.49.0