From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6fYOKyJPjGqWVTwAWB0awg (envelope-from ) for ; Mon, 24 Aug 2026 10:03:14 -0400 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=heslergj; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=heslergj; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A812F1E0A3; Mon, 24 Aug 2026 10:03:14 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 autolearn=unavailable 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 C40581E033 for ; Mon, 24 Aug 2026 10:03:13 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5FC514BA2E0A for ; Mon, 24 Aug 2026 14:03:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5FC514BA2E0A 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=heslergj; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=heslergj Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11012032.outbound.protection.outlook.com [52.101.66.32]) by sourceware.org (Postfix) with ESMTPS id 79F224BA23E5 for ; Mon, 24 Aug 2026 14:00:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 79F224BA23E5 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 79F224BA23E5 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=52.101.66.32 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1787580028; cv=pass; b=myq3qOypdIxacjFNF4byCJ66+ZJ223zDP2br+YkN41cwcZCyWI5EUdjN364cNePJ0942LNSUlmjEWtX6GenR/lyGBGSuJ0r4RPX2DRH8g7/6Szhe4QJXsnthRFpxAw3dtErwQJ4M8tNufuvcu4J7mw9FarF8k0t6s/XYk8TtEAw= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1787580028; c=relaxed/simple; bh=rjauQTzGoSToFnq/93/RvmYmrJN071Fi8QzvtQ1IfBk=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=nxxKmL9bwUiZ5A7BvmRv51g95ZhA2wAvah2szWP1ePSzWCkdljoQJvuQWTyxXhwdKZibiQNT2nw/ErswKMaANnib8KdN8f7066JmobTKQKQ+UZx5L+9N0Tf4ffO7A0ewfDvdH3Y+j+oOPvdDrehJeO2wsxZdD7KhOsYnXUL9RlA= ARC-Authentication-Results: i=3; 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=heslergj; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=heslergj DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 79F224BA23E5 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=RbBGH9mBzGybONFgs53l+Qr+WdVAJMpk/rAZL50OHFEn/1/zM/h+ir9UHuH3q3ejYq+J4gWGjO/q6KMBV+2RF6EKanjDBn4KR8sz9swhPqG0QEhhDNqnmGmvutAQHkDIXiu8sNgtOVmhAOO4zJ5wv3Vc/xvXu8UA2MfPXAAfrMzsqd1uVVRIwLiH4zHHN0JJiCshNd4/BHF0cX41ztMIFKNT1YK4yvrfN4Curdln0aezyZ1mJ8zqzWhSpfbqT8CLl9tm7glDBH7xV9oUsP7I0phrtYVZjalmBvgEjdP37LvbhoIDfyk5Z7NefVPfzO5tPGchO2cuJ8rY5HaZ1AyyGQ== 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=Cy+ahmWUb9nY7eCIHLBQ5o4e4PDzev/66ah1mhCEcC4=; b=o+MF6yzh+noRuXzWeiq7eq/fVzwAphHf+2mG6Z1P7vgop8PUGYDnqatoWJ2Tl3fxdXeSNl9xwoIzFmRHuny0LOSwLwBUqUfANWci+dT9TBWDo2IDLWQ/TsqxY4FDZwZBnQInuVqPFzxpaq8hHfDMwkhOWEJvidHbENH4zKw8YFLuDbgE/M/wP7e+40fJ9moW9I0uCa6R7HlZShCsg9aC3YD8w0jIj+WdDWSLxV6RoHjnQukfSiRUfFphj98XUZ06WGMki8jJ6Rvr6b9dITpWwdUEFjWVP/nODD43pmvtV9oX5X+QLZVGMfR3gAte0yQvxNjAg8gtf44xWMuIBRt7rA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=simark.ca 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=Cy+ahmWUb9nY7eCIHLBQ5o4e4PDzev/66ah1mhCEcC4=; b=heslergjcSsyLAqDQ+Vqi3KMosaPJ5Ck4rMqruYEOLw7vS+8yOubiUq2wvkwimTjlSe91CF5GPEqSL1mINrx8MDwbrQ77Gw00RAeu2ifDZBOfWfGcLwVZH1pin+0vzJysH3UtFbLLQ3ppR0FJfk6hmvlJU9Mtf18mGeRjsBqMS4= Received: from AS4PR10CA0020.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5d8::10) by DU0PR08MB9876.eurprd08.prod.outlook.com (2603:10a6:10:424::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.339.12; Mon, 24 Aug 2026 14:00:23 +0000 Received: from AMS1EPF00000092.eurprd05.prod.outlook.com (2603:10a6:20b:5d8:cafe::ae) by AS4PR10CA0020.outlook.office365.com (2603:10a6:20b:5d8::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.339.12 via Frontend Transport; Mon, 24 Aug 2026 14:00:23 +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 AMS1EPF00000092.mail.protection.outlook.com (10.167.242.89) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.360.3 via Frontend Transport; Mon, 24 Aug 2026 14:00:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hTT0oJdr2G5xfNFzXrYy7UXXbJ7AZi/fJgFyyLhIXrrcDLUcVcHa9DtJE5w27rng3AiFyr3VE0geueQzVyyM8z6Yzw5//Du/FqV3aQdkdaIoPnlAwpu8UjNe0dr1F6QcE4elwdCsSHz/74vC41YnVwvQWLM7OOY2CsVBcNp2BmTtpkY01+sKpDA2z7kr4TN6WFK0oXbRbnefGkmoPRaxBqJxpShut3t9lwo/v/NyfT3FW2F81/47QK4iDZLOuPbEbPVMHvl/pMiYPWMrR6Gj1A5biOnDSkVQLo71sM/l8V/5ttYehY6bP9MlMN6CxGMXZiSRbOO0q0sNGMyVrteqZw== 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=Cy+ahmWUb9nY7eCIHLBQ5o4e4PDzev/66ah1mhCEcC4=; b=ie3jJUbYxEkwYJTDNZ+CFpy2uGqRqkBKM9oY199Dee2WlfhnWCGQnkJf7z0rfvmFogCnClDLQlqCRuDnE7n/39SPyD6TRa49RYG6xzD20BbVBzuksCF2WQ2MLYHZMX38cdvg5NFyMWysuvSwpi40g5KmAaqmvrDsGgs6vWcRhL4JsNJdWWIzJD1dJdyWHyKQJKeC+z3X157WVp3N870cnmVpFzDIB6tiZDsHxz0CNTVFNawh98clONdb2tIEboC1r6mI/6Y9hxtenH5HgTlqFCRrsQEUSEvei1WNlWfEkDrdw1AFAe+KOt8nPz2v1szi2IjhhveTz7F/kEiF1xX84g== 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=Cy+ahmWUb9nY7eCIHLBQ5o4e4PDzev/66ah1mhCEcC4=; b=heslergjcSsyLAqDQ+Vqi3KMosaPJ5Ck4rMqruYEOLw7vS+8yOubiUq2wvkwimTjlSe91CF5GPEqSL1mINrx8MDwbrQ77Gw00RAeu2ifDZBOfWfGcLwVZH1pin+0vzJysH3UtFbLLQ3ppR0FJfk6hmvlJU9Mtf18mGeRjsBqMS4= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB8659.eurprd08.prod.outlook.com (2603:10a6:20b:563::10) by PAVPR08MB9404.eurprd08.prod.outlook.com (2603:10a6:102:30f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.339.12; Mon, 24 Aug 2026 13:59:45 +0000 Received: from AS8PR08MB8659.eurprd08.prod.outlook.com ([fe80::96bf:2de3:5eab:70ae]) by AS8PR08MB8659.eurprd08.prod.outlook.com ([fe80::96bf:2de3:5eab:70ae%5]) with mapi id 15.21.0339.012; Mon, 24 Aug 2026 13:59:45 +0000 Message-ID: <7d678410-1c1e-4485-bb1e-daf7654b8f10@arm.com> Date: Mon, 24 Aug 2026 14:59:44 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] gdbtypes: improve documentation of composite type helpers To: Simon Marchi , gdb-patches@sourceware.org References: <20260814104941.522777-1-matthieu.longo@arm.com> <381a0161-9b9b-45ba-89ae-16e6a085b75d@simark.ca> Content-Language: en-US From: Matthieu Longo In-Reply-To: <381a0161-9b9b-45ba-89ae-16e6a085b75d@simark.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0207.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a5::14) To AS8PR08MB8659.eurprd08.prod.outlook.com (2603:10a6:20b:563::10) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB8659:EE_|PAVPR08MB9404:EE_|AMS1EPF00000092:EE_|DU0PR08MB9876:EE_ X-MS-Office365-Filtering-Correlation-Id: a71aa522-03bb-47c5-0222-08df01e80a76 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|23010399003|366016|1800799024|376014|56012099006|10067099003|6133799003|18002099003|22082099003|11063799006|4143699003; X-Microsoft-Antispam-Message-Info-Original: bbk3YL7r/Mc5mZq8+cNjdgAkE6T1kVTBMmyBN5FT8EmaU/PpEfwl1MjwDb/4lN0kQoTl2Bb+b3cQXrILE/YaOFVJxEWGHTBnV0onbUMDtQJ5TQ6brfKhFME1mjttaFPjKE3gaWh1teIj5Mb8StmOdtqZslJxr8s8sPCcr46fRImRDGygULcNrfjJ6ZvBwBoRPizQsDDUJJ8cSffj3AGolNjibW7zuZwNYgPIjb18BaYKxe+CMSvCFdyel6BbaYkf75DE3uR8YW/4zTvnKauyVEiH6Tt95qR/8/ysrzV9ayk1E9t4GyKOOtMWsrzEUyCdNpNfscjqiFAQKxG1PBB9R6QAOiWgo+ENEu7UIw39P3G17GxPx3J/aVszq4I60lPrYjdKNtcmoP5aXb0qSldH1uQu4e5D6nB9eYB+GvJp7RSEl6xw7Xwvu5dDa207l4/8TFrMUwsx08FOr+jPc8eewTICUEF8C9HUZGOQBMlrXFjw27fmlnMevlQWC6FNxLjIbONDvM2zjHgt0lC0yIAJlMYwX7uPBquKlDLzchdomOk+VoZ/MW0oRiD2AI5TLLXcASqqnyMhq+/O3jJEp8du9C1dnWJcsoUtM+aN4W4B9q2j03gJ0t93EYRjBSsKPGtKSiV8hhZvKxUGz4myJBQZ8MWBJGd9PdY/OyMPL+kq7sA= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB8659.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(23010399003)(366016)(1800799024)(376014)(56012099006)(10067099003)(6133799003)(18002099003)(22082099003)(11063799006)(4143699003); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: oZrwePAM4b8zvhp8UZOOiaVEOGte2720ZevW8ejPbuXuvBuHCStuCFLz3MRFN8gGh7lx+mVTvg0Z4HasrwFN7XVtZifDd4FFULRqFeVzHJaKATNOjGwzpCXHJCeVT/HorQeAqzqjA1BeC41YJAAz9o3SPSnfmE1nrJf8OU6/DWwtRfO2QHSI1BAPrWgWLiz4zkwxn0oCthw2jNrm2Hg0Tn/czV3CkzYkR4zfxVfU9V+rJ4eIybNWE3wZU8LGNt+x16sL2cYxtgkFAakGQ9E9RL2FFjnSM1PcmmdvTSrFsLWIg0eWaWf0P2saBYMsHEqC5DV2k7EWs+2WD6R59NRslA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9404 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS1EPF00000092.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f25351eb-2766-4d80-f69e-08df01e7f3fb X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|23010399003|82310400026|36860700016|376014|1800799024|14060799003|10067099003|11063799006|4143699003|56012099006|6133799003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: knzYJq4ns5a7D6p0LhRtEfiu1wTNYlaI+q06d6evtoEz0ZHPjEtCB6q4RbOyK354gMqhTb5s1pKIFB04W3HDLPF9okQnGVfcLLFi8fPPJ2P6bWWb6Vy5eiz6DJyY9gt4KK3KlObwRFIJjb7rph/0p5lULWGKO32lp420qn+h0YmHOX22cO//l/HenmgiHAQbbEvLRxVie1SBf4vrf0ouDMD0qTJYVwcURdKZHHGev/KVanb20RrY39MoYMSj5kiGVhgRZ26aLqD4mAnH92kMkbr+hbl/vJC3Auv3F8/9bHSPjdNdcBtmzILLsstk+px5dWt72+9etGsmvY7/nzE68yGylyRCiKCDlNrL8bHL0PlubZY4N+oLtFOba5oj7wlUqKGULNTKYf/9fdaNQmf4TBAU0Z0I2O5LdftOpWOcBb0fwhUJBmumavIc5ACi5ojwRqaxsGV1AgC9zlweuxfuQjS/qMaC8zKtc8mZH99qf+kBWjwvuOkygKMGrHgQ7vdwoZc4vtAa/6ruChJ63ERgYJt4QUlaIC4YWWHkdx3CYQ7RXHQo1l7D/peottlCLl0W9rVKUG7Q43O7dYpIXoB1Gc0/ccq/z5J2ND2LPTx38lTBQUs2H4onFTERA15MyMRwsMyVuY04s5RG+RlKgWtbaaohPSpAYJ3nGNpw+8TTDzNLOfA9HjwHEa6MBFQXUD03K8LBNzyX4nVdMe6DXCaMfQ== 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)(35042699022)(23010399003)(82310400026)(36860700016)(376014)(1800799024)(14060799003)(10067099003)(11063799006)(4143699003)(56012099006)(6133799003)(18002099003)(22082099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V5TFwxm8usO+jRuKKdykvuQmPch8gsKcDJ8hcSew30stNUzn+IOG+volrOVPUkPvqnI1rAOuVJv1Bo+9v0SuGo3+q59JLqKQTR+0Njyi+NeielYt/1vYcr1+yeDT8ChzDQkSxRjcH2Z2u7Y9If/M4cDhSCW974CZ2zISDNUo3rpfvkoeZtfgSIjDuP+Kd8qafU4nntnV4tDjokcC1/zbGWUEveguDqyeai2luAqEb8OravUB/pM6G6DB9RkVzCov5y4PS27FQ2KImRcHAUP8eEECDmaEWCynuBqP5gB6sr/G9vUVbMAk4M+j8bBCeGGMUEMLdHqtQdmv2837F+X6htC3WYNSWV9bO3IEBrNB/GRE6EhVRekO2ZVU1cRSQZ7QJtkZwmoIKmGwGjrb9mfLt3awYAsbMibZf9IYutS0zxPMZLQ9Bhh+3wGtAlDfoTDU X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2026 14:00:22.8280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a71aa522-03bb-47c5-0222-08df01e80a76 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: AMS1EPF00000092.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9876 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 17/08/2026 19:50, Simon Marchi wrote: > On 8/14/26 6:49 AM, Matthieu Longo wrote: >> Document how arch_composite_type handles a null NAME, and clarify the >> semantics of an empty field name for the append_composite_type* helpers. >> >> Suggested-By: Simon Marchi >> --- >> gdb/gdbtypes.c | 12 ++++-------- >> gdb/gdbtypes.h | 30 ++++++++++++++++++++++++++---- >> 2 files changed, 30 insertions(+), 12 deletions(-) >> >> diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c >> index 4b6c01910f4..e0c25c58d83 100644 >> --- a/gdb/gdbtypes.c >> +++ b/gdb/gdbtypes.c >> @@ -5412,8 +5412,7 @@ append_flags_type_flag (struct type *type, int bitpos, const char *name) >> name); >> } >> >> -/* Allocate a TYPE_CODE_STRUCT or TYPE_CODE_UNION type structure (as >> - specified by CODE) associated with GDBARCH. NAME is the type name. */ >> +/* See gdbtypes.h. */ >> >> struct type * >> arch_composite_type (struct gdbarch *gdbarch, const char *name, >> @@ -5428,9 +5427,7 @@ arch_composite_type (struct gdbarch *gdbarch, const char *name, >> return t; >> } >> >> -/* Add new field with name NAME and type FIELD to composite type T. >> - Do not set the field's position or adjust the type's length; >> - the caller should do so. Return the new field. */ >> +/* See gdbtypes.h. */ >> >> struct field * >> append_composite_type_field_raw (struct type *t, const char *name, >> @@ -5448,8 +5445,7 @@ append_composite_type_field_raw (struct type *t, const char *name, >> return f; >> } >> >> -/* Add new field with name NAME and type FIELD to composite type T. >> - ALIGNMENT (if non-zero) specifies the minimum field alignment. */ >> +/* See gdbtypes.h. */ >> >> void >> append_composite_type_field_aligned (struct type *t, const char *name, >> @@ -5489,7 +5485,7 @@ append_composite_type_field_aligned (struct type *t, const char *name, >> } >> } >> >> -/* Add new field with name NAME and type FIELD to composite type T. */ >> +/* See gdbtypes.h. */ >> >> void >> append_composite_type_field (struct type *t, const char *name, >> diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h >> index dd2d24fa8e2..f7853430d64 100644 >> --- a/gdb/gdbtypes.h >> +++ b/gdb/gdbtypes.h >> @@ -2431,20 +2431,42 @@ extern struct type *init_pointer_type (type_allocator &alloc, int bit, >> extern struct type *init_fixed_point_type (type_allocator &, int, int, >> const char *); >> >> -/* Helper functions to construct a struct or record type. An >> - initially empty type is created using arch_composite_type(). >> - Fields are then added using append_composite_type_field*(). A union >> - type has its size set to the largest field. A struct type has each >> +/* Helper functions to construct a struct or record type. An initially empty >> + type is created using arch_composite_type(). Fields are then added using >> + append_composite_type_field*(). >> + A union type has its size set to the largest field. A struct type has each >> field packed against the previous. */ > > I would get rid of this generic comment and move the information to the > other comments. > > - The doc of arch_composite_type can mention that the type initially > has no fields, and that fields can be added with the > append_composite_type_field*() functions > > - The part about union and struct sizes can be moved to the doc of > append_composite_type_field(). > > To avoid repeating things between all the three variants of > append_composite_type_field*(), I would suggest using a form where the > common information is documented at only one place (probably > append_composite_type_field()) and the other functions refer to it > > This is what I propose: > > /* Allocate a structure or union type (as specified by CODE) associated with > GDBARCH. > > NAME is the type name. If it is nullptr, the type is anonymous. > > The new type initially has no fields. Fields can be added by calling > append_composite_type_field*. */ > > extern struct type *arch_composite_type (struct gdbarch *gdbarch, > const char *name, enum type_code code); > > /* Add a new field named NAME with type FIELD to composite type T. > > If NAME is an empty string and the field's type is a structure or a union, > the fields of that structure or union are visible directly in T. > > This function updates the size of T: > > - A union type has its size set to the largest field. > - A structure type has each field packed against the previous. */ > > extern void append_composite_type_field (struct type *t, const char *name, > struct type *field); > > /* Like append_composite_type_field, except that ALIGNMENT (if non-zero) > specifies the minimum alignment of the new field. */ > > extern void append_composite_type_field_aligned (struct type *t, > const char *name, > struct type *field, > int alignment); > > /* Like append_composite_type_field, except that this function does not > set the field's position or adjust the length of T; the caller is > responsible for doing so. > > Return the newly added field. */ > > struct field *append_composite_type_field_raw (struct type *t, const char *name, > struct type *field); > > Simon Fixed as suggested above in r3: https://inbox.sourceware.org/gdb-patches/20260824135737.415306-1-matthieu.longo@arm.com/ Matthieu