From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OTiAAOL+fWpylSMAWB0awg (envelope-from ) for ; Thu, 13 Aug 2026 13:29:06 -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=flFKWkhZ; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=flFKWkhZ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F07471E09B; Thu, 13 Aug 2026 13:29:05 -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 [IPv6:2620:52:6:3111::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 628C91E09B for ; Thu, 13 Aug 2026 13:29:05 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6D56E4BA79AE for ; Thu, 13 Aug 2026 17:29:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D56E4BA79AE 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=flFKWkhZ; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=flFKWkhZ Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011023.outbound.protection.outlook.com [52.101.70.23]) by sourceware.org (Postfix) with ESMTPS id F19464BA79A1 for ; Thu, 13 Aug 2026 17:28:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F19464BA79A1 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 F19464BA79A1 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=52.101.70.23 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1786642116; cv=pass; b=u5yR9T1+X2hxQOd+tqDy+cPdmnjL55JxZxxn3d1Y7IKtject3AqIxUJ5OCB/ZBfyY8INJ8W/iBcXfULbiy/ebTWFDm8rKEERhpUI1WozxV9cA9xe2CG2BbpHKefFnigmPQo4LAeoxqPxZ6P+bEDeLQZpdV5Qdm7MreJY0wPZlgo= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1786642116; c=relaxed/simple; bh=8gceZFAeoDDkzUMj/X0UE+0mVLwcWoXXg7GRRM75Zto=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=GNH7e7KZbhDy9qM9nnRUgvNhzngs0z9/mNhb7ZMmZ6C8ulhwF+bJuZFa3AomkdBNmsjgw9oDwEmVMU/0Drx18i266zcIQZR0nD0zcoMPpgil9p46T2JLel0EEz6DpWICJKgqOyusH/VNV8urJFHJzn7GG3Kn5QJKl9NfTW7Srbw= 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=flFKWkhZ; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=flFKWkhZ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F19464BA79A1 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=buAP5d0TL6p63yQeZgUEtMYSfyZf/keSrDg9w0buqbMYy5ATMGQLAgW0fH7Cva2lMMBU+pNDdcKVcq4AuD0eFNM1zE1BtIIJLDdcCpbCV8N/9Ydn7znqqwcYOlFhxYXfk8OIiGFsowS8MuLmQr7TQz+qhSO9VA4Y/6IfS0tM5ZM0wCNctpjE36Xkalp4+AgsSXs5VxUyvtqKSU8XbYiPBi24KXaD4/gALnDR1W2iMWi1ZNw5qPFUMpuX39BmpTJj5MRo0/2fYKJF6qNwtTYklHdPJlh0zK9CiS9ni+7m8u8nlW2U9kK4ojm1JqxbgLw8XUbiMrRsdcxazO95OmRMlQ== 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=Ep394TYkoOn4jsrjrgR/36nR/Mzxp02AaX07yqM5P0A=; b=zISjnixUW9ep0H8o7Z3Kma44ZX3p/F9UsF1LibNkCZ6QkiKjZFN0/g9+E1U049APfrgG8DQK0wzl2sk55PIXyaCq4IMnc9aLF992xuUtAgcJwPOUFveYQLkL2bGtpxYPy1hO+K4YRpaxBV4R0iw/EP4EZrDkcTAhtOvLfeekhtqBls4sL7ZjiMFIYZN4/X8T6B0izPloI7zB4CXyFbQoNdOipzW4UIy99O3Py3olHnsK4La1dYEE5LNnpMReKouL4n324W+HmdweKuoV2SZSHfbJwPhtrwy6xZMpBWshqWDi50WGcC6uk72ZTsVzTuyUdA0VJ+u68/kcWovZNckWrA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=sourceware.org 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] 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=Ep394TYkoOn4jsrjrgR/36nR/Mzxp02AaX07yqM5P0A=; b=flFKWkhZfWZdBIcalAhytC4vmCrbMvtuc9nMY3oMzI+SG5Ru5hCZcKeLznDv4P2h+kaIgNlprUOYi1W45tCzKSsw8nQj1sMJpVNIKorG/TznLCLksfEKwdEYw13tlMdifcNw1/IQShL1xcx1rir7UA4aNW4KiQX9/puFAg7K5cI= Received: from AS4P190CA0063.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:656::14) by PAVPR08MB9699.eurprd08.prod.outlook.com (2603:10a6:102:31e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.315.14; Thu, 13 Aug 2026 17:28:29 +0000 Received: from AMS1EPF00000044.eurprd04.prod.outlook.com (2603:10a6:20b:656:cafe::6a) by AS4P190CA0063.outlook.office365.com (2603:10a6:20b:656::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.315.14 via Frontend Transport; Thu, 13 Aug 2026 17:28:29 +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 AMS1EPF00000044.mail.protection.outlook.com (10.167.16.41) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.339.3 via Frontend Transport; Thu, 13 Aug 2026 17:28:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iWXxK3ildpQfgxZQ5O/rrbQRVCV82X+wMznk04wcMHLHHyBYIPMBWW8VcBeoqkba5kklrHdN9437ScKx3MAjq4hDNk7bGyFm9ChKBufTcGarfYLXQ7H2BVS6AxwtbHA2eW0aZWeCxKT3Jb171UztCea1mYspisasgUBGcW13sNwM82m79wJk4JqI+5hqqeH4MlEJwdDQQ6q2Cv6hfIm8YK3HG3GdZTvDm61ZGVWv5NkvvmH0VXAqdjLudDMcNllMoRfefzSMYlE54g8/v5z1AWdXWD1WHJ0KIDk8GCCIVlGBfz8GtvGEmr8oPJ+37NymYaBn4lRBe1SPkyOg2MTKbw== 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=Ep394TYkoOn4jsrjrgR/36nR/Mzxp02AaX07yqM5P0A=; b=sKVPK2wSrheiwdV+yQAirAqDGuonegxN2xY5fD18Mxm4Xz3OqOOLK0M/TgpOuQb2YWDWWWWPvgisOUIdAt6BUS5QkUFtTyay5HeDrMBAxfFRn5coLrLBO2qlvWEJsZ4VS36EEZqr+lgSHXsHRsW24V21OJFGUPMHqJsDAvx9L8b8AQZuLDbwzCtDZNe7HJGiwsuoilVqt4BBM2SZAGNQat/JzVI1MwJ7JdJz2GeaHl5Kch5+PLjGUITZpue/U4toqCsCeby/jjqYza0n2c3uJyOBZBkj92UWDr72Au+kDKxS2WVf9RzJtcLwyPX7Oc4ZQtUktbn94WWECA8PvQoQfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) 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=Ep394TYkoOn4jsrjrgR/36nR/Mzxp02AaX07yqM5P0A=; b=flFKWkhZfWZdBIcalAhytC4vmCrbMvtuc9nMY3oMzI+SG5Ru5hCZcKeLznDv4P2h+kaIgNlprUOYi1W45tCzKSsw8nQj1sMJpVNIKorG/TznLCLksfEKwdEYw13tlMdifcNw1/IQShL1xcx1rir7UA4aNW4KiQX9/puFAg7K5cI= Received: from AS8P189CA0060.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:458::8) by PAVPR08MB9507.eurprd08.prod.outlook.com (2603:10a6:102:313::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.292.25; Thu, 13 Aug 2026 17:27:49 +0000 Received: from AMS0EPF0000019D.eurprd05.prod.outlook.com (2603:10a6:20b:458:cafe::42) by AS8P189CA0060.outlook.office365.com (2603:10a6:20b:458::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.315.14 via Frontend Transport; Thu, 13 Aug 2026 17:27:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (172.205.89.229) by AMS0EPF0000019D.mail.protection.outlook.com (10.167.16.249) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.339.3 via Frontend Transport; Thu, 13 Aug 2026 17:27:49 +0000 Received: from AZ-NEU-EX03.Arm.com (10.240.25.137) by AZ-NEU-EX03.Arm.com (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Thu, 13 Aug 2026 17:27:48 +0000 Received: from PF4S4363.arm.com (10.57.41.32) by mail.arm.com (10.240.25.137) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Thu, 13 Aug 2026 17:27:48 +0000 From: Matthieu Longo To: CC: Simon Marchi , Matthieu Longo Subject: [PATCH v1] gdbtypes: improve documentation of composite type helpers Date: Thu, 13 Aug 2026 18:27:36 +0100 Message-ID: <20260813172736.500755-1-matthieu.longo@arm.com> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF0000019D:EE_|PAVPR08MB9507:EE_|AMS1EPF00000044:EE_|PAVPR08MB9699:EE_ X-MS-Office365-Filtering-Correlation-Id: 68c6ffcc-bb6b-4196-2c79-08def96049f8 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|1800799024|82310400026|376014|36860700016|11063799006|10067099003|6133799003|56012099006|18002099003; X-Microsoft-Antispam-Message-Info-Original: KvWeByeJxk1454BCDJCjKgpGTkkYk6Wxk4Z4+6aeez1vZrJRfS6tQ6n2JexuRGczd1TlbcsV/R/QkMWbR/x4i+IO58mEDFSB8Ls1RAeKIWjySHfxAddKL8SisJ1GmE3dTgeGDsMPsvSpusNI4aheoOOsuZGw1tDUecJ1WSOj7f5DkmzizXT56XvocsJbhSWCm5NBdPAtA0uslhF2k6V5kZmTsiTcekdd2eQd/QHApKDQ3VraViN3RdnP/RJi5qKtAUxrdpJEzUfwjpxm+zOOQCSMb7zHEp6p3vrZE5VIeyDbAU1bEuSUxrVneI4IWZfuc52h27dx+lXQ/nxyqyTV4NNCU60vRmBTm/7MSZch2huGmnAzNqfIhgyHSyFCD9MvnX1WVkd+zs1cEtbSXN3ZE83hl3wZTgOMmE87v8JDxDZmp3JtQVxPFOb15mn5ixlxl9prQAKCIFnbQjo8iUVfbhosJOJkBCi+9msdvN/5B5+yUS+VfHFS0dBHNcNUdfZcnSkHPkA7M2gW7ZSEVkWy9DRt/ElhUq8SRN22rqU2aarbydw1+1Q34b1/WsJolmyRiG0h1zwGRl+vU6GHnqIGdcje0QmFV62kjZSqMnQJuwxz5ayyEg58yvAxkzSXrMUycJf10AZwvEXxyhYVe0D39SwT1Ou7vzxOOCwf5RxqhxF3CeY2XiYgCEY8/SLvqPv92AeYU+Lj7/bHsCgkRnz/Eg== X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(23010399003)(1800799024)(82310400026)(376014)(36860700016)(11063799006)(10067099003)(6133799003)(56012099006)(18002099003); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: Y0LJolKSIbEPTrL1g85hpmeZQGOQj7yLY+Fcg30PYUBhkeXsxCKatkD2/w2jhYynlJMoXrMX7LOeKNlnVNjepYof7s9vSeeBEUgFpAmA3qu0uSgYoQldfiXcL/azBR/OKzmkqYDRsonXCjZSAwZPSfqxYTYLylC1F3TgQsU4LGt1GKGKmog34E2NYq+Hd9EPitKAV/2EUV8xFcvryTj1yPhHtKjopVUKJuCedn/45i3typRp3fuhwfC59MBUuWPqEXHQWVXRGHrk1koHGYT+sdR1URA1bm6sUoa9vNSBNG2h+wWir2cK6Webp6qM3zbvI6yLSyIAHFxlBkdZpoqccw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9507 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS1EPF00000044.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: fcb73528-94ea-4e69-e87b-08def96032a7 X-Microsoft-Antispam: BCL:0; ARA:13230040|23010399003|82310400026|36860700016|1800799024|35042699022|376014|14060799003|56012099006|18002099003|10067099003|11063799006|6133799003; X-Microsoft-Antispam-Message-Info: KowewD3g/TSFMQRwqZx4Ua81ZmKhbs0TRyvfF1lazWJfKPYuQpqtQt0YZOP1U1ankysILUtTYHrkhD6Xo+ryHXK/N/bj7YQndXpnZ0dMp7srsPhG/zjV4hZcjQF44UIaYSm7O/dmUFwL87D+Q/x89Ax9erC/KQdrBJtYYNAYKleLbbSpC9O+c9oL119JIZVspvv5Q+Q5sUV9Zh+WUcEzdQA5MqGC5wTyQkjJJFP8YpDM8d80XMJCzDlUB2rAleCnS/oxg63vFqUC0+9rMZJnFmt1aQxO5+V3w7AcujMxftEcnc5v1Ric7Fv2XP6I20JbU+Je03ALB/eqwjP0W+92KrvcNNL2hqdafZPyR2rfa6q2DVxuXa+hWbVndtOsr900FzaAUaXZ5+Q29AnFHdAQ23OhC2WY6vF6E30K2EeVC3aBTzj2BSnQe0tdSd08vNkYFcw8s/Hs2weM+P66In7DUjWShqraOtXhntWmGDCjMf40uBx8WJwMp+ibd5NTvA79pNJS7rAtJDtNlLlNDCyj8/asriXu5ST8dJng6aH1M7wZdrtOGi3q6vkb9j2AfEjVRydXR+bxf+edBhL3vmwX1FwPQcHUeuftU8hmyvlMhvKAR6cd/hXud9AuC31Wmzx+3HNAskTbVA9OaF/adejwUykdjv9k19g3XakX8wVSzShWGb1Uzrs0qA1vCzgVPSOv4hNZrqJUMRZm9UpungDU2A== 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)(23010399003)(82310400026)(36860700016)(1800799024)(35042699022)(376014)(14060799003)(56012099006)(18002099003)(10067099003)(11063799006)(6133799003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TZFMSXlCAq2843DWS1auTj3DiFcO+V5LGKAEAeqse9Eyo6URaEgJ9J8tMelsZLDW9S9sKWXjkc3Tq/P2ubeHgVT7KRTWwby2rUhVazLK1VuoGyUfiERxh8VH5jORp/JExmwSbweQItbEZHywhwGrsm5tqTX3joTQFtXTO3Dgx+2rjOz9KBynNasf+tB18cLA4B9xxRLNrNrpLO2pf+agBg1if/OG8xX+BoCg9ukvBMPEn5EzSc8gRQ/TYKA5scqTRuyUdq/pLe2WX3CR7ZCJ04UeRlJTqizfxtwBXskLGvpTRwZrrtA/NMvnL71wXHtukd+MnL3KWrI8PzVIMgm6qKGvsn4bYrJp+QtmBv8BiUmjw2tEpmWYrY5tvRb8xnCkUun4yZ9BK7/5YOjXrjXgxqA2ECPXPfSS9772pTq7Hy9x+VkGuF3VpnXN+XWl+8lv X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2026 17:28:28.5949 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 68c6ffcc-bb6b-4196-2c79-08def96049f8 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: AMS1EPF00000044.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9699 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 Document how arch_composite_type handles a null NAME, and clarify the semantics of a null or empty field name for the append_composite_type* helpers. Suggested-By: Simon Marchi --- gdb/gdbtypes.c | 21 ++++++++++++++------- gdb/gdbtypes.h | 13 +++++++++---- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 4b6c01910f4..7d8b7503da2 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -5413,7 +5413,8 @@ append_flags_type_flag (struct type *type, int bitpos, const char *name) } /* Allocate a TYPE_CODE_STRUCT or TYPE_CODE_UNION type structure (as - specified by CODE) associated with GDBARCH. NAME is the type name. */ + specified by CODE) associated with GDBARCH. NAME is the type name. + If NAME is nullptr, the type is anonymous. */ struct type * arch_composite_type (struct gdbarch *gdbarch, const char *name, @@ -5428,9 +5429,11 @@ 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. */ +/* Add a new field named NAME with type FIELD to composite type T. + This function does not set the field's position or adjust the length of T; + the caller is responsible for doing so. If NAME is nullptr or an empty + string, the field represents an anonymous struct or union whose fields + are visible directly in the parent scope. Return the newly added field. */ struct field * append_composite_type_field_raw (struct type *t, const char *name, @@ -5448,8 +5451,10 @@ 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. */ +/* Add a new field named NAME with type FIELD to composite type T. + ALIGNMENT (if non-zero) specifies the minimum field alignment. + If NAME is nullptr or an empty string, the field represents an anonymous + struct or union whose fields are visible directly in the parent scope. */ void append_composite_type_field_aligned (struct type *t, const char *name, @@ -5489,7 +5494,9 @@ append_composite_type_field_aligned (struct type *t, const char *name, } } -/* Add new field with name NAME and type FIELD to composite type T. */ +/* Add a new field named NAME with type FIELD to composite type T. + If NAME is nullptr or an empty string, the field represents an anonymous + struct or union whose fields are visible directly in the parent scope. */ void append_composite_type_field (struct type *t, const char *name, diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index dd2d24fa8e2..93bd938d0aa 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -2431,14 +2431,19 @@ 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. */ +/* Note: if NAME is nullptr, the type is anonymous. */ extern struct type *arch_composite_type (struct gdbarch *gdbarch, const char *name, enum type_code code); + +/* Note: for all 3 functions below, if NAME is nullptr or an empty string, + the field represents an anonymous struct or union whose fields are visible + directly in the parent scope. */ extern void append_composite_type_field (struct type *t, const char *name, struct type *field); extern void append_composite_type_field_aligned (struct type *t, -- 2.55.0