From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id C/EVHNqhaGrVtDEAWB0awg (envelope-from ) for ; Tue, 28 Jul 2026 08:34:34 -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=K8Nis3jc; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=K8Nis3jc; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 604A71E099; Tue, 28 Jul 2026 08:34:34 -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=ham 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 3E1B81E099 for ; Tue, 28 Jul 2026 08:34:33 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BF0864BB24EE for ; Tue, 28 Jul 2026 12:34:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF0864BB24EE 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=K8Nis3jc; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=K8Nis3jc Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazlp170110003.outbound.protection.outlook.com [IPv6:2a01:111:f403:c200::3]) by sourceware.org (Postfix) with ESMTPS id 732664BA2E0C for ; Tue, 28 Jul 2026 12:34:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 732664BA2E0C 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 732664BA2E0C Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c200::3 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1785242042; cv=pass; b=BhuGsQaD88Z+PECKRTqNAP0tvjOFdRfwnovIZGbbCdStPgxDOUdIJMYMk+hTKMFtn1tRNTgyA8FiQJGJ86rvXTxSLgaBpfEwbpFaRdQot0/Ssb6NcVYVg4UZ4nN1UtzXYtnedW+rNPpe6aGT6IilZGtX/bPZThEGPZvFhhfp4I8= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1785242042; c=relaxed/simple; bh=xZ/IIS7WtB/9Q/0WTxvqohp8gpOYw9BsN6cfsaJRFfA=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=rKIDSbYkKHEyAU5Oc+3ehuNv8BPQSEltFf+r4f4DxKLUFSDGQPwpwobH+GHhee2uyhLXmkX98l39n8AA9EwYycXuxL/2+CGTlU4h/easOFj2GT347gURdAOJLTjs6IZxOd6fgRNcRiLagTnXpA5ET4sH8PiEytPfRwTzumHUgJw= 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=K8Nis3jc; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=K8Nis3jc DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 732664BA2E0C ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ppphgsaWkd9cmr9PhEBM11lxTHT2VIw+Z0aP2eVUvX/b1jP51eSro28Ury40oP3l/rhO9vBLNvOGA4OXGS7IqO8sdy8IVDUzk4JMeEuHchQ/0Lxzxga4prO6JXmLinm/TWiQG8KIlpN/MAR0/Rm4mauTtpKekMg4DR76D2v85GG6mbM5nIFwGcdrSR6AUBC5rpBcnillU5ruEWwDYPcX6RzxC4wpOb+wIhhcjdaBzOY0p5E9dZg1z3mVfd2ChfVZlRJBQ8EaR0P4SEp3ycz7dpWkPpeBfEvkUxLVaD8fzV9vGg8W3pf8QkSe77LmIdbwY4Q0kR+Cu5lVdHIEjIWJWQ== 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=ivx5+LpQ3xXT+SE4qYBdnsWPZeHRmFBGqk0tAtSZItU=; b=PIrV3IZtCrT00L4B3lKwsPC68cvQjtoPNFJwwSADWZBavg5f4fcf2bjMYZ//KvTA2sGsJyiy+2jE3WnkrlXoueBOsjH6KPm+98zKSAiVtpoaeaoeyqrvcyFDAaUoCmf9EuKLQv9zk84NgNcefjRcZ8uoTTGgGJFL0l93M94jC8Hc2EFhsINY1BFcruBh+ysZD5IZQUS2VGORDDObWOxGLOd0X+rvFD92s4Ji9Qs/91xz4dXubyfR8gBZJA7P3jj0XPai0C09OYIG6uI2JEbAyWG2oYioi6C8WhEqXPZeTUJriZpoWLeX8U2Facp2N79gqMsiRchkaCMtlybziM+M9Q== 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=ivx5+LpQ3xXT+SE4qYBdnsWPZeHRmFBGqk0tAtSZItU=; b=K8Nis3jcj7YHxeRXhCHeMT/6h41iUZpbxjbZayfgiaFzrO6RGtwY56oXglKJFIJSPsWP/9fyYDuhnqkUsOmOi6v6Hbgh6vAtdloXl1uKOJiQ5E8eQW2t+0P0l+khWmV3gR0/6xrklcYYbbwL0u5ITTY3+0ae7gjTKohJIWK/GMQ= Received: from AS4PR10CA0025.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5d8::14) by PAWPR08MB10092.eurprd08.prod.outlook.com (2603:10a6:102:369::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.12; Tue, 28 Jul 2026 12:33:55 +0000 Received: from DU6PEPF0000A7E2.eurprd02.prod.outlook.com (2603:10a6:20b:5d8:cafe::10) by AS4PR10CA0025.outlook.office365.com (2603:10a6:20b:5d8::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.245.13 via Frontend Transport; Tue, 28 Jul 2026 12:33:55 +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 DU6PEPF0000A7E2.mail.protection.outlook.com (10.167.8.42) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.270.5 via Frontend Transport; Tue, 28 Jul 2026 12:33:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EAmZfjasZGBU3+Y85YACdFBtXyPozpNLnfy4s/dj9wLE+RuOYIG70b/6OUGYOzZmPmu12uHFUa1thanbDXT8PI2inI9pS8iJWMxxdkNEbbPoWvDvl/gLf7Mh5soo44zrVl572/phZURAbhI9BXpuGoq7j20dtUA1EeeJURDvLfwAID74f+PWt0GzRDw+XpE793CF9ZXtwcMQyS23Xv1E5tPOF93/B7HhU1d5YGr/qgeapoJ9yIZPby8bKtU872IwYdEfGhMZbNv2bLaKXZVtW1tQ3Tr1dDIdxj6gYRiyGO1LM6c9gJRZRc/zaOFCfEsigz6ZH7NC3i6Gwxd+/W5Qjg== 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=ivx5+LpQ3xXT+SE4qYBdnsWPZeHRmFBGqk0tAtSZItU=; b=NLPymBxnG6FnzamdPNnMOrC/sakCFjmlGtcrVmvPKmgppU/qBoRuutzwgK4BcVhAmKWirE6dMxJgduNVOSgi2WvUteXhsysgooV4GScNFyqVJKP0ZlHBsc+vjAjtPcDIzesiPPVvnYv5ag2PoYKDUWlZs3IAZDt5spW1XEIW1nfS+8bVNWzjSgXShBMhCH1qJFPikyh8YDgCbrFDHUL3HnmXxLdfJOEy3qOzN8mkeLKdrtsRxNh2zr9pGMZpitdV7r+R4yQpvcQozp6h08XMP7It+e46scYQR31o7PotjIIkEjFiqsyds3Eub9Gdmf63XYtMnS/DahAGikIwuoBlTQ== 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=ivx5+LpQ3xXT+SE4qYBdnsWPZeHRmFBGqk0tAtSZItU=; b=K8Nis3jcj7YHxeRXhCHeMT/6h41iUZpbxjbZayfgiaFzrO6RGtwY56oXglKJFIJSPsWP/9fyYDuhnqkUsOmOi6v6Hbgh6vAtdloXl1uKOJiQ5E8eQW2t+0P0l+khWmV3gR0/6xrklcYYbbwL0u5ITTY3+0ae7gjTKohJIWK/GMQ= Received: from AS4PR10CA0018.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5d8::12) by PR3PR08MB5594.eurprd08.prod.outlook.com (2603:10a6:102:8b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.12; Tue, 28 Jul 2026 12:32:48 +0000 Received: from AMS1EPF00000046.eurprd04.prod.outlook.com (2603:10a6:20b:5d8:cafe::95) by AS4PR10CA0018.outlook.office365.com (2603:10a6:20b:5d8::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.270.12 via Frontend Transport; Tue, 28 Jul 2026 12:32:48 +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 AMS1EPF00000046.mail.protection.outlook.com (10.167.16.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.5 via Frontend Transport; Tue, 28 Jul 2026 12:32:47 +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; Tue, 28 Jul 2026 12:32:45 +0000 Received: from PF4S4363.arm.com (10.57.42.206) by mail.arm.com (10.240.25.137) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Tue, 28 Jul 2026 12:32:44 +0000 From: Matthieu Longo To: CC: Luis Machado , Luis Machado , Thiago Jung Bauermann , Srinath Parvathaneni , "Maciej W . Rozycki" , Andreas Schwab , Matthieu Longo Subject: [PATCH v5] gdb: align siginfo_t with the Linux kernel definition Date: Tue, 28 Jul 2026 13:32:39 +0100 Message-ID: <20260728123239.211813-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: AMS1EPF00000046:EE_|PR3PR08MB5594:EE_|DU6PEPF0000A7E2:EE_|PAWPR08MB10092:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c20b9fa-2429-4a3f-a80f-08deeca47d46 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|36860700016|23010399003|82310400026|1800799024|13003099007|6133799003|11063799006|56012099006|10067099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: +/TK+JU1YiwqOvzYokMqyPg/WK+DxNPoTNIvCkBbRCePLxqjalhOlI/O43VK4enJzGIujno4JHtGSj7EHdesIXM2bqRQOkWUxeuKP5a9hJdBwkhiQ4/gpHDap8BTsE3lVHXxUjAQ/rrXy6TcQ4iuS47sY95W3F1rK+A8rrJjjq3TJXkHXWG8FBkUML4FeRav+wX1RHEjieWR2J9Kx0PTnr3ysxm+aK2WMBJsJVMkrN5mrL5M9Od4ukrDgXVTrt+wvoSkPxSxVAr76atkdCDT3A6EboVUkuTFM/UADRoT3KkkgSYWeVa+mL8KWpzjHMC3EzL6V8jZBx3HwudWCJl+U73B25ZkN1/rQQdCIvbU4lVfTZ/Jg0Avo5m+EFz0YWkHF0cw+vktAxM4lLFiFst1B+z2udznum2Iuufmaja/j1Ndl+HMWMYOsMx0CL9H2UL2U6io5ziN5nbqsLBrU/G8Q2GOscjEE/js/2kBGi/BX21tL6yXqjkFndqWRgwZtkB6uFlilO9OWm+B1GMSN+bDNSpjlR24k8V50APVCqje6OA/n/ICh5a26GcggBxmzkYesDSsq4nnBeghtzoLbcx7bFAW1K9tsVJwEuOeUWDfQwK97Harr1HD51aWXHFkhJNrxPNJNg5iNCVlc26DDEQPHDGrg5QwyG7A3pssjLA1KDk= 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)(376014)(36860700016)(23010399003)(82310400026)(1800799024)(13003099007)(6133799003)(11063799006)(56012099006)(10067099003)(18002099003); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: mRvUDZ/WSVbnMSRhiKyJpSgT7cOo6zr5l2mHiViCzDiHiUeg0ORE4dds4J3CJwRuKNRTXDn/C7QPhoq1Y9Nz4BChYo2skrdAcn+n1hiFAjgURkdPeV6YVrR2veW+gK1s/Zk5V497B1SBsWWw9Zrn4oO8IfToWAUdCS2k/Zrq9TgbPbuBr8PceuM3LAEiOtlbkL4cbd3Q57EDrCFgYUOJosx9EhHd2Vg2L6dbOuRHAW+Pl/UaV4qzuKzqqgGerK3gyeYPUKLgurf8blfQHcYPTihO88plWjRLsMnIVq9QqnYjjlPogxumOLl2NK7tHPRORXMcPScdCGn2mExJeiBC/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5594 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF0000A7E2.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0d8ad0b1-7af8-4f50-38e8-08deeca454e0 X-Microsoft-Antispam: BCL:0; ARA:13230040|14060799003|376014|35042699022|82310400026|36860700016|1800799024|23010399003|6133799003|18002099003|11063799006|56012099006|10067099003; X-Microsoft-Antispam-Message-Info: yn6qWW8ITSxDyG4zaPXD1u94boIIUeGM6aVJEzG/ktgIg5TjuJsm6dtmTVumehFZvtcDB2+H0X2Xl5ZNJqqfc7/fHq6hkTzKf2a3X0RSPW+28+aeci8hRYHn/bb7eDGZxq9QtrjgRum7c7a4e5ohGLFS/PMDIZ7oP2reVCxjMQS/VckbiWyD6kuDd8zXanmsLokV2/2ooR7x6Bm2eYmc7wMb7oUcDDPsokZCQPKE7RO1usFwiqg5BN/4P+cZTH/XKjw3Iify4zrr/hgti0XXo3dPhooZBVi7h/2oj1gJLl6rhm+Djor9I+/bf1bciNuGEvLDZh9VNeGtYI5YVK6ToNs5mW/SviL7CS8L7Rl6x1iAFGgv7KQTiCnJ3e0HS9ZTlukWIzLa9OwWlR4Lw3Mb++t8nAgGtwpO3WzI7XadO8kahM1I0PJbcUHWOJxJ4pgBny66NseqWy9rLMAqx+ukk1lgaId3MlNG/dOjVMeoN/rb92jiU4+11IBb8YueRz6y5anChSFQbHB9AdPwueRxJJuGK6ouJH9PNeqwFp12h/+J5ZA48oTOxsHMLREL948Sq6kCgPtlwAdVwE9/OH898CX6ZYtnNDaUtuIguI5E+1gvogUvxmqN9dYj/IeP1GXxQPDgRUUtMLO9TPJy7R1EGfmfS33zdoOsIf5OvhaUgZ0= 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)(14060799003)(376014)(35042699022)(82310400026)(36860700016)(1800799024)(23010399003)(6133799003)(18002099003)(11063799006)(56012099006)(10067099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3t3jKX4gcuMxnv27fgrVuxowM8RHxYMizP12MpVRl9f50Pe6h7X6LvfcfoTOF8vNek2zTBtWVqmhEQF/S1lPG/I+LpudnS67V/CJIlgUYsmktboSiP82pkylgOVUeXfMFuzZnmOyz72eiROW3DX3dfWkBVlpl6ZR3vo7V8DjSdRFOyj3vr7qWrH+zcl63jJpvpsYQiNGcXNo90thztg2dIkhEssYqGXGLuqrICyuufceHrQrCWAtLASS2xh9BYy/XRIeWDwiRsAiQqzR1YBCEw83kKLrnpS9gbzQeShPG6p074XrXVpE84GuCIwZJkukjsDDV8vq/zcBEuegKK0Q2DQDVWNP+Fe5IPPlYuRTw1oXHauyrNwuOZGf7l3bbm5ibR0cjoJILjcJIxRkmTAFMrdh5XTxPRDm21DSMTIFZKmrwYtcXIGkV2F0BDUOyJgx X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2026 12:33:55.2697 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c20b9fa-2429-4a3f-a80f-08deeca47d46 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: DU6PEPF0000A7E2.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB10092 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 GDB's current definition of siginfo_t is missing many fields present in the Linux kernel definition [1]. These fields are useful for providing detailed, user-friendly diagnostics when a fault occurs. Some new AArch64 extensions, such as Permission Overlay Enhancement used to implement Protection Keys [2], require the debugger to inspect 'si_pkey' alongside 'si_addr' to help the user identify the problematic key. This patch aligns GDB's definition of the __sifields._sigfault member of siginfo_t with the definition from the Linux kernel master branch. To avoid hardcoding the field access paths throughout the codebase, this patch also introduces compile-time accessors for the siginfo_t attributes, centralizing their definitions in a single location and making future updates easier. Finally, extend the testsuite to verify access to the new si_pkey field and its preservation when modifying $_siginfo and when reading core files. The tests in siginfo-obj.exp rely on the siginfo_t definition provided by glibc's , which does not yet expose all of the fields present in the kernel definition. As a result, the tests cannot exercise every newly added field and therefore focus on si_pkey, the field motivating this change. The test validates that GDB can read and modify the field correctly; it does not attempt to generate a real protection-key fault. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ tree/include/uapi/asm-generic/siginfo.h#n69 [2]: https://lore.kernel.org/all/20160212210213.ABC488FA@viggo.jf.intel.com/ Reviewed-by: Thiago Jung Bauermann --- gdb/aarch64-linux-tdep.c | 8 ++-- gdb/linux-tdep.c | 52 +++++++++++++++++++--- gdb/linux-tdep.h | 60 ++++++++++++++++++++++++++ gdb/sparc64-linux-tdep.c | 6 ++- gdb/testsuite/gdb.base/siginfo-obj.c | 1 + gdb/testsuite/gdb.base/siginfo-obj.exp | 14 ++++++ 6 files changed, 131 insertions(+), 10 deletions(-) diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index f11eccc1bc1..235b35bcfb4 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -2683,13 +2683,15 @@ aarch64_linux_report_signal_info (struct gdbarch *gdbarch, try { + using gdb_si = gdb::siginfo_type; + using si_key = gdb::siginfo_type::key; /* Sigcode tells us if the segfault is actually a memory tag violation. */ - si_code = parse_and_eval_long ("$_siginfo.si_code"); - si_errno = parse_and_eval_long ("$_siginfo.si_errno"); + si_code = parse_and_eval_long (gdb_si::get (si_key::siginfo_code)); + si_errno = parse_and_eval_long (gdb_si::get (si_key::siginfo_errno)); fault_addr - = parse_and_eval_long ("$_siginfo._sifields._sigfault.si_addr"); + = parse_and_eval_long (gdb_si::get (si_key::siginfo_addr)); } catch (const gdb_exception_error &exception) { diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index 25d625db595..740043a9292 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -272,10 +272,9 @@ static struct type * linux_get_siginfo_type (struct gdbarch *gdbarch) { struct linux_gdbarch_data *linux_gdbarch_data; - struct type *void_ptr_type; struct type *uid_type, *pid_type; struct type *sigval_type, *clock_type; - struct type *siginfo_type, *sifields_type; + struct type *siginfo_type, *sifields_type, *sigfault_union_type; struct type *type; linux_gdbarch_data = get_linux_gdbarch_data (gdbarch); @@ -285,11 +284,22 @@ linux_get_siginfo_type (struct gdbarch *gdbarch) type_allocator alloc (gdbarch); const struct builtin_type *builtin_types = builtin_type (gdbarch); + struct type *short_type = builtin_types->builtin_short; struct type *int_type = builtin_types->builtin_int; struct type *uint_type = builtin_types->builtin_unsigned_int; struct type *long_type = builtin_types->builtin_long; - - void_ptr_type = lookup_pointer_type (builtin_type (gdbarch)->builtin_void); + struct type *unsigned_long_type = builtin_types->builtin_unsigned_long; + struct type *uint32_type = builtin_types->builtin_uint32; + struct type *void_ptr_type + = lookup_pointer_type (builtin_type (gdbarch)->builtin_void); + + /* Compute padding length, i.e. __ADDR_BND_PKEY_PAD. */ + unsigned alignof_void_ptr = type_align (void_ptr_type); + unsigned padding_size = (alignof_void_ptr < short_type->length () + ? short_type->length () + : alignof_void_ptr); + struct type *addr_bnd_pkey_padding_type + = init_vector_type (builtin_types->builtin_uint8, padding_size); /* sival_t */ sigval_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_UNION); @@ -364,9 +374,41 @@ linux_get_siginfo_type (struct gdbarch *gdbarch) append_composite_type_field (type, "si_stime", clock_type); append_composite_type_field (sifields_type, "_sigchld", type); - /* _sigfault */ + /* Begin _sigfault's anonymous union. */ + sigfault_union_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_UNION); + /* used on alpha and sparc */ + append_composite_type_field (sigfault_union_type, "si_trapno", int_type); + /* used when si_code is BUS_MCEERR_AR or BUS_MCEERR_AO. */ + append_composite_type_field (sigfault_union_type, "si_addr_lsb", short_type); + + /* used when si_code=SEGV_BNDERR */ + type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT); + append_composite_type_field (type, "_dummy_bnd", addr_bnd_pkey_padding_type); + append_composite_type_field (type, "si_lower", void_ptr_type); + append_composite_type_field (type, "si_upper", void_ptr_type); + append_composite_type_field (sigfault_union_type, "_addr_bnd", type); + + /* used when si_code=SEGV_PKUERR */ + type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT); + append_composite_type_field (type, "_dummy_pkey", addr_bnd_pkey_padding_type); + append_composite_type_field (type, "si_pkey", uint32_type); + append_composite_type_field (sigfault_union_type, "_addr_pkey", type); + + /* used when si_code=TRAP_PERF */ + type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT); + append_composite_type_field (type, "si_perf_data", unsigned_long_type); + append_composite_type_field (type, "si_perf_type", uint32_type); + append_composite_type_field (type, "si_perf_flags", uint32_type); + append_composite_type_field (sigfault_union_type, "_perf", type); + + /* End _sigfault's anonymous union. */ + + /* _sigfault is set by SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT); append_composite_type_field (type, "si_addr", void_ptr_type); + /* Since there is no possibility to declare an anonymous union, + using '_anon_union' instead. */ + append_composite_type_field (type, "_anon_union", sigfault_union_type); append_composite_type_field (sifields_type, "_sigfault", type); /* _sigpoll */ diff --git a/gdb/linux-tdep.h b/gdb/linux-tdep.h index c19839fde2c..43ed38c6633 100644 --- a/gdb/linux-tdep.h +++ b/gdb/linux-tdep.h @@ -98,4 +98,64 @@ extern CORE_ADDR linux_get_hwcap2 (); extern bool linux_address_in_shadow_stack_mem_range (CORE_ADDR addr, std::pair *range); +namespace gdb { + +/* Maps each siginfo_type::key to the corresponding field-access expression + in $_siginfo. + + Keep the order of key values synchronized with the entries in get()'s + paths array. Each key is used directly as an array index. */ + +struct siginfo_type +{ + /* Identifies a field within siginfo_t that may be referenced by name. */ + enum class key + { + siginfo_signo = 0, + siginfo_errno, + siginfo_code, + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ + siginfo_addr, + siginfo_trapno, + siginfo_addr_lsb, + siginfo_lower, + siginfo_upper, + siginfo_pkey, + siginfo_perf_data, + siginfo_perf_type, + siginfo_perf_flags, + + /* Sentinel used to determine the number of mapped fields. */ + SIGINFO_ATTR_END + }; + + /* Return the $_siginfo access expression associated with ATTR_. + + ATTR_ must be a valid si_* key other than SIGINFO_ATTR_END. The array + order must exactly match the declaration order of the keys above. */ + static constexpr const char *get (key attr_) + { + const char *paths[static_cast (key::SIGINFO_ATTR_END)] = { + "$_siginfo.si_signo", + "$_siginfo.si_errno", + "$_siginfo.si_code", + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ + "$_siginfo._sifields._sigfault.si_addr", + "$_siginfo._sifields._sigfault._anon_union.si_trapno", + "$_siginfo._sifields._sigfault._anon_union.si_addr_lsb", + "$_siginfo._sifields._sigfault._anon_union._addr_bnd.si_lower", + "$_siginfo._sifields._sigfault._anon_union._addr_bnd.si_upper", + "$_siginfo._sifields._sigfault._anon_union._addr_pkey.si_pkey", + "$_siginfo._sifields._sigfault._anon_union._perf.si_perf_data", + "$_siginfo._sifields._sigfault._anon_union._perf.si_perf_type", + "$_siginfo._sifields._sigfault._anon_union._perf.si_perf_flags", + }; + return paths[static_cast (attr_)]; + } +}; + +} /* namespace gdb */ + #endif /* GDB_LINUX_TDEP_H */ diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c index cb7ce41e5cb..b6245f64bae 100644 --- a/gdb/sparc64-linux-tdep.c +++ b/gdb/sparc64-linux-tdep.c @@ -134,11 +134,13 @@ sparc64_linux_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout, try { + using gdb_si = gdb::siginfo_type; + using si_key = gdb::siginfo_type::key; /* Evaluate si_code to see if the segfault is ADI related. */ - si_code = parse_and_eval_long ("$_siginfo.si_code\n"); + si_code = parse_and_eval_long (gdb_si::get (si_key::siginfo_code)); if (si_code >= SEGV_ACCADI && si_code <= SEGV_ADIPERR) - addr = parse_and_eval_long ("$_siginfo._sifields._sigfault.si_addr"); + addr = parse_and_eval_long (gdb_si::get (si_key::siginfo_addr)); } catch (const gdb_exception_error &exception) { diff --git a/gdb/testsuite/gdb.base/siginfo-obj.c b/gdb/testsuite/gdb.base/siginfo-obj.c index 43dc979bc50..960e5b8e9cd 100644 --- a/gdb/testsuite/gdb.base/siginfo-obj.c +++ b/gdb/testsuite/gdb.base/siginfo-obj.c @@ -35,6 +35,7 @@ handler (int sig, siginfo_t *info, void *context) int ssi_signo = info->si_signo; int ssi_code = info->si_code; void *ssi_addr = info->si_addr; + unsigned int ssi_pkey = info->si_pkey; _exit (0); /* set breakpoint here */ } diff --git a/gdb/testsuite/gdb.base/siginfo-obj.exp b/gdb/testsuite/gdb.base/siginfo-obj.exp index a94bf0e33ba..5e36b334068 100644 --- a/gdb/testsuite/gdb.base/siginfo-obj.exp +++ b/gdb/testsuite/gdb.base/siginfo-obj.exp @@ -78,6 +78,14 @@ gdb_test_multiple "p \$_siginfo" "$test" { } } +set test "extract si_pkey" +gdb_test_multiple "p \$_siginfo" "$test" { + -re "si_pkey = (\[0-9\]\+).*$gdb_prompt $" { + set ssi_pkey $expect_out(1,string) + pass "$test" + } +} + set bp_location [gdb_get_line_number "set breakpoint here"] with_test_prefix "validate siginfo fields" { @@ -87,6 +95,7 @@ with_test_prefix "validate siginfo fields" { gdb_test "p ssi_errno" " = $ssi_errno" gdb_test "p ssi_code" " = $ssi_code" gdb_test "p ssi_signo" " = $ssi_signo" + gdb_test "p ssi_pkey" " = $ssi_pkey" } # Again, but this time, patch si_addr and check that the inferior sees @@ -106,6 +115,7 @@ gdb_test "p \$_siginfo._sifields._sigfault.si_addr = 0x666" " = \\(void \\*\\) 0 gdb_test "p \$_siginfo.si_errno = 666" " = 666" gdb_test "p \$_siginfo.si_code = 999" " = 999" gdb_test "p \$_siginfo.si_signo = 11" " = 11" +gdb_test "p \$_siginfo._sifields._sigfault._anon_union._addr_pkey.si_pkey = 123" " = 123" with_test_prefix "validate modified siginfo fields" { gdb_test "break $bp_location" @@ -114,6 +124,7 @@ with_test_prefix "validate modified siginfo fields" { gdb_test "p ssi_errno" " = 666" gdb_test "p ssi_code" " = 999" gdb_test "p ssi_signo" " = 11" + gdb_test "p ssi_pkey" " = 123" } # Test siginfo preservation in core files. @@ -132,4 +143,7 @@ if {$gcore_created} { gdb_test "p \$_siginfo._sifields._sigfault.si_addr" \ " = \\(void \\*\\) $ssi_addr" \ "p \$_siginfo._sifields._sigfault.si_addr from core file" + gdb_test "p \$_siginfo._sifields._sigfault._anon_union._addr_pkey.si_pkey" \ + " = $ssi_pkey" \ + "p \$_siginfo._sifields._sigfault._anon_union._addr_pkey.si_pkey from core file" } -- 2.55.0