From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id TD7CHTreemlc5xoAWB0awg (envelope-from ) for ; Wed, 28 Jan 2026 23:12:42 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=LiXdgaMd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5A2C21E0DD; Wed, 28 Jan 2026 23:12:42 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 98C741E089 for ; Wed, 28 Jan 2026 23:12:41 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 00F1C4BAE7C7 for ; Thu, 29 Jan 2026 04:12:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00F1C4BAE7C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1769659961; bh=S3i2Z3sPxzAL7AESkKwK67KgRo3rCI+HqHqTlrVw6a4=; h=To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=LiXdgaMdcVg5XugCfBf3lGTdNfSZx/YBXh1Ow8USMuAVWyL/QaCGPAU3d0AUULSu3 sQlPQNAJf2uidW9pBvqcys0Pbh/FpnUOw6nIxDo5E/7gouxjoIzuem+2kxmJ6tMPt7 hvDuVM0F5Gzssutny9OgUMPFRm8pCT8KxYIR5AWE= Received: from mail-dl1-x1236.google.com (mail-dl1-x1236.google.com [IPv6:2607:f8b0:4864:20::1236]) by sourceware.org (Postfix) with ESMTPS id D1C664BA9015 for ; Thu, 29 Jan 2026 04:12:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1C664BA9015 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D1C664BA9015 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769659926; cv=none; b=kHYWc3wyQ82sNZy/e0Oddts9XNBX1gPiRk0a2maiiPxB4eX4xfj7KEFrhoaxvhd18aQwSTA7rLVYBmhSLzBAy4FANuL8L9Zh4lhXRv8xjo14mSzh7yEs45P65kfaxOm1y9R+kq9ukzFV3BlOdqlCXIFY5AObMss9es3j0srwjec= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769659926; c=relaxed/simple; bh=twONs4zoZ3uV48Q3pTrvtfMXRN+zu3O0J5OVBUIAJTg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ssS9L6nRYe1BK9k/9oHgcfcyhdHhqJkHfEOEkkBWrqH3iO5LFxzsit5yr0/pVoxaz3nqVffQGK9i/ozeNm3uKlhKuUenGOLMfqy42bh6+h7KFTdul/qkFX7kIjEYLBZg/i+rgQ2SazA0U/CTetxnL1iNmdGJsct5esavpHlLwtM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1C664BA9015 Received: by mail-dl1-x1236.google.com with SMTP id a92af1059eb24-1249b9f5703so826181c88.0 for ; Wed, 28 Jan 2026 20:12:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769659925; x=1770264725; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=S3i2Z3sPxzAL7AESkKwK67KgRo3rCI+HqHqTlrVw6a4=; b=YEm34oHxOPSuWrP6M6v3wl/275uyB6Gw5DAHxiLBYP+0+7YgRPLr2z1QDq3ABVhO2W 52o0KoGGOuCCIRIMu7fE8mnXhHzMDxaiotwWIK4s3+v9vcCkVjFtDx2Iqj+xOlXIX92i oic/riT19L4vlCYM5N//+ULYw44Z3zzQlJXqJScR6dM7TwngTHDzotGFd8fukw1ZC9Dn HuP4Wf3PVr7Byv9tbpgc0oSDxnI3DrKmUahMu+75Q8dYpyEJ/FfDdo4nmWxdVS9GdvfU 5wlBPeR8XcHJfwbzOgQ9ZZbxZHhSPyicwRGo9CHQGU+L2lGCSMfLIdYgHPbXs3WlwKbP +txw== X-Forwarded-Encrypted: i=1; AJvYcCXNdOtcbffL1/wIglvmxQ4xsELgjE4/ZE0NxOguhkDeWlCDU8Rf+5k7KNlW2QoA5KsdW/M=@sourceware.org X-Gm-Message-State: AOJu0YxNJCbxJxN9V8GjYh8c6b35om2PhUspQbFwH1GfvtO+r8ohpKmP 5w3tCRxE0ogk4L1lG4ydGN+R2ijDe68tQuhgCITHtpxPzsure/kdkdSEEl5HO1Jw2rs= X-Gm-Gg: AZuq6aJvxJiwAiw8zRqZ+4qKkS5qXutOtyrM7W3W0ckeYHlxJ8WlRO1wQLdpphu+Woe IIMy6ozWY7rQcgr+n289kzIvL1cr0OaLomfLhKF4m1mGsPeGfPCYCRZCUva1qTKYMDSC56LjviP jAiQZpvbb++4crvgUM9UX2Z4bD4LQx5pYLg9lpIsnN5+wJXhPHnRCFps0ZuQvl1Sp63Yo1RqNc5 cD2GpKTjwESEMRHXCTLZH3rFaRcxeYEjIoGEKtplXD7WwSdr0Fy4DFcueSL0jYIwx9Zm608Dpdf 74I1Z+ogM2ty3Ms285PHsG24EQGXoWEOudkeysSt4dtWwPsnlKqgqP8QtjGcY/u68j2lnOC57M/ 2y0mDEly7RKCX1hWnINqv48KBVHnJxa8O2OXucbVIkjcvv22bqdaLbUoEhgyeeS9CEjTA1aN2bg yynoyPsQmLM+d0tLtlUfZu9A== X-Received: by 2002:a05:7022:2527:b0:11a:44d1:533a with SMTP id a92af1059eb24-124a006e38emr4026112c88.12.1769659924580; Wed, 28 Jan 2026 20:12:04 -0800 (PST) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-124a9efd3b8sm4844664c88.17.2026.01.28.20.12.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 20:12:04 -0800 (PST) To: Peter Maydell Cc: Luis , gdb@sourceware.org, Manos Pitsidianakis Subject: Re: gdb support for SME-without-SVE ? In-Reply-To: (Peter Maydell's message of "Wed, 28 Jan 2026 16:20:33 +0000") References: <87ldhigyao.fsf@linaro.org> User-Agent: mu4e 1.12.15; emacs 30.2 Date: Thu, 29 Jan 2026 04:12:01 +0000 Message-ID: <87tsw59hwu.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Thiago Jung Bauermann via Gdb Reply-To: Thiago Jung Bauermann Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" Peter Maydell writes: > On Wed, 28 Jan 2026 at 04:24, Thiago Jung Bauermann > wrote: >> I'm currently implementing SME-only (i.e. without SVE) support in GDB >> for Linux userspace debugging. It's mostly done, I just need to test a >> few things, polish the code and prepare the patches. I'm hoping to send >> the patches next week. > > Let me know if a QEMU setup emulating "SME only" would be helpful > for you with that. It would indeed! If there's a branch I can build, it would make my testing quicker, and the regression testing more complete. >> Due to the limitations in the remote protocol that Luis mentioned below, >> I can't run the tests against a remote target so I'm only focusing on >> local debugging, unfortunately. > > What does gdb need to do differently for "SME only" vs "SME + SVE" ? There are two changes: 1. GDB assumed that whenever SME was available, then SVE was too and it would try to also fetch the SVE register set when it decided to fetch the SME register set. 2. Since GDB pretends the SVE register set (i.e., the org.gnu.gdb.aarch64.sve XML feature) is always there, when the SVE register set is needed and the inferior isn't in streaming mode then GDB needs to fetch/set the FPSIMD register set instead, and pretend that VL is 128 bits as you mentioned. > What I'm wondering is, if for the remote protocol we define/redefine: > - org.gnu.gdb.aarch64.sve is how the Z registers are exposed; its > 'vg' tells you the size of the Z regs (either "max size" as > currently, or eventually "current size", 128 bits if Z regs > not currently exposed) > - org.gnu.gdb.aarch64.sme is how the ZA array is exposed; its > 'svg' tells you the size of the ZA array > > then does this break something subtly ? I think with current gdb > it would let you at least access all the registers without it > falling over. gdb wouldn't be able to tell the difference between > "SME only" and "SME + SVE" if we define things this way; but we > could add a new thing somewhere if it needs that information. I think that should work fine. If the stub can always provide and accept values for the Z registers, and if the Z registers have the size that the VG register says they should have then GDB will be happy. The changes I mentioned above stem from the fact that ptrace() rejects calls referencing the NT_ARM_SVE regset in SME-only, and only allow NT_ARM_SSVE if the inferior is in streaming mode. The remote protocol doesn't need to expose these restrictions. -- Thiago