From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ryQ5DfTpfmqJMSUAWB0awg (envelope-from ) for ; Fri, 14 Aug 2026 06:12:04 -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=B8V4+f8Y; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=B8V4+f8Y; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 229461E0A3; Fri, 14 Aug 2026 06:12:04 -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 2658C1E033 for ; Fri, 14 Aug 2026 06:12:03 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8D1694BA2E24 for ; Fri, 14 Aug 2026 10:12:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D1694BA2E24 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=B8V4+f8Y; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=B8V4+f8Y Received: from MRWPR03CU001.outbound.protection.outlook.com (mail-francesouthazlp170110003.outbound.protection.outlook.com [IPv6:2a01:111:f403:c207::3]) by sourceware.org (Postfix) with ESMTPS id 70DD14BA79AE for ; Fri, 14 Aug 2026 10:06:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 70DD14BA79AE 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 70DD14BA79AE Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c207::3 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1786701988; cv=pass; b=r43FVC6nhkZQxOjlst+utue9+rlz61wja3MI5tZz7kJ+mFGrWyv16q12zgx6Yr6Gk1jH/5P3cJLKimFKWx08TZ9S3YCC+m3DakGqyKWfyhE/miW6R9urml80xvR99faTBrUemkUG/M8v7GOiJbbDnpzR9BW8XstIKzrgAz6l4c8= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1786701988; c=relaxed/simple; bh=htpZqNJjIsirlYh2p50pgdxxSBvnYhaaBmPnkQqVHcU=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=MSJTwffcU2MgrpCLN5jTAYYXJ3sulVBcF2Q4cULFTLCSa14uEGm0mzRMhBCA3ZyN2Q1gsZOg7xkDe/xNbRcGMAvK7yQAQqoCi0k9cEjxFGj7P1WWwKWQgP+dq1E3/cPpSWOV27Ai1K7pxlF7GiCpemuI/OnfL2AH9p0pBzeTw4c= 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=B8V4+f8Y; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=B8V4+f8Y DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70DD14BA79AE ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=zE0Dk3gYCYhYnKxk696MvrC2t/MdDoA+d5iDGIrAKQXcsHjeUDFNeQuzr4QwloRPU/HqgXnk6zMyShhssdsGR7QESaEHpJBtJ3OaUYDYTWsl12q0eiEzHTEWK1Su45Vcsluk56C3img3Yige5tg/h+/noqUdApxBno+mL+agT6WSP/OG2695SXH76N5XnosY4AE4xX+V6rSrPuVTW6fbM5CqDJaKVi8zc/N4OfnDdXYm+1qz0yTo4vfyFr48KtVktnWe9i78B5EU4Aq9TJfBoutOQwk9CNdOPSKlpx6VEXR3LKhc3lsG73TJbYsOSz+keZZE23t/ulyg5qfxdI8aSw== 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=fuWEh0NmXptkKMDzM0jflsPh5swm2Rg0fDn/wnEYs6U=; b=sRGbEvA2c/VPozl236Bc/TFM7oDFA+ulyAdRb9G8AL2VXCYIbZ7aeYNQqvN6ofTQGaeHO0ZaOhMANA08Lyxg8rJxFVPW2AOZH2PLK0YTv3uLwFfk/4VjLF/b+7YL05p/99G8idzuMZBc/siHAMSIpNe/zRkVVyKd48vG1xGLgWnT5MbhQnsFHF74FbzB0m5Mnq+WVc7ZDGN0+Q6DKRWxRFp1tIKVRCjq58Jz1Pug5L3XltW/RA7ZFWem4zus4AqZ+IKiCK8AkMIQmWbt0FWD0W8P6lkNjH7sNZn5k7zgthVK2zIYCI9XABi6J9oZYqAqeA0s9vYSQxutz1j62u8YwQ== 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=fuWEh0NmXptkKMDzM0jflsPh5swm2Rg0fDn/wnEYs6U=; b=B8V4+f8YYUjaV3Gl5uCcbnr0VWIim+zpP6pkesrMJ5gjpRHFO0tA5Pyh/ejX6UdcUSky0K5F47p5pLPgHYYgk70ykF2iUGAVeupxiLuCwVyO7QwetSnWFFNFrKWuXLuRPBCKZURRgUmO1uNauGjl25bo8lywRzQ+ow+4eQa/uEw= Received: from DU2PR04CA0071.eurprd04.prod.outlook.com (2603:10a6:10:232::16) by DBBPR08MB10628.eurprd08.prod.outlook.com (2603:10a6:10:52d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.315.16; Fri, 14 Aug 2026 10:06:19 +0000 Received: from DB5PEPF00014B93.eurprd02.prod.outlook.com (2603:10a6:10:232:cafe::79) by DU2PR04CA0071.outlook.office365.com (2603:10a6:10:232::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.315.16 via Frontend Transport; Fri, 14 Aug 2026 10:06:19 +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 DB5PEPF00014B93.mail.protection.outlook.com (10.167.8.231) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.339.3 via Frontend Transport; Fri, 14 Aug 2026 10:06:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UWCx4MZvLTaCSasbZ9zIDLCOjuJ+ikt8uClsMrFHm4boO1JTHw1e0JEBK7J8TosAQYfNLh9dV4wafiy4GLgBWIwNk+dapS1ShYJN1F3fLVlgDppNxlN1X/dPDJaV5S9S4sqcz/zUwxmCwVR+1HJ0EDGIi2gl+ekE8qZ2l3Ws85+czCn7yqk5Ix0xWOmRLbPARZByvQWSj4XUMqPN33cuyhgvX+GY82ExeWmgF+N+hrgYYakwiSIs/Utu4Ff9edh8j70J8ZbBnFnUaaAbWLqIyvUwL9SXSyW65fU2aD8MQVnSwyQN6wbvxLFILBSV1N7K3NG//7PphWzPQxhwH/RqZQ== 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=fuWEh0NmXptkKMDzM0jflsPh5swm2Rg0fDn/wnEYs6U=; b=By9PqFffB5gXhoTnQFodnYsGfb83ZLxZT+ayuB1uRsGfteXM2UEvOGrvDtaNne/qlUUhrNJjRUigNfwpzx+kKcgUJKe8HRvmoavKqZ6s+oPJDRONZ64vUFf0EbodgeY+tHWiAJxf8XeCaoiflEx4VMmbV7qqS9ZzpSg5OON8os18MJ2fKtl3gdiKBupvsqH3I+fN6dcPr1CRHe126YloJhCixL6hFHCEVBes6Q3hlyd1lpqE28fQlAgijAGSYm/01pEF37rBXoKUd9m9AGawZkhg7qCPyNgqp/N+JoaM0pJKq0NZuKbvJTCCLISQsbAuyX6gaeE+UFhtO3mK+XCZJg== 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=fuWEh0NmXptkKMDzM0jflsPh5swm2Rg0fDn/wnEYs6U=; b=B8V4+f8YYUjaV3Gl5uCcbnr0VWIim+zpP6pkesrMJ5gjpRHFO0tA5Pyh/ejX6UdcUSky0K5F47p5pLPgHYYgk70ykF2iUGAVeupxiLuCwVyO7QwetSnWFFNFrKWuXLuRPBCKZURRgUmO1uNauGjl25bo8lywRzQ+ow+4eQa/uEw= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from GV1PR08MB8667.eurprd08.prod.outlook.com (2603:10a6:150:85::13) by PA6PR08MB10766.eurprd08.prod.outlook.com (2603:10a6:102:3cd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.315.15; Fri, 14 Aug 2026 10:05:41 +0000 Received: from GV1PR08MB8667.eurprd08.prod.outlook.com ([fe80::ae9c:f011:dbb4:c095]) by GV1PR08MB8667.eurprd08.prod.outlook.com ([fe80::ae9c:f011:dbb4:c095%2]) with mapi id 15.21.0315.014; Fri, 14 Aug 2026 10:05:40 +0000 Message-ID: <1e524861-e8e5-42f5-ac40-66b017f15670@arm.com> Date: Fri, 14 Aug 2026 11:05:38 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5] gdb: align siginfo_t with the Linux kernel definition To: Simon Marchi , gdb-patches@sourceware.org Cc: Luis Machado , Luis Machado , Thiago Jung Bauermann , Srinath Parvathaneni , "Maciej W . Rozycki" , Andreas Schwab References: <20260728123239.211813-1-matthieu.longo@arm.com> <50ac0d4d-7039-4ec0-837c-2b2bee7add3c@simark.ca> <10ce3491-6802-480d-b2c7-fc3bf0efb60c@arm.com> <64c7d358-b3b7-4f8b-8485-73c976203260@simark.ca> Content-Language: en-US From: Matthieu Longo In-Reply-To: <64c7d358-b3b7-4f8b-8485-73c976203260@simark.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0458.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1aa::13) To GV1PR08MB8667.eurprd08.prod.outlook.com (2603:10a6:150:85::13) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: GV1PR08MB8667:EE_|PA6PR08MB10766:EE_|DB5PEPF00014B93:EE_|DBBPR08MB10628:EE_ X-MS-Office365-Filtering-Correlation-Id: 94b42d19-a773-4ce9-e330-08def9ebafa2 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|376014|1800799024|6133799003|56012099006|10067099003|11063799006|4143699003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: ItgejJEovabC6f6xCI1bNRIgFAk2kPACf9sU+wgvsXdHQPSbU5dJwSZUPiZYqCYvtF6eHghVY4AZQ56N5cPIZhcYwxczlM+7Aifg9PtwJ8beXyL63T2V2Sq/LGfXGVAColqwwrzmivAwDSK+gVqHf9Zuxn3SiMAlSt338EFmkfTjw//VZIVEx2hhNLIjBF410ixlOtr+ejcXiZ+Nnht83U99mnQyRIVJXlSrWxMLd7N/tvzB0nZTraobX4IN7Pz73MPkmxxhDhqbD8/AoqGFUINzRK9pJhS8OcdZvOoxwscjgxlZEFsVHZerCAHsq4N9lSduX6rBz55HagV6Y//NOlOCnhSBGJjhv2qs+QlhhsgJ6J3qfy6S9Zv3kZZSrZyrJ85NTbkoz/g7D2tBq5S4FPRgjZFIal+FoZ07+41FfisZOqtFQRREHUJgrq3IB0gcfT7/7F2pYXhzubJ89PJAlsX5v0VLQjrBIgnTatevcGwtIGJU7w1Jwea9uyzNrtD7Z1mdL2/8ehaHuYFwsYM8hX4ph56wKgwDAG4j+SF174xa9HCuusGXfXoGkvRw+HkZQwugTnsUO+46v97ga2oE5NM2Z6zbELxF5K7VHIiLKyli2AKa3ByHyNp21oGyP1b5ZEEfzbVo+FzyXy5I3NmIHnhpsdg4Xi8sid+n16A6ZW8= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1PR08MB8667.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(23010399003)(366016)(376014)(1800799024)(6133799003)(56012099006)(10067099003)(11063799006)(4143699003)(18002099003)(22082099003); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: eoyVno9/k5xswolFVJSvqA/t6V/jv+Da0UD6yqYt1Oh/WBNJ30eNXieow7OzkuzmSw5JOUKqmwYsDNh2Zi6Ah+Mwdv7u/upsbrGuVSgxflLjcrRSwvm+DiOFUA8HV5gWz57rUywfFWJoDa3En27yiPtzl/Y5mOyWoBwx6LMuEh2W1JmAAn6oONy65rpUQcTAGZsLEZaSdpSYCh/tZL0ZyDXF4jD/rax9c/i8dku8pPSi8IHPhZr04+XEK5veHrtwfF0F1oRFxyBs+JFL5UzX4jYvYIzblWksrfG6tEvfEnoTgnbfd0YxCwS1GFQfrBm+v7/W7fHZ83Z19MbndCpsyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA6PR08MB10766 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B93.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d43c2f74-d670-40c8-bcc4-08def9eb9820 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700016|23010399003|376014|35042699022|1800799024|14060799003|82310400026|4143699003|6133799003|11063799006|10067099003|56012099006|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: eN0Q/AjkRgg3uNcB8s4dBMg6Fn31umPwOlEC7yVVTB6ZFsHNI6767BzgmcnEV0no1SMBSbNVmA5oeQIJLoeAw19SApjy4U0935RZqDH9za4Fb4AYWo6Pyf1Xur5gDYpXIik83QKitdzC0Xe61GexHU3o4CNdNLxfGjZ6RiUDkgnnfHuqhT0WioLp7dk+ZDsmtWgQdGPAFfOPVPL2cdpVk0wB5uc5LIW4oR+uO+QZhQCaMWJnkEkx3krrmFIFdvZBbnsBxJzpoWYSRfAsQ1usEjmk+mgGTzYOoEjwzFY4eyL0+OVysBTgq7Ct5Zht+4Ib756hIY3+qnR2WfdNaGGshBEAdOHf3Eu5Uh/FBSBsjcwzxK4N1IVq1TKcK0yivYMSlw/gPX19Ei0cRdvcUzhYxt7ycnm9m2fuu33HilLTYc4/GuXhdi4JGpLjbOHOinp272aNKJPncpCv4MgYUkFlOEnqXCOrRQCxvXOQHerK9qErWCtBZmv2LzDRQ95zAe1bow33LMhYr8S3J0mivdXIS8mpW4yi7h5QwgPECzrv3im8OfqJ3rUr1VgvN8T1KExTuur7y2aM3RVJWonTOSHIYjwuh9aCN+ykdE1OmN0QG8zSYRdxXkW1JHQ8Geq7RbODAzmCVaXmO/bdLf5OgFnN+xhI2iDOsO2hBoEzfRZhHqQ4Om37NaR9oP/V/irxE/LncKXABFyitmIOA6pgPXeplw== 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)(36860700016)(23010399003)(376014)(35042699022)(1800799024)(14060799003)(82310400026)(4143699003)(6133799003)(11063799006)(10067099003)(56012099006)(22082099003)(18002099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dldpHxDuZrPsR5BX/b4/7SoYjZm5PUsejQywVtvU+alS/cEtl2breETHAZewAnTW7Z6DyTXm1e+BCtGtxKg9Mn8GzMVWdTSQSWs1bvltOO5KEKYJRbRIEpCELHi4yi9zHFXh2xUOLmJe7dsnzgPqMDORb17tkw3eFooJhiHBk9QnCPbHZ6S7R99qUSyPdnNXXhnoljmTwzp8RSkOY/ruSqHgg1odFDkR0hjrOZDBlADekvQYeKX4sTb5qTIz0tNWr2zYtKByypLgV2de3/nT2LHTinfpxh0xOld48RvaY9Avc0npY3G1hNfsviw7L4q4YGyCjGx/xAgl2FqGhYr7qY9mOiD96o59ByNmvlGN+xqKiVvee/qEcPIU3/2TIrmdiSYXil/9yps79l1O6Q+VnJ4WOiAQ6A5KGJlDJ9xcXwT13vv2HnaHOqmLMdS0noQ0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2026 10:06:19.1391 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 94b42d19-a773-4ce9-e330-08def9ebafa2 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: DB5PEPF00014B93.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB10628 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 13/08/2026 16:49, Simon Marchi wrote: > On 8/13/26 10:48 AM, Matthieu Longo wrote: >> diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h >> index dd2d24fa8e2..e4fedd886c4 100644 >> --- a/gdb/gdbtypes.h >> +++ b/gdb/gdbtypes.h >> @@ -2431,11 +2431,12 @@ 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 >> - field packed against the previous. */ >> +/* 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. >> + If no name is specified, the type is anonymous. */ >> >> extern struct type *arch_composite_type (struct gdbarch *gdbarch, >> const char *name, enum type_code code); > > It's not the name of the type that matters, it's the name of the field, > when added with append_composite_type_field, that does. When a struct > or union field has no name, it is anonymous, and its fields are visible > directly in the parent scope. > > I mean, it's true that passing no name creates an anonymous type, but > that's not what matters in the problem at hand. Also, it should be > clearer: "no name" means empty string or nullptr? > I moved this to another patch since it is not directly related to this patch. https://inbox.sourceware.org/gdb-patches/20260813172736.500755-1-matthieu.longo@arm.com/ >>> I think that the ideal user experience would be for users to be able to >>> access fields the same way that they do in the code, that is >>> `si.si_pkey`. All the _sigfault/_addr_pkey/etc parts are implementation >>> details that could change. >>> >>> On top of your patch, if I just delete all the internal field names, it >>> seems to work just fine, see patch below. In the end it models >>> something like this in C: >>> >> I am not against it. >> However, could this suggestion be addressed in a different patch ? > > As I said above, we can't just rename the existing fields, there is > probably code out there relying on those names. > > We could add new fields, so the structure would just contain both the > named hierarchy and the anonymous hierarchy, the fields would just be > duplicated. That's fine if the structure is read-only, but if for some > reason some user code needs to change a field (I don't really know why > it would do that), then that would be awkward, since it would only > update one copy. > > Anyway, that's for later (if ever). > >> Simplifying the existing pathes to si_* values with anonymous structs would increase the impact of >> the original patch, with potentially additional testing and carefulness required for others >> architectures (for example, see gdb/nat/amd64-linux-siginfo.c L269). > > Hmm, I don't think we need to touch this nat code. I am only talking > about the type of the $_siginfo convenience variable, which we build > manually with those arch_composite_type & co calls. > > Simon So, if I understood you well, you don't want to touch the current definition in linux_get_siginfo_type(). Instead, you propose to define a new siginfo type as the data structure below. Then, siginfo data should be cast to the new user-facing type before being returned. Is this correct ? #define __ARCH_SI_CLOCK_T unsigned long #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ sizeof(short) : __alignof__(void *)) struct siginfo { int si_signo; int si_errno; int si_code; /* Beginning of __sifields. */ union { /* _kill, signals, _sigchld and _timer are tangled, so should be flattened together. */ struct { union { int si_pid; // _kill, _rt, _sigchld int si_tid; // _timer }; union { uint32_t si_uid; // _kill, _rt, _sigchld int si_overrun; // _timer }; union { struct { int si_status; __ARCH_SI_CLOCK_T si_utime; __ARCH_SI_CLOCK_T si_stime; }; // _sigchld struct { union { int si_int; void *si_ptr; } si_value; // _rt, _timer int si_sys_private; // _timer }; }; }; /* _sigfault, _sigpoll and _sigsys are not sharing anything, so are flattened on their own. */ struct { void *si_addr; union { int si_trapno; short si_addr_lsb; struct { char _dummy_padding_1[__ADDR_BND_PKEY_PAD]; void *si_lower; void *si_upper; }; /* _addr_bnd */ struct { char _dummy_padding_2[__ADDR_BND_PKEY_PAD]; uint32_t si_pkey; }; /* _addr_pkey */ struct { unsigned long si_perf_data; uint32_t si_perf_type; uint32_t si_perf_flags; }; /* _perf */ }; }; /* _sigfault */ struct { long si_band; int si_fd; }; /* _sigpoll */ struct { void *si_call_addr; int si_syscall; unsigned int si_arch; }; /* _sigsys */ }; /* End of __sifields. */ }; Matthieu