From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hEgCGBX6eWlRvhkAWB0awg (envelope-from ) for ; Wed, 28 Jan 2026 06:59:17 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=SYFt6lHV; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=SYFt6lHV; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4E1781E0DD; Wed, 28 Jan 2026 06:59:17 -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 004C21E08D for ; Wed, 28 Jan 2026 06:59:15 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 59C274BA2E3E for ; Wed, 28 Jan 2026 11:59:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59C274BA2E3E Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=SYFt6lHV; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=SYFt6lHV Received: from PA4PR04CU001.outbound.protection.outlook.com (mail-francecentralazon11013017.outbound.protection.outlook.com [40.107.162.17]) by sourceware.org (Postfix) with ESMTPS id A41434BA2E21 for ; Wed, 28 Jan 2026 11:58:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A41434BA2E21 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A41434BA2E21 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.162.17 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1769601525; cv=pass; b=iHrdJmI1pzJr21T8XQUl3HAqsZ6LDA33+9pRDSs2itIUXcA4C/vd6tiSmQx5C74tmsvWaT6T/AY/YE8byHBv9ykps3M58RTmNmLwjSilIBu0SqXPCPbuO5ohUJL/VCN0vU9iuarctWEwb4TH3znBJWqLwdzAsRmzwaHWkpS2Qnk= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1769601525; c=relaxed/simple; bh=Fx8PlG2IcS5yUTVWEV1yzrWMtUyNyEulsqd9J4uXj+k=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=VC+GjqjVuxN2wpGnJ/zsss+e2sXr4fBfGYD2ou4x7yq1ZyOmBR4UDX0PRhxczaWVrSlPdFYXGs+eB4SvJ1raTqSgTzuQ77GXEds2kltmVWmy/cIIoItRXgDI7IPR+DbHSgyDKzxaNWZY9EAcgh7UdwbvnZafypCRzBbEwR4AKK4= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A41434BA2E21 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=wLJbn/Yt/WlO2ROYDOLmrkvB6C7cgOTICCQySgm9/FCrdWhV12hw/NiRUjTeIRkeT543DKavLKDf4l6hYFZaBn/xZhJlw9uL5I/W8K5SeyDlavKyplUILtnCIVU+VUg8p7iGlZLRpRD5WJZBmyRiSBlAGuTXuyQWEdOl5JGFAig0Oz2rxBdmjUdTIsV3CvSr34FOEkcHHThsojomgCOfxeu6jLoY8SP6L5V9pDbZRbhhqhTKEHZ8Yspm6TNcv/Fa5/MpuINuAgHXCACgYpFfSqTOwo/8ZhcLKeSSVQKcFjXGL7BV+dNMWBpWnck26BxFZKqGzSW6tSPUeLwHOzzACQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=26T5j1TKTmtZ1PdzxSeZTTi/m70XY0+Ssf1j+yXZJ+M=; b=gJIwgOy/MT+MjrZWyv6QU8v2fd2L3QP7eTN3FCFlOjTpyiNIkJvMlw182pQX98gZVGgjgaKcCkPT4WJ4DnaCi9/bI5FlJPTC3G/zHv6upGf/dAXxAIBfk4mcBg8vgcZGbbsNxYkiuk58kZkTCuY2QlInsgbgKBBSzt0Pg3vEmSqsFCeBa71fxGYOCYsqYxfpLtXHgxqySEqWNRbGP1qoFGhbYvAE9Sp/fr6mb7QCwmnljDqnm1do5oTQOS+sRzCuwKMRGUiyRlghCrNLOJE191xRzeYQTJ0ADsMqKHDRNRTJQNlel3bEiYc5ZaqR14cv/HkB/6BGyw3PgB8GvLH8OQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=tromey.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=26T5j1TKTmtZ1PdzxSeZTTi/m70XY0+Ssf1j+yXZJ+M=; b=SYFt6lHVZCOIG0MSIOoCC2C0QrTvs0j7gI2vfaUONL14UueAfkAFupXmiX06aJxJkTWjO91jmmC25o5abUw1FHYEhoBsgwcSaCDmOmKbwzXb8digolnWSm5Lf2EHjSmaPSt30x/pp9U38gqmQ44FWKx231hENmnnWKLMjZhVNUs= Received: from DB9PR02CA0008.eurprd02.prod.outlook.com (2603:10a6:10:1d9::13) by DBBPR08MB10385.eurprd08.prod.outlook.com (2603:10a6:10:52a::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.7; Wed, 28 Jan 2026 11:58:40 +0000 Received: from DB5PEPF00014B9F.eurprd02.prod.outlook.com (2603:10a6:10:1d9:cafe::b2) by DB9PR02CA0008.outlook.office365.com (2603:10a6:10:1d9::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9564.7 via Frontend Transport; Wed, 28 Jan 2026 11:58:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by DB5PEPF00014B9F.mail.protection.outlook.com (10.167.8.169) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9564.3 via Frontend Transport; Wed, 28 Jan 2026 11:58:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v3Rl1XV1heTV8GYcFk6LdmVPQKxBwLvbWAzxmziO/+pcS0OrkcIaWJE4qK0l1kkXjKMyF1Cw5dNsPiDhygXh/QrcAMj0TUJZcY79DpO0e2liXjhxh9PlepLYIpIjWFj5akwAK1vRCTltvoBCsolbDDUnp4TEXLDP1KGqY8IPKHYNkLl+sr4OpV8grK+xk8rQK0McoNldt69kxIKiRlWRGGM2GcydT0w3i17HSBnwRR73MmUsYWgOCUoHCNo/Vpa2A+kg3Mb72egRyCZ2Ebh/ILw6RrHszX2G1Wn4LfXwHvpIVId0fb9mjPfjPnH9jRHSFNTeuXhI52VncIz4f24h8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=26T5j1TKTmtZ1PdzxSeZTTi/m70XY0+Ssf1j+yXZJ+M=; b=s2e1l6T+kaHPZFBq4/cWl28AKvkfKKMrGFkxRHrBslYzcVGpujC4wm0DHoJ+SJeNiTADHE2BKp+ZBvFF8Q6URZZQksI89Vh/VDNPgm9zWKFqn9i5fY3M6M+oOX8ExQYlGYhlNFp7hRfapT5GL2pLWtSSU6PoS2fxM3a15xNadv8IQbMn4fN7kh/LB0NsG6Ujstzsdmmgi/jAUNz1efNELorzGS8SGjiLxxUNSovC5WdA039dORVg15phyXnPKiiBtYtrGB0kUgSYTQap0EL80mOFD86jHTCDG9P5r33ma9+hgIcnqJXDTmx4nI+QjCmHMaD2dGwGYhzUg2AIfb6LOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=26T5j1TKTmtZ1PdzxSeZTTi/m70XY0+Ssf1j+yXZJ+M=; b=SYFt6lHVZCOIG0MSIOoCC2C0QrTvs0j7gI2vfaUONL14UueAfkAFupXmiX06aJxJkTWjO91jmmC25o5abUw1FHYEhoBsgwcSaCDmOmKbwzXb8digolnWSm5Lf2EHjSmaPSt30x/pp9U38gqmQ44FWKx231hENmnnWKLMjZhVNUs= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB3PR08MB9010.eurprd08.prod.outlook.com (2603:10a6:10:42b::8) by DU0PR08MB9464.eurprd08.prod.outlook.com (2603:10a6:10:42c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9542.16; Wed, 28 Jan 2026 11:57:37 +0000 Received: from DB3PR08MB9010.eurprd08.prod.outlook.com ([fe80::f37c:c9c2:6d9a:9543]) by DB3PR08MB9010.eurprd08.prod.outlook.com ([fe80::f37c:c9c2:6d9a:9543%5]) with mapi id 15.20.9542.015; Wed, 28 Jan 2026 11:57:36 +0000 Message-ID: Date: Wed, 28 Jan 2026 11:57:35 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 4/6] gdb: new setters and getters for __dict__, and attributes To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20260127170215.1803582-1-matthieu.longo@arm.com> <20260127170215.1803582-5-matthieu.longo@arm.com> <878qdian9r.fsf@tromey.com> Content-Language: en-US From: Matthieu Longo In-Reply-To: <878qdian9r.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0105.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c3::7) To DB3PR08MB9010.eurprd08.prod.outlook.com (2603:10a6:10:42b::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB3PR08MB9010:EE_|DU0PR08MB9464:EE_|DB5PEPF00014B9F:EE_|DBBPR08MB10385:EE_ X-MS-Office365-Filtering-Correlation-Id: eeaefef0-123c-497e-9c3f-08de5e6493b5 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?B?YUtnNkV0aW9Wd3dIN09lRDF4ZklpcFBpOVVwU2RCdjRNbXZPL0t5QWFTVFFr?= =?utf-8?B?TmR6dW9iTGw1RHJBQzJoWnk4N0pVNmY4SzcwNkhaQ0IxYkV0Zzg0eHFqdmps?= =?utf-8?B?cWUySjN2TjNwaExvTE91VzhnZVIrLzAxbmptaDFERlo3ZndESkZMRlJ3elhw?= =?utf-8?B?cmx5elJYLzJmeHZ2UU03VExtdjdzYXNDaVpwcWJGd3YxM2VLVTBid1VWWjZv?= =?utf-8?B?RnJMUEYweE0vRE1FdzF3emtCZFB6Y0hwYW04WnpVWkFDQWJoOVl3aXNpblFX?= =?utf-8?B?UUZ0dVRJSmFLblhwUVJnaXdrU3BOSW50cEM4TC9kREVRblpFR1BVeUN6TElz?= =?utf-8?B?Q2ZsdHJrd09sRUs4Z25TWGR2MnFKMjBuNHByWE81MTlqUm51blZXcTBrUGYz?= =?utf-8?B?V0Q1MkhRTi9zc25iK05JM2NIRnFDMHBnaUdBV0w3UW5kL1p4dHI3WW1uc2tj?= =?utf-8?B?aER3MFZQcENlZlN5RTErM2FkTU9SbitjUFBXajlEVWthc2ZyTEZhc3ZFVGx2?= =?utf-8?B?R0MzUlhsN3lwYnQ5TytueEhXRTRsdUlKb1hHelVhMXRxQzQ2akhYaW5ncnFr?= =?utf-8?B?dFRBK0dMZlRzalRnaG94OWpwaFgrZnhsVHh2SFB5RDR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yTVZlbkh4MnpmbCtVVXJtN1pw?= =?utf-8?B?UjhvcHhxajNHTzhoOVpHL0o4L2sxaCtveHBuQnp0Znlzb0tJNnlSeHB2WXpi?= =?utf-8?B?RDNuMkpnL1lmUEwyZGsvbUdXLzk5cld4dGxUZ3Zrc2wySUFWUDFlcEgvTFYw?= =?utf-8?B?UXNlL3JpTjU4U09HbUdjQkZBZnluRklVUjlmMlFSVmFxdVFxdFozQnppdm56?= =?utf-8?B?SHArVTZick5TRXBWTnpuN2VpUzkzdFF2QXp0empCK0ZXUTB4cW5Yajl1SXJv?= =?utf-8?B?L1pHcEE0Mmg3WnMwZnhlSmIzT0orTUJlNVJMU2orRStGUFFuSng2T0ZQRldz?= =?utf-8?B?ajRYUXdVZG5VdmZqbUxicUJGSzZENlhvTkZkRnMzK3cwUTJSazRKT3RxWlVk?= =?utf-8?B?a0xoZThBNk9reUZaVVJjQWJ2RWhEZTVISDNlM3BqN1pHYmh3TTFlMEdMZE5C?= =?utf-8?B?TFcraTRsWWNuT3I4UVJlUzZCenJ1NWd6YkYrQ3lTRDhwK1lYVFNUQlpYSlZ1?= =?utf-8?B?aDJHSk14MXRCY05LZWREeGttS3BXTjBHZWRmemZFSENFeFdFZjhDTlY4aUd6?= =?utf-8?Q?vK8SGxueATk77pe4yAGf2AUgI?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB3PR08MB9010.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9464 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B9F.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b4693b60-8767-4dde-6f43-08de5e646dcf X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|14060799003|82310400026|36860700013|35042699022|13003099007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?WlMxdmJidWVmOFlqSStPUE0zWTFPZ2d3Wk1NOG9LQlZXdVFqMjRhMnhiRGJs?= =?utf-8?B?ZFFMV01MQTBrT0I1RUdaSzlkcFJjZnorNUJZdVduWDVIdzlHNUxqL0NUcE13?= =?utf-8?B?YlVMY0czMjdJaFVDSjIydU1iYVFlektpQjk3dUhzbXNGS2JzNEJJMWtLbTdM?= =?utf-8?B?VGdkRnRyc0NMRCtYTG1SWi9sUXl6MFEwSDFNWFJyZDVkVHFaNDRIVVdpai9t?= =?utf-8?B?TVNBTkRoY3BndktYZStLK2NlRGRmdWd4aU5IYVR1dlRKbFY1VE5ZUHFuYzFM?= =?utf-8?B?aUZJM29peVZ0aWVENTg4cHJNYWFGSjJQanZSNTNjTU4yWEgwUHNNQVRIWitC?= =?utf-8?B?NHoyellsM2p2QUtUcnVsdVQ0emExbFlyNlNQY3VsVDVHY1RuMXJJNmg1dllw?= =?utf-8?B?N21NQ2wweE5aaldUT1VlL1V0NmE3aEJNdXhkZDJ6UkpEelFlZWczei9Sa3VI?= =?utf-8?B?azZ1WW4vdDNDWlc2WEl2ZmkrT1Z6WWdMZEFPUkVIaUVDbkRWaEFaRlM4TXEv?= =?utf-8?B?WXdpV0Z5WWpQTGw2MXR3aGx0cVZPZGpOWk8vNFU1bmVDNDlweWFROUk3TGV2?= =?utf-8?B?UFFsRVZrVmU4QWpkQjk5a01zYjBXRmVDT1lBOHFKdTU3Ykltb3oweVQ0eEZY?= =?utf-8?B?aHFHSjF2NjU3ckRVMHVQc3BwdDZHZ1orZGtVUVJrK3BFRDAwTFNGaWhSNU00?= =?utf-8?B?cDBVQkh5RDNndTNSVXJtT3JuTXp5TURXTXQxSmRzaktzNldMWE1IRWkvcC9u?= =?utf-8?B?SzFKc09XRDZRTWZrL2JVZmFPK01aRWoyaExHb3lESXBNcU9RQWZJOEVueGR4?= =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=?utf-8?B?cDlvUjg0OGVLaWQxazFGa2RRUzVCYlBSU3pVVEcrSlZ6SkZyMGN0a3duNTFj?= =?utf-8?B?bURHNEpkNGtGMncxM0t3bm9ITkRnK2puQXFhV0tpRnI1REdPSUxOM2FXbU5E?= =?utf-8?B?WU0zOXkzU0R0cWd0dEw0SlBNR2lGZ1AxRHMrZitrM3d6blhlTWFXL09OZm1Z?= =?utf-8?B?dUdqL1ViQndkZEZSd2N2eTZySUNIY1NzbTJDZjNlN3ZwRzVOZ3VCTWcwSXBR?= =?utf-8?B?U0ZEa01WTHJ3S1ZFMnR2REhKVGJsTUVKZzJYSTVYVTJDSzl4UXd6cit0M1Vn?= =?utf-8?B?eGpwR3JVR1ZuVGdKbG9STHVTYzVlTU0xdTI4d3dNSmF4K1JsaHp5WmFzb2RK?= =?utf-8?B?ZDRvM3dSSDdCdEM5LzBoOWZteDZjWStTVUdJQ3g5ZkpzQ2F0MWs1OHErcFdI?= =?utf-8?B?TWNpRVU0Sk5hQjVVRVhrODAwQzRPSFVRYXJWd2RuWlUzd3pFZXdSbTFuRE51?= =?utf-8?Q?IcVFzwjhbEDlPmTfxdXzpYc7Neshfuc6Xn7DovWzaU=3D?= X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(14060799003)(82310400026)(36860700013)(35042699022)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jan 2026 11:58:40.0480 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eeaefef0-123c-497e-9c3f-08de5e6493b5 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B9F.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB10385 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 On 27/01/2026 19:06, Tom Tromey wrote: >>>>>> "Matthieu" == Matthieu Longo writes: > > Matthieu> GDB is currently using the Python unlimited API. Migrating the codebase > Matthieu> to the Python limited API would have for benefit to make a GDB build > Matthieu> artifacts compatible with older and newer versions of Python that they > Matthieu> were built with. > > Matthieu> This patch prepares the ground for migrating the existing C extension > Matthieu> types from static types to heap-allocated ones, by removing the > Matthieu> dependency on tp_dictoffset, which is unavailable when using the limited > Matthieu> API. > > Thanks. > > Matthieu> - gdbpy__dict__wrapper: a base class for C extension objects that own a > Matthieu> __dict__. > > I think a double underscore in a name is reserved by the C++ > implementation, so "gdbpy__dict__wrapper" can't be used. I think the > same name with single underscores would be fine. > Renamed. > Matthieu> - gdb_py_generic_dict_setter: a __dict__ setter provided for completeness. > Matthieu> It should not be used, as __dict__ should be read-only after the object > Matthieu> initialization. > > If it shouldn't be used, it should just not exist, I think. > Removed. > Matthieu> -using thread_map_t > Matthieu> - = gdb::unordered_map>; > Matthieu> - > Matthieu> -struct inferior_object > Matthieu> -{ > Matthieu> - PyObject_HEAD > > This moved to python-internal.h, but I don't understand why that move > is needed. > > Matthieu> + /* Compute the address of the __dict__ attribute for the given PyObject. > Matthieu> + The CLOSURE argument is unused. */ > Matthieu> + static PyObject ** > Matthieu> + compute_addr (PyObject *self, void *closure ATTRIBUTE_UNUSED) > > In classes there doesn't have to be a newline before the method name. > Also since the closure isn't used here it should probably just be > dropped. If it's needed in the future we can add it then, but I'm going > to guess it won't be. > Fixed. > Matthieu> +/* Generic attribute getter function similar to PyObject_GenericGetAttr () but > Matthieu> + that should be used when the object has a dictionary __dict__. */ > Matthieu> +PyObject * > Matthieu> +gdb_py_generic_getattro (PyObject *self, PyObject *attr) > Matthieu> +{ > Matthieu> + PyObject *value = PyObject_GenericGetAttr (self, attr); > Matthieu> + if (value != nullptr) > Matthieu> + return value; > Matthieu> + > Matthieu> + if (! PyErr_ExceptionMatches (PyExc_AttributeError)) > Matthieu> + return nullptr; > Matthieu> + > Matthieu> + /* Clear previous AttributeError set by PyObject_GenericGetAttr. */ > Matthieu> + PyErr_Clear(); > Matthieu> + Also, in both gdb_py_generic_getattro() and gdb_py_generic_setattro(), I moved the look-up of __dict__ before PyErr_Clear(). If the look-up of __dict__ were to fail for some reason, we still want the exception raised by PyObject_GenericGetAttr / PyObject_GenericSetAttr to be there. > Matthieu> + gdbpy_ref<> dict (gdb_py_generic_dict_getter (self, nullptr)); > Matthieu> + value = PyDict_GetItemWithError (dict.get (), attr); > > I think this has to do check 'dict == nullptr' before this call. > Indeed, I forgot that. Fixed. > Matthieu> + if (value != nullptr) > Matthieu> + return Py_NewRef (value); > Matthieu> + > Matthieu> + PyErr_Format (PyExc_AttributeError, > Matthieu> + "'%s' object has no attribute '%s'", > Matthieu> + Py_TYPE (self)->tp_name, > Matthieu> + PyUnicode_AsUTF8AndSize (attr, nullptr)); > Matthieu> + return nullptr; > > PyDict_GetItemWithError sets the error, so is this just here to make a > nicer message? That's fine if so, though I am not sure if you have to > clear the existing error here first? > https://github.com/python/cpython/blob/08d7bd28fecca524c648dda240022add704b8f8a/Objects/dictobject.c#L2505 /* Variant of PyDict_GetItem() that doesn't suppress exceptions. This returns NULL *with* an exception set if an exception occurred. It returns NULL *without* an exception set if the key wasn't present. */ PyDict_GetItemWithError has a misleading name, because if the key is not found, no PyExc_AttributeError is set. This situation results in a new exception being raised: Python Exception : error return without exception set Hence this surprising manual setting of an exception to makes everything fit into place. I am going to add a comment to clarify the intent, because I had even forgotten why I did this in the first place. > Matthieu> + gdbpy_ref<> dict (gdb_py_generic_dict_getter (self, nullptr)); > Matthieu> + /* Delete the old value (if there is one). */ > Matthieu> + PyObject *old_value = PyDict_GetItem (dict.get (), attr); > > dict==nullptr check > Fixed. > Matthieu> + if (old_value != nullptr) > Matthieu> + Py_DECREF (old_value); > Matthieu> + /* Set the new value. */ > Matthieu> + return PyDict_SetItem (dict.get (), attr, value); > > I think this ordering means self-assignment can break. IMO it's better > to use gdbpy_ref to manage the lifetime of the old value. > It seems that I got the whole thing wrong with my assumption that I needed to decref the old value. This is already managed in insertdict() called from PyDict_SetItem() https://github.com/python/cpython/blob/08d7bd28fecca524c648dda240022add704b8f8a/Objects/dictobject.c#L1934 This PyDict_GetItem () is useless, I will remove it. > Matthieu> +#if PY_VERSION_HEX < 0x030a0000 > Matthieu> +static inline PyObject* > Matthieu> +Py_NewRef (PyObject *obj) > > The return type is missing a space before the "*" > Fixed. > Tom Since all others patches are approved with the small modifications you suggested, I am going to only post a new revision of this patch in this same thread to avoid a new round. Matthieu