From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id L8hVGh4ke2nARRsAWB0awg (envelope-from ) for ; Thu, 29 Jan 2026 04:10:54 -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=Fr6I1w6e; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 577931E08D; Thu, 29 Jan 2026 04:10:54 -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 B740D1E08D for ; Thu, 29 Jan 2026 04:10:53 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 2CD114BA2E37 for ; Thu, 29 Jan 2026 09:10:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CD114BA2E37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1769677853; bh=T73T9kTVNKqEW9K0xmL7A9PS9wzD/JZiTUF5gCTV7tY=; h=References:In-Reply-To:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Fr6I1w6eN39i0G2z1dAcwPEUjJwuV4fw1BEPWDoIa9OpnY3F2E8Qr3nUPkNZ8Sy6Y lN+zbLRbK75TkjtkWmq307V14vndSL4bAz9oWbx63V4S4fqqDAh3+G2OANckE3mOlX kvxjOQPck9aix0NLy1VMDLMF7lJykkP6cqNNxRXo= Received: from mail-yx1-xb134.google.com (mail-yx1-xb134.google.com [IPv6:2607:f8b0:4864:20::b134]) by sourceware.org (Postfix) with ESMTPS id 550084BA2E1F for ; Thu, 29 Jan 2026 09:10:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 550084BA2E1F ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 550084BA2E1F ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1769677818; cv=pass; b=I06a8ifD4ZE3/DNXxqsVshffoZ45nUrmFZlaXYpBgGF/UJOhxtRmz2OQCbzX3Qpc3IihZ+TBtrtiRr5LKQ0/YLln5cbqgoH5WotmfQ9OJY2ROPLEGnXV2K+KO/TUUUvD3zijJ9xIYLa3PQnov6IG6NeZrh3fL2/V+El6uLwVhq8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1769677818; c=relaxed/simple; bh=hmRnz1Yh9KLAh6cO9TwCvUXN0pwEcDbv33sHmxicGts=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=kNdsYtXdIij46LOCuSuqKxaOBD8QRnl4R0nxOhFCElATXcY8kXryomZVZJX5wTayeTFHin0paosNM5YcCXsMgsPwIN20KrH3xJVwVzNUx6zVct8lQpO0jQ+LNAH9ijLu0uet9SXUlUge/yWGxP7GLWorMY0DkGD80P/Rq4th2zU= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 550084BA2E1F Received: by mail-yx1-xb134.google.com with SMTP id 956f58d0204a3-6494a3d92f5so753832d50.2 for ; Thu, 29 Jan 2026 01:10:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769677818; cv=none; d=google.com; s=arc-20240605; b=Lt+yFdGnWBDCaX+VC7zMtg2sofmIEzw2vOiKvmuKf2YmIwsfamrC6txVyJWAT5DVsR +PKXanSVF0szaxQ5Lt/EzXpYpnAKxPCf0u3+X44Yx3q96l0uOSd3uvH4b8eOl2y096aF KjBCPkRzk8CgYQCztX/4Lsu0sPOIvdLKYjnBxzGdTItnEnTP6IGE9SviJvjsjmdRh0Bq whewKwFv6cGlQTVDcSePtVEgsaUKIKKFR3+q2flMdVZAJe5Dc5cZCp0l37r7gwFOrPiF /Crfeg01ycLfx+gdUAcTBWQ6AmaJAII92a1knlCnuWa9e+E0p94qfv17d6pysfpbBh7H xOfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=T73T9kTVNKqEW9K0xmL7A9PS9wzD/JZiTUF5gCTV7tY=; fh=HKS2bsp5sB/5JRmLp1MQTVXb4nRromR0pJashZ8rPbw=; b=DGWrGFMlaK2jMX4Y4FqRkoSkFyLN4S9eui1hi8Xd1+nS1p1ODeM0gErUKZ0tX23iA1 BFAgXA1bcN1D5yZaCyaNOnq4LZqk0ixcpo1hnVZd7BolWvJg8QlSV3edv2PFnrcXehWy zFqKuLUJa0TdT3BArtmfo7/gyZmDizGP0kak1qK9ZWb2Lc22tFaB459USPUSqVNaCbig uu22NFKkHf8/PbHM7J0srMSwPeQ8p1ef+/RA69mqYTGaWYyb2xBsQTN6lDASo0+KChpN 6PG2Tln0IYEdAolVLUJTWAqc03LBfFtftmJ0zusFqSOFyzDPsp6jndY8iLgbP2OGJQgw 1Ucg==; darn=sourceware.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769677818; x=1770282618; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=T73T9kTVNKqEW9K0xmL7A9PS9wzD/JZiTUF5gCTV7tY=; b=P0AB8hZBOmVCNkYwMRPwWcXmP3PIj4Bd70pet22EDlV4zIxvce0NkOdq9usXgFQ5Yl B6ZLymq/MhWc/8fHZ6+5LWVYzrmmIAuQVhlghWZ5K+gNThs64XJdf6cErNp7redc6d0p KCkuI/1AFwDrCYEoO4O6ZjitH/9RbyNLgGzKAv1hG2o9exKfc1uh6PTZscR/2Fg1KMLY mobYCFvtFK3odyDjDvBz5+eXRSTePyg/ibyFVGYejYQX8yG20uoi5/s61uuYAbok3Cx/ EWWdGQ3n+/xOAnvUNFKjltELVsxG03QeFy5GH6qjiXyk69dCicOhrYFavKuElsraMzhz 42oA== X-Forwarded-Encrypted: i=1; AJvYcCX/lb5T3dt8tQyxALfDTecUPH95lbY+M7qDJYGUU2OvYVMs+RYwB/u53Ni1rqCCjsiLsAc=@sourceware.org X-Gm-Message-State: AOJu0YynAq/mbNLmDUIKzC5tynZCvdoRBWMZbsrFuoZ70o02Agr8OddX ogj798ef/RCXkrNG85/EtisjkxF0ZHSv0Hh/b7KHmdbOTezABF2UFCeas22nynAyJzfNUOG1RAr eS45df8fqniiVyUEZNDoNT4MkWZs9bxvpVcDQqQ30P8B0DXrS8UEm X-Gm-Gg: AZuq6aI9NnzZ8AR803VIV9XY+yOS+XnUItAHDdOeoNdMeMGgq19VUjhamtliUxKWTbZ DkoB8QQCbqZ6DRPAlCZyC+VBNjBIc/hP+0IM/LISJitlO/3HgQsVE6JWZsvmyNnN4CZR+R5CVoc QCRaqfnjK7ob179zULocD7trF3oDe9yokhQCHxchoxO2p8HA4mayTgAFD5cr3ebTgJ16YZnATNM k7nNfHj4rBHmGTAtcOpYRHjd+ZRefgjjYN1K0OzTjDFNnopjcEyaudk/i9jl6HfApCfdQ== X-Received: by 2002:a05:690e:130c:b0:649:66c5:74f1 with SMTP id 956f58d0204a3-6498fc68918mr6204741d50.81.1769677817666; Thu, 29 Jan 2026 01:10:17 -0800 (PST) MIME-Version: 1.0 References: <87ldhigyao.fsf@linaro.org> <87tsw59hwu.fsf@linaro.org> In-Reply-To: <87tsw59hwu.fsf@linaro.org> Date: Thu, 29 Jan 2026 09:10:06 +0000 X-Gm-Features: AZwV_QhyDQbW_TtxJn3LABk-haZbNzsGynfKri5XoNOfLaN1hlTMeAoWcNgTbEk Message-ID: Subject: Re: gdb support for SME-without-SVE ? To: Thiago Jung Bauermann Cc: Luis , gdb@sourceware.org, Manos Pitsidianakis Content-Type: text/plain; charset="UTF-8" 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: Peter Maydell via Gdb Reply-To: Peter Maydell Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Thu, 29 Jan 2026 at 04:12, Thiago Jung Bauermann wrote: > > 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. I'll get one sorted out later today (the patches I have right now have a few issues I need to fix). > >> 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. Great. I'll move forward on that assumption for my prototype patches. I might have a go at a proposed documentation patch that writes up the above as the defined requirements, but that will be the last thing on my todo list so if anybody else would like to do that please feel free. thanks -- PMM