From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yABeH2u1qGhKywkAWB0awg (envelope-from ) for ; Fri, 22 Aug 2025 14:22:35 -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=rV+3lJ4j; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6E7C31E023; Fri, 22 Aug 2025 14:22:35 -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 8785C1E023 for ; Fri, 22 Aug 2025 14:22:34 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1C15E3851AA2 for ; Fri, 22 Aug 2025 18:22:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C15E3851AA2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1755886954; bh=qXdf52urgyCvnnoxh0p2E8CvaMoq38Gwt60EH+0+EO8=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rV+3lJ4jrIEhFKOG2i12GRKSSEL+t2yIUu8csLxH9yaeq+8ilsiN1LoLsEe51wZTs uhgD9cPp1SWYzzG2qR5SPfieO2sbjgh/FdkeRZlWHQIwYUnGcTHYTQhQ6PMcyGQTCP XwjMSJl+jK/WV0flwpbFVQA56Kikcy/34B5n13tI= Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by sourceware.org (Postfix) with ESMTPS id 33E093851A9C for ; Fri, 22 Aug 2025 18:21:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33E093851A9C ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 33E093851A9C ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755886906; cv=none; b=Ka9WB7aQDJ/NkxdMRTCYfOLA637Z/fMBtDUwwb0MiRHbNG/4ldBdL1LN7OGjQQB4c29OCompk9w4802FxUpS6ktwXbCalj1Qv5NTFFMcac02iDHr/AVn3o0T2b5gbwcf0KI0qZijRww3TebixnadbX3CqKtJXmqF+yQxGDvvXbg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1755886906; c=relaxed/simple; bh=pErrmvw0VP089yVdvFwYQMlfmXN6XZnQk3czS8/94eQ=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=IVmrF2JTvrckLOYW5nucG456tmV0iPJjL+ONPHunaWM4PSM9YBzKXiR4XmnG/vsdscUFZX677iZYba1tPzM7luTYlWTfld9mMcQMt2AA5JB1uSGY4iCcXrrlzsFHRHjBmspKxPGUYhUiOhw2reY04En36zAHPsgCMxGMmRJ9zrY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33E093851A9C Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 57MHUhsn006005 for ; Fri, 22 Aug 2025 18:21:45 GMT Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48pw0yr4yh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 22 Aug 2025 18:21:45 +0000 (GMT) Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-71d60b39826so34457407b3.3 for ; Fri, 22 Aug 2025 11:21:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755886905; x=1756491705; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zrtISS7gRl5edABv6otq0xtSI0QR0XiUnxXHmvryV7g=; b=GjyRvFQxVeGZClsGzTgnirLMXs2lXQYtVuWCfpwogtI8TDmO2HSRC3xnX3Q3qIabyW yNMbUUa+sQMlru+3UhwUaPxjI0OtnwP37BhiWG4AMa7n+GOSWiHtqA80WlaBuCAeTtzb uwMok2ADrUuHZIyURPK+UVahycl8QOFE9TkbXArJxP/WGEq8q7YgASgxNQrZXmzArruP lvuM2oytbTspIe1kYOy2Jm+HMXlbXAxTzt8BHjlW4q7zxxBOG8IU04kTbNTYv6yRQ4NM jW04KiTDyDuPwJ2XtvAiGoH6ygI8yF9Jk1bY0u4jkAlHFZmxcAuoAY5c+PW7QAIye0xu B8nQ== X-Gm-Message-State: AOJu0Yynd6swpQoSBrN7KR4R+ObPOH3arSgb5eCYqR0B1jMb593B3SyO VSVFszFbPOAq1kbskEw1W3+b+Xffh+OUmYjUi/06caipjaRT3yhVBVfzE+4GSVrRqpIZ5/4YhwU J2/06OutZvoNRIzILIEPqx6afuf8wKAEjby3WWS1jPZ38PfnBIyWvtSvZ0duFh/nBVhsU22OjBq LKWx9a6zvvh4My8SqxDpTmXsji4F8DjBSBm1ad5ugRYw== X-Gm-Gg: ASbGnctLtYiJoGsamI4qFiur9aLClWrJId/3L/5fr0yEi3IxpMmhw0ME8QzSyzRuYlT fqmUYx9U6HMppeRe2FVMKbWRlAgZHKC32DMmUqBbXBvgLW0EFDCAt/YhnjqIG0/itJPZvcDGs4U xIqWw93m3wz5rOU/sF8IBdlXQ= X-Received: by 2002:a05:690c:45c8:b0:71f:b944:1042 with SMTP id 00721157ae682-71fdc546bb6mr41653537b3.51.1755886904737; Fri, 22 Aug 2025 11:21:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHTFS+hk3eGYkP7VIKlJXUFcOIWCgmQptrn0jqKTEIEEpzTvTvS3Xp+YGTLuZmC+KCiyCcqpbCv81pSFp6BMY= X-Received: by 2002:a05:690c:45c8:b0:71f:b944:1042 with SMTP id 00721157ae682-71fdc546bb6mr41653267b3.51.1755886904144; Fri, 22 Aug 2025 11:21:44 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 22 Aug 2025 14:21:33 -0400 X-Gm-Features: Ac12FXwThmHe7Z174UPJtiJYW6KLHj4MGkyQpM1abucHuc7TV5qRxMZB0y5nRBE Message-ID: Subject: Question Regarding Int Cast Error in GDB Python To: gdb@sourceware.org X-Proofpoint-GUID: zgiFj9NGFeqbAkABwUMyebdcT8XBb-Cq X-Proofpoint-ORIG-GUID: zgiFj9NGFeqbAkABwUMyebdcT8XBb-Cq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODIyMDE2MCBTYWx0ZWRfXzMtRnlx9OzIl rwzDq58Ncuy3t33kzYoqEsRtwwHysHGtUXQZEbmMSiQnz9ZE+4mTlLVqkwk4tg2IH84b07RXDJN mnoabSIcFak0UW/FlWJe9kPN44oBHGd5+h9o8GtX5AlCQ3lwu7gj/rAbX4/TFmqKvAm5maDyZ7B 176wkRDw6dtbGgWgZ7Jx95pbKaWGxoKQce/9Ycak3dtdLuMRKex1sN0ACAtzeYF2eL5uDEFWx3x FMO2jnEJWO72m6ebhktUAJJqtT2nLnDixNJwklYbMnQxJ2b9y1hGkrYbAhLaTcEuMJf6z+N3Ydm KRS8absmYr5sgCBPmtgheO8AAzMbEdpdWasWeiIMDow0O+/t8SKqBNcdt/QDFKhBBun2hRocgEJ GOcekvS4 X-Authority-Analysis: v=2.4 cv=TpzmhCXh c=1 sm=1 tr=0 ts=68a8b539 cx=c_pps a=72HoHk1woDtn7btP4rdmlg==:117 a=2OwXVqhp2XgA:10 a=mDV3o1hIAAAA:8 a=U3ielbz2_NaxLli9VnoA:9 a=QEXdDO2ut3YA:10 a=ZfI3aMGenwcA:10 a=nPrJ02aCaOJurkIiRK4A:9 a=oFJ48CxJxarGDFhw:21 a=kA6IBgd4cpdPkAWqgNAz:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-22_04,2025-08-20_03,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 adultscore=0 spamscore=0 clxscore=1015 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508220160 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.30 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: Vacha Bhavsar via Gdb Reply-To: Vacha Bhavsar Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" 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)) 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