From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Zz++J4AgrGiP5AsAWB0awg (envelope-from ) for ; Mon, 25 Aug 2025 04:36:16 -0400 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=A/ssEfQ9; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9385B1E043; Mon, 25 Aug 2025 04:36:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no 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 C91511E043 for ; Mon, 25 Aug 2025 04:36:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 301193857B98 for ; Mon, 25 Aug 2025 08:36:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 301193857B98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1756110975; bh=BIxNEhXtPK1tbI6RAqllyKuC6fAlt7tADA3FGqpuJ1A=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=A/ssEfQ9KrSFiXDA+xpnsTaAxZyN+RuRpytximkRESpYNOOsBIRdkTJHFwn6YlrNh LZnlWpjJ5rLTLnJ4dJMYc35Eo6eogGG1jmrvPc43x0M2XfLi+R7Wf3KOVqlDsjZhr0 E/AwjpyVsDrtkQBbeIXonGdvVw0TMnfFOgZw3WrA= Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id F356F3858D29 for ; Mon, 25 Aug 2025 08:35:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F356F3858D29 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F356F3858D29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1756110929; cv=none; b=HDPlQ+CBnSa18s4WrvCyy8pgZ9dq1/1wGRGGCi8RCjZa48j0PpQPlolyEYdO1F3QLVI48quhJ0nDO+i8WPYXus+x7+/O0Zxy1XZOGdHmhvSYUB8OBEZliMhufC+2vZC2q0qY/xUaWgGCQ5QJCIbCyMX4uQBaaOb1lwFlEiVX1Xg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1756110929; c=relaxed/simple; bh=HD4vRR6yVcy+ZD4aDSsX14OASN08EMvkyFboSw4HV/k=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=MaKK6yedhdZIZi4BKNUusO1RBBg+Xn099oA8vtYrWm9EKBQ0xI8oocCBJSXEVb/Gq4x4+lKv9OygfOEU28nhwRrVZG8AbSzJE6hCd1e6ZemYWruIx4zmM4vZk4keoWUzKGx7F1DafDZ0wgWNpSAbtLgW7Xk/ZZ559fbrS1QCnxI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F356F3858D29 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3c6412336d4so1437561f8f.2 for ; Mon, 25 Aug 2025 01:35:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756110927; x=1756715727; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BIxNEhXtPK1tbI6RAqllyKuC6fAlt7tADA3FGqpuJ1A=; b=EFlh1t5DwTVPdWKnvazaF3WH1kG2Z6yDmyU4D9psaM9zyoObEJ2ZcwtdBKA3Ad4jAh oxBWgMfLfpW6LJaZa72Nd5IW8syquDDNtVSb9QHawPt1rOb4P05dq2trOXtj8wDvSHjD KEuQUlYfLKtOPmAZnYIge2tEdYKUxBuOEC+CxffMv0xZR8dJ3SkLW72XFmnCaSR3dz71 neLc0xv6FUhmqiKbItPHO7eBhOhOiHTBLt5rQAgtxB1tF46S5MfYMYuenlHUcmlWu94O Joc7KCGUnTMnXH7HEFOZ0Kq589nUp9iFIfQmu9DSSKpN0IXobVgjeLEFF+p20WbRad45 HcLQ== X-Forwarded-Encrypted: i=1; AJvYcCVc2QIv/iP/gipd4kbqpM41qKLWuOAfWaPKtYCXgGDVRri7cQX2V1EmuNBp/EWkHdPSqQQ=@sourceware.org X-Gm-Message-State: AOJu0Yyqg/3Dq+kuODMcR2ZGqj7SH6HWwBh/OoakoF19KhYky7hzo2AX SDXxB9gyihCnXksFCdiXbOZZia6V0wG9wgvN/FmYysbh3Rqo/0PCf47/ X-Gm-Gg: ASbGnctd6A9lb6STw7pJQl26yHV5Fftbuw+r6PMGUOWbSHlkC5rx4DJO4yh5LigA7Ji VhgicZnpGA6VjzdV9b/sKVNeu/0swgNwkyRsWyIUMBCTM475BWVs/JqVNa3tFLSLBtdCuAMoXdA Yudj/tuFSheQgLpcsdZCzoWQiKfktCO8q7lKavyOMEs9M5t5zYByvjvhhIRuguo5ZPiXbuyY+qe mbUnkh4SkqTK7iyEmyz5AHEgFwIMfsJvpQLfpCj3R4cDwm5Manc+e9CZZV8PKxSppE+YKfAjBzg cIp7KOq7hoBnMu1nfbkb6A1bEzEjQg02jfGnAHQ0QtPFqR1SDVIqJkYydo8+C3qswR2F51JveSI DJwzcdFdIOfgwuscLDgXDF7uLHW65ZOHb6gRx/dhM0LcCDg== X-Google-Smtp-Source: AGHT+IEt1sBhhs3ew+WZ38Z9jNS+auq48/Xc3ZmCRd8DS2bB3OsVNa/OMK0Fv4B1/ROS/HyvwU5x+w== X-Received: by 2002:a05:6000:238a:b0:3b9:1b9c:4e27 with SMTP id ffacd0b85a97d-3c5dcc0c710mr10055994f8f.44.1756110927316; Mon, 25 Aug 2025 01:35:27 -0700 (PDT) Received: from [192.168.0.38] ([86.12.216.189]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b4e1d77e0sm105619305e9.0.2025.08.25.01.35.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Aug 2025 01:35:26 -0700 (PDT) Message-ID: <5e06c858-a390-4960-8aa0-dd8343708716@gmail.com> Date: Mon, 25 Aug 2025 09:35:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Question Regarding Int Cast Error in GDB Python To: Vacha Bhavsar , gdb@sourceware.org References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: Luis via Gdb Reply-To: Luis Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On 8/22/25 19:21, Vacha Bhavsar via Gdb wrote: > Hi, > > I am developing a patch for QEMU which would allow QEMU to expose > SME registers, such as the ZA storage, via gdbstub to a remote > gdb client session. I am working to write a simple test case for > this change which simply sets the value of the za register, then > reads it and ensures what is read is equivalent to what was set. > > The full test case can be found here: > > https://lists.gnu.org/archive/html/qemu-devel/2025-08/msg01815.html > > However, it seems there is an issue in the int cast in the following > code: > > v = gdb.parse_and_eval(reg) > report(str(v.type) == "uint8_t", "size of %s" % (reg)) > report(int(v) == 0x1, "%s is 0x%x" % (reg, 0x1)) If reg is ZA, I´d expect gdb to have difficulties casting the whole array to an int, hence the message about not managing to operate on integers larger than 8 bytes. How are you testing ZA? Byte by byte? > > This results in the following error: > > Python Exception : That operation is not available > on integers of more than 8 bytes. > Error occurred in Python: That operation is not available on integers > of more than 8 bytes. > > After running various tests with different host architectures, gdb > versions, python version and int casting included and excluded, we > are seeing that this issue only seems to arise when the int cast is > included and the gdb used is GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) > 15.0.50.20240403-git (regardless of python version and host architecture). > > The test results are presented below. I was hoping to get some guidance > regarding this error and what may be the cause if it indeed stems from > this specific version of gdb? > > Thanks, > Vacha > > > gdb gdb target python host int cast status > version support version architecture > 16.3 --enable-targets=all 3.11.13 x86 yes pass > 16.3 --enable-targets=all 3.11.13 x86 no pass > 16.3 --enable-targets=all 3.10.18 x86 yes pass > 16.3 --enable-targets=all 3.10.18 x86 no pass > 16.3 --enable-targets=all 3.8.10 x86 yes pass > 16.3 --enable-targets=all 3.8.10 x86 no pass > > 16.3 aarch64 3.11.0rc1 aarch64 yes pass > 16.3 aarch64 3.11.0rc1 aarch64 no pass > 16.3 aarch64 3.10.12 aarch64 yes pass > 16.3 aarch64 3.10.12 aarch64 no pass > > 15.0 multiarch 3.10.12 aarch64 yes fail > 15.0 multiarch 3.10.12 aarch64 no pass > 15.0 multiarch 3.11.0rc1 aarch64 yes fail > 15.0 multiarch 3.11.0rc1 aarch64 no pass > > 15.0 multiarch 3.8.10 x86 yes fail > 15.0 multiarch 3.8.10 x86 no pass > 15.0 multiarch 3.11.13 x86 yes fail > 15.0 multiarch 3.11.13 x86 no pass > 15.0 multiarch 3.10.18 x86 yes fail > 15.0 multiarch 3.10.18 x86 no pass