From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8oWuGZstBmfoGwcAWB0awg (envelope-from ) for ; Wed, 09 Oct 2024 03:15:39 -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=g6WNHWHi; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=g6WNHWHi; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4E0331E356; Wed, 9 Oct 2024 03:15:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,UNPARSEABLE_RELAY,URIBL_BLOCKED, URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 1A8031E354 for ; Wed, 9 Oct 2024 03:15:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B10DF385020E for ; Wed, 9 Oct 2024 07:15:37 +0000 (GMT) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on20601.outbound.protection.outlook.com [IPv6:2a01:111:f403:260e::601]) by sourceware.org (Postfix) with ESMTPS id 880B93858D37 for ; Wed, 9 Oct 2024 07:15:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 880B93858D37 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 880B93858D37 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260e::601 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1728458118; cv=pass; b=jyH/7N9LH3TCe1cosq63yl0im0Cj4De0dfKsPPENEJABwh2rIBmtODLp1z6FZI3udFzFx8YOBp0zfniNp1aMmOprknhoJj2Mqn6XcjRLD3Q7RhxxBqoYIHYofj9HAQcwjMSmYPE4v7KKri/lfF/fxea3IBsuRxmbQpNci++nLJg= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1728458118; c=relaxed/simple; bh=55qRz/6w0wJAizSca72erdwlZ80LSCn/G7q+hX+7YQY=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=oZiIq6qduqcQOjI8ehrrfA3wiZ5UxUag5Or7MWpgyrxp+8zoZHPReSGjeR7rNhG/a1farniHnUf9rYupQTPXrMDBqs8DrgRzCjZllNWt7bLh8DtMrojLHkxMpC5Vj7y63gVxkM2O62Xm+OGgQZG4eJjKbJp348O/QR2IHhswUdk= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=gB5JNXPe/yZNwf9G868LFndaoqoXBuzGtlxDcrD9+I5wk8f/i3r5d0B3Ltq3gz77pPAJdU07kaUR1VavSOyebhuOinjnoHnqdtwlcy21pmjlSqI4Xrb4hK4aV4MxFkJArHn9QRwf+ZHjeNvBn0dPqJ/xPn0qpQTDO+KuYooxXPK7A+iq4VFUBjYGx61Ue3LJW0+hpi3VfiuljS1LoYhyosIzhdhDlMk9faRqwVZJLkWeQYHcSx7du5QODRFhAXFb/uPp/mhnmG5lVHEoObnjJ1M5sb5uT+0xxgkHHRis7dkELTMXGo7TIHwrRwx8N/UZ5zVIz2alUPN2XbIz3jFkXA== 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=paPMi4oRy+QbM6/aIGxGGnxW40cn1hzyFJgHkkml/AI=; b=JwKf2jTKso/QyjxcNva2e5aABWshSFz+aKkLX9vGY1FZI1fscE1El5D9MIFj/8AUlYKcNkBTfHGG5jvg590y5bS8KG8J9mtlCGGWlRi5g8AR6i6pLz4hl0idoOyAQmHhLJV1kd2TKGkxXGxt+qSwwgk2RivLaD5Qb2SW3VkqjpdrdZ3F76SMfuBNnutH/vwiWE2GrsOuGWRWjSK4xE9V1/eluFWvZA9wU3xEjOvjeSL159L7XjNfGc2mf6zIedrheDcePXkPfM7t7jccehg61yA45t+9HAnjPdmpRvn34DF8iXhEneNqN84Dq0NQQ1ECc6QerzSnRyzDuBloxGhw0A== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) 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] 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=paPMi4oRy+QbM6/aIGxGGnxW40cn1hzyFJgHkkml/AI=; b=g6WNHWHi0hJCzVUpRK5io5YTIKxsHVKVDm+krHjipNz0ghE2Hkb6Th+5ndD3p5qLaT+61CywhdSyb8G86NhtGyJ106jdYIPx74rRW5ByX1kaRHMQu08gIn4itFPo/9dyFel2gMmLD6CRfoVQ3Eza4+++y63bs1m9vbZzzilQlTk= Received: from AM5PR0101CA0023.eurprd01.prod.exchangelabs.com (2603:10a6:206:16::36) by AS2PR08MB8364.eurprd08.prod.outlook.com (2603:10a6:20b:547::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Wed, 9 Oct 2024 07:15:06 +0000 Received: from AM3PEPF0000A78F.eurprd04.prod.outlook.com (2603:10a6:206:16:cafe::b6) by AM5PR0101CA0023.outlook.office365.com (2603:10a6:206:16::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.17 via Frontend Transport; Wed, 9 Oct 2024 07:15:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) 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 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM3PEPF0000A78F.mail.protection.outlook.com (10.167.16.118) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8048.13 via Frontend Transport; Wed, 9 Oct 2024 07:15:05 +0000 Received: ("Tessian outbound 10d5cea79515:v473"); Wed, 09 Oct 2024 07:15:05 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0f80f284220bde51 X-TessianGatewayMetadata: w3iOCSGa7cfqqO1y4Ohjtp9OZOcAXnLuVKy+ZaNpfHSNH7DclrHHCAZHYJG3SAmWlfrMp13yddxXfEDRZALiIgI8+Cdj8mfzPO73hYK63Jw5cmtCEcYVEqf5WplM+SYoDuvPQRhyusnHwkL9NWZw9qCVi59LsHCUuTN6ZbL2CNs= X-CR-MTA-TID: 64aa7808 Received: from Lb1de13ff8853.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 786C2C34-E158-4AF4-B644-028A9A6A7CC9.1; Wed, 09 Oct 2024 07:14:58 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lb1de13ff8853.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 09 Oct 2024 07:14:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fh+1NNWG91K2cbw2Wary/pRhzSa7KeunGTMf10ZEuN+5t+/wGwO9Htht8qH5+3VORwIhQR7IgJJs3N2or/OU3o0DdCcqEdm6/Zq0lOt3Eene/2FOAg2D+n/D1HwrxFpL7xZYCOqQLwmPQTbdYglct52NCH1dOKRRtUn86+ZIiH+d61eMH+Nw6sUbrhKI+h5809L9b/ntcFtFJlz29HT8LsOx9I4UKOkGDzouCN5Rxu+PU8ZhvjuM8Wug8S3sxjceTW5c4Pyx/9A3wmFB9XDg8s5lN8wxaNZ887WABuxOSPmlt4KAas8tx68MlOtBaw3aym7NWLOxASafv2t+EN+w2A== 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=paPMi4oRy+QbM6/aIGxGGnxW40cn1hzyFJgHkkml/AI=; b=WljtvsTPsPeF9li6vwDb48UN6wDgW1B+UBf3f+NTAPW62TvXHLq+vHD4vXAVA/rh97WmG1d1MyHOCyXKWLg7LIBFIs72BuoU6I+PVnHyjukUFnQ+e5ajjOxQDG733RZ8A0yTtv77kUu98KE2+M1W5rmQZ8NHq3HRSoEJJnq9GSjTfQs8mZuh8ue7bF3vU2JDRU44OlJhC66Zv21Z0adUqv3FD7h1dH+4foJeGEgK3c1zzDFPMhLJ5k5nfMXBLzJJ2g4s+T5+kI1A1pncc8+/pMyoa6BPaN7Rm41GxByDBlkSEfTPlxOfmdFsuC1fa3RxGNGAC87EdwrWeWgXsnqZBw== 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=paPMi4oRy+QbM6/aIGxGGnxW40cn1hzyFJgHkkml/AI=; b=g6WNHWHi0hJCzVUpRK5io5YTIKxsHVKVDm+krHjipNz0ghE2Hkb6Th+5ndD3p5qLaT+61CywhdSyb8G86NhtGyJ106jdYIPx74rRW5ByX1kaRHMQu08gIn4itFPo/9dyFel2gMmLD6CRfoVQ3Eza4+++y63bs1m9vbZzzilQlTk= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PR3PR08MB5852.eurprd08.prod.outlook.com (2603:10a6:102:8e::21) by DU4PR08MB11186.eurprd08.prod.outlook.com (2603:10a6:10:577::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Wed, 9 Oct 2024 07:14:54 +0000 Received: from PR3PR08MB5852.eurprd08.prod.outlook.com ([fe80::f44:d113:1c29:825d]) by PR3PR08MB5852.eurprd08.prod.outlook.com ([fe80::f44:d113:1c29:825d%5]) with mapi id 15.20.8026.017; Wed, 9 Oct 2024 07:14:54 +0000 Message-ID: Date: Wed, 9 Oct 2024 08:14:52 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/5] gdbserver: pass osabi to GDB in target description Content-Language: en-US To: Andrew Burgess , gdb-patches@sourceware.org References: <77fa25e6f6fd213f89ebceb7c1fcf33010cc8e39.1728407374.git.aburgess@redhat.com> From: Luis Machado In-Reply-To: <77fa25e6f6fd213f89ebceb7c1fcf33010cc8e39.1728407374.git.aburgess@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0395.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:f::23) To PR3PR08MB5852.eurprd08.prod.outlook.com (2603:10a6:102:8e::21) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PR3PR08MB5852:EE_|DU4PR08MB11186:EE_|AM3PEPF0000A78F:EE_|AS2PR08MB8364:EE_ X-MS-Office365-Filtering-Correlation-Id: 70e71391-3f61-4411-4f60-08dce83219b3 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|366016|1800799024; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?B?aUVkMjMwcWl5dHdEYlBDdVdpZyt2bEl4R0MyUDZYUVBuU2RLN1B1WjVVWVdT?= =?utf-8?B?M2V1RW5oVUJvZ1VnTkFadHdEWFZLZEhSUFZtcmxCdHBHS3pUQ3JPeHBsVXlo?= =?utf-8?B?cHBYNUNLUXM4Q1FJVndGOW5FU3dvMUNoS254TTk4NWdWcEc4WGtBdkdBMmhX?= =?utf-8?B?c0hZU0E0QmJuZWZVZ2xzRXdEOHhzeXNVL3pmUWg5amVkVDBuL0I1SzdqMm50?= =?utf-8?B?MWowMUhEdTFaRnRQSzNNWHl1NFhUaEVIdUVvTmY3SGN1a1pIZDQzTnM1TTAx?= =?utf-8?B?NUlhb3RzNm1nNFI4bExkWWE0NWpaVFNNZ21YcXBvdG1yR290ZWg3WDQyaEc2?= =?utf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SXZPbFIwdkdNb1IzZU93Mjh2UnUz?= =?utf-8?B?V2EzN2w4SStMd2FtWFNwTXh1SnZjTngwbVFoakt2ZXNTeXpJQ3pqTHE2WDRW?= =?utf-8?B?QWFEVHBzMnZkUjZqZlhGNlBJekkyOXFtbGYzcHFLUUZwNWtaaExKa25ucEE0?= =?utf-8?B?ZFpJdGdjWGNLNEpyL0NzTzljK001Nkp1bm9wbzgxbmtDSjFjdDNvVzJxa3hM?= =?utf-8?B?RUdvTmNmb2NidFRJcXdLS2xIWWs0alFORnZpQlBGdGtUMFR4ZXNRNFN0ZHRw?= =?utf-8?B?LytFQ3Qyb25NYUg4dUR1RVdHeUFHem4weUJrMU9Ea1hUNnZab1VvdGRZcFdX?= =?utf-8?B?TkNTenZ1VmtRZlhTQXB0NHl1V1FGVHlSZGJOWkZwOGp4U05BcjZNb2JmVy9l?= =?utf-8?B?MFI0Rk1naFU2RllDNndseFM2YXFhQ2xpTnQxRndyZU4vZ2dJOW9CbEFUbSt4?= =?utf-8?B?dzE1U2htUDdPc2lVK2ZlYkkydDB5UVNPL056VVhlNkVEZHJGOWpWcDl3PT0=?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR3PR08MB5852.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR08MB11186 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:8e::21]; domain=PR3PR08MB5852.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF0000A78F.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 636157f1-a7dc-4770-4745-08dce8321305 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|1800799024|35042699022|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OEU3U1VEMW1iZTNGZTVQcis4TC9RN1ZkRHN1Q0V1SVM2TjlpSXU3TFRzNWlG?= =?utf-8?B?YU0yQXhOV3IrVGd0L29vamYyZUJBK0M1V0VxQzNKRFB3YjlDTzNRVlRkU3hH?= =?utf-8?B?anRPQ25NMlE2M1JkME9KRzQzWnhqcVZDSjN2cHNMQ09LM2lPbnhvb0NYVnYr?= =?utf-8?B?YWhvamgwZ2h3b3VJMk5iM1h0NWZiWWxFZGc3VFVvb1cwSkplV0R0b1BVTSs4?= =?utf-8?B?NG43OVBxQ0hhZjFZcW0wN0NsRFM4WThQTVdDTVBaQjBubnpLazhCZDZKSm9a?= =?utf-8?B?enFlcGExa1VsZnFCVU11bmJ4YlRwdENyVUx6Vm8yTDh1eWFmWDhDOGhTY0Vn?= =?utf-8?B?czEzVDM0eEJYTm0veDJWQmlOVmh1bHd1bndxQ3M0OUlkcHUza1p0N01Pb2Yy?= =?utf-8?B?aFdCcnh6eUFjYWV5clpUeTNZRmlHUGpVR1VRUEQxZHFVWm82cmlOYmxvS1RL?= =?utf-8?B?Qjl4aDBDZkJ6Q2o1UXZXbFRtOUxZQXFVamFwdDZTbWlKVkNXcTJlM3lMQzlj?= =?utf-8?B?V2xIUnA1ckZ5NlBRMHE1b3V1RnRjeWJEVzZ1M05DQ0ZsUVdDQWpPdkNqekQ3?= =?utf-8?B?Tm40cU5Ga2F4aFY5aTM1WmFnb1c1b3dRTEZpZmVsbjBNNzBJT3dEMWpDVWps?= =?utf-8?B?aUZvbnJPZytaSTNXejJXZXJ3cjBiMENzTzk2MXA3NU9CUkE1YmJYWlo5cmJM?= =?utf-8?B?VEJ2OVkzUGRnam9GUkZGbnM4UmlrTU5FcnRIbFptRUYwSjNsSnZSQllML1U3?= =?utf-8?B?dDZaVzlTbEVEZCtsOHp0UWdhZE80bm1XN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4V29Majk0NnNKUm5ybGhtYk9EY0Y0NjVubmZUODIw?= =?utf-8?B?TG9KeFVFVHpBdWtPME16SGhSbWRCNUVhS256RUUvOGljRThJdjZLb2FwMkI0?= =?utf-8?B?ZDAvbWpxNzIvVVdxNHJHYURtRkI2TzR4VFg3a1RPL1VtMEZYRWQ5TlVZRzVL?= =?utf-8?Q?BB5fkIshjjFiO?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(376014)(82310400026)(1800799024)(35042699022)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2024 07:15:05.6177 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70e71391-3f61-4411-4f60-08dce83219b3 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM3PEPF0000A78F.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8364 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 10/8/24 18:11, Andrew Burgess wrote: > On a Windows machine I built gdbserver, configured for the target > 'x86_64-w64-mingw32', then on a GNU/Linux machine I built GDB with > support for all target (--enable-targets=all). > > On the Windows machine I start gdbserver with a small test binary: > > $ gdbserver 192.168.129.25:54321 C:\some\directory\executable.exe > > On the GNU/Linux machine I start GDB without the test binary, and > connect to gdbserver. > > As I have not given GDB the test binary, my expectation is that GDB > would connect to gdbserver and then download the file over the remote > protocol, but instead I was presented with this message: > > (gdb) target remote 192.168.129.25:54321 > Remote debugging using 192.168.129.25:54321 > warning: C:\some\directory\executable.exe: No such file or directory. > 0x00007ffa3e1e1741 in ?? () > (gdb) > > What I found is that if I told GDB where to find the binary, like > this: > > (gdb) file target:C:/some/directory/executable.exe > A program is being debugged already. > Are you sure you want to change the file? (y or n) y > Reading C:/some/directory/executable.exe from remote target... > warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead. > Reading C:/some/directory/executable.exe from remote target... > Reading symbols from target:C:/some/directory/executable.exe... > (gdb) > > then GDB would download the executable. > > I eventually tracked the problem down to exec_file_find (solib.c). > The remote target was passing an absolute Windows filename (beginning > with "C:/" in this case), but in exec_file_find GDB was failing the > IS_TARGET_ABSOLUTE_PATH call, and so was treating the filename as > relative. > > The IS_TARGET_ABSOLUTE_PATH call was failing because GDB thought that > the file system kind was "unix", and as the filename didn't start with > a "/" it assumed the filename was not absolute. > > But I'm connecting to a Windows target, my 'target-file-system-kind' > was set to "auto", so should be figuring out that my file-system is > "dos-based". > > Looking in effective_target_file_system_kind (filesystem.c), we find > that the logic of "auto" is delegated to the current gdbarch. However > in windows-tdep.c we see: > > set_gdbarch_has_dos_based_file_system (gdbarch, 1); > > So if we are using a Windows gdbarch we should have "dos-based" > filesystems. What this means is that after connecting to the remote > target GDB has selected the wrong gdbarch. > > What's happening is that the target description sent back by the > remote target only includes the x86-64 registers. There's no > information about which OS we're on. As a consequence, GDB picks the > first x86-64 gdbarch which can handle the provided register set, which > happens to be a GNU/Linux gdbarch. > > And indeed, there doesn't appear to be anywhere in gdbserver that sets > the osabi on the target descriptions, though some target descriptions > do have their osabi set when the description is created, e.g. in: > > gdb/arch/amd64.c - Sets GNU/Linux osabi when appropriate. > gdb/arch/i386.c - Likewise. > gdb/arch/tic6x.c - Always set GNU/Linux osabi. > > Most target descriptions are created without an osabi, gdbserver does > nothing to fix this, and the description is returned to GDB without an > osabi included. > > I propose that we always set the osabi name on the target descriptions > returned from gdbserver. We could try to do this when the description > is first created, but that would mean passing extra flags into the > tdesc creation code (or just passing the osabi string in), and I don't > think that's really necessary. If we consider the tdesc creation as > being about figuring out which registers are on the target, then it > makes sense that the osabi information is injected later. > > So what I've done is require the osabi name to be passed to the > init_target_desc function. This is called, I believe, for all > targets, in the gdbserver code. > > Now when I connect to the Windows remote the target description > returned includes the osabi name. With this extra information GDB > selects the correct gdbarch object, which means that GDB understands > the target has a "dos-based" file-system. With that correct GDB > understands that the filename it was given is absolute, and so fetches > the file from the remote as we'd like. > --- > gdbserver/linux-aarch32-tdesc.cc | 2 +- > gdbserver/linux-aarch64-tdesc.cc | 3 ++- > gdbserver/linux-arc-low.cc | 2 +- > gdbserver/linux-arm-tdesc.cc | 2 +- > gdbserver/linux-csky-low.cc | 2 +- > gdbserver/linux-loongarch-low.cc | 2 +- > gdbserver/linux-riscv-low.cc | 2 +- > gdbserver/linux-tic6x-low.cc | 2 +- > gdbserver/linux-x86-tdesc.cc | 15 +++++++++++++-- > gdbserver/netbsd-aarch64-low.cc | 2 +- > gdbserver/netbsd-amd64-low.cc | 2 +- > gdbserver/netbsd-i386-low.cc | 2 +- > gdbserver/tdesc.cc | 5 ++++- > gdbserver/tdesc.h | 5 +++-- > gdbserver/win32-i386-low.cc | 4 ++-- > gdbserver/win32-low.h | 7 +++++++ > 16 files changed, 41 insertions(+), 18 deletions(-) > > diff --git a/gdbserver/linux-aarch32-tdesc.cc b/gdbserver/linux-aarch32-tdesc.cc > index b8987752b9f..441fe668e6a 100644 > --- a/gdbserver/linux-aarch32-tdesc.cc > +++ b/gdbserver/linux-aarch32-tdesc.cc > @@ -34,7 +34,7 @@ aarch32_linux_read_description () > tdesc_aarch32 = aarch32_create_target_description (false); > > static const char *expedite_regs[] = { "r11", "sp", "pc", 0 }; > - init_target_desc (tdesc_aarch32, expedite_regs); > + init_target_desc (tdesc_aarch32, expedite_regs, GDB_OSABI_LINUX); > } > return tdesc_aarch32; > } > diff --git a/gdbserver/linux-aarch64-tdesc.cc b/gdbserver/linux-aarch64-tdesc.cc > index 31ec7854cc0..39d5bccdce1 100644 > --- a/gdbserver/linux-aarch64-tdesc.cc > +++ b/gdbserver/linux-aarch64-tdesc.cc > @@ -67,7 +67,8 @@ aarch64_linux_read_description (const aarch64_features &features) > > expedited_registers.push_back (nullptr); > > - init_target_desc (tdesc, (const char **) expedited_registers.data ()); > + init_target_desc (tdesc, (const char **) expedited_registers.data (), > + GDB_OSABI_LINUX); > > tdesc_aarch64_map[features] = tdesc; > } > diff --git a/gdbserver/linux-arc-low.cc b/gdbserver/linux-arc-low.cc > index dda224f0a74..798c535aee8 100644 > --- a/gdbserver/linux-arc-low.cc > +++ b/gdbserver/linux-arc-low.cc > @@ -114,7 +114,7 @@ arc_linux_read_description (void) > target_desc_up tdesc = arc_create_target_description (features); > > static const char *expedite_regs[] = { "sp", "status32", nullptr }; > - init_target_desc (tdesc.get (), expedite_regs); > + init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX); > > return tdesc.release (); > } > diff --git a/gdbserver/linux-arm-tdesc.cc b/gdbserver/linux-arm-tdesc.cc > index 559f9b0f3dc..fff2e948f81 100644 > --- a/gdbserver/linux-arm-tdesc.cc > +++ b/gdbserver/linux-arm-tdesc.cc > @@ -37,7 +37,7 @@ arm_linux_read_description (arm_fp_type fp_type) > tdesc = arm_create_target_description (fp_type, false); > > static const char *expedite_regs[] = { "r11", "sp", "pc", 0 }; > - init_target_desc (tdesc, expedite_regs); > + init_target_desc (tdesc, expedite_regs, GDB_OSABI_LINUX); > > tdesc_arm_list[fp_type] = tdesc; > } > diff --git a/gdbserver/linux-csky-low.cc b/gdbserver/linux-csky-low.cc > index 2eb5a2df17b..18a0d152b5a 100644 > --- a/gdbserver/linux-csky-low.cc > +++ b/gdbserver/linux-csky-low.cc > @@ -133,7 +133,7 @@ csky_target::low_arch_setup () > > if (tdesc->expedite_regs.empty ()) > { > - init_target_desc (tdesc.get (), expedite_regs); > + init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX); > gdb_assert (!tdesc->expedite_regs.empty ()); > } > > diff --git a/gdbserver/linux-loongarch-low.cc b/gdbserver/linux-loongarch-low.cc > index 584ea64a7d9..cf7d6c0743c 100644 > --- a/gdbserver/linux-loongarch-low.cc > +++ b/gdbserver/linux-loongarch-low.cc > @@ -85,7 +85,7 @@ loongarch_target::low_arch_setup () > > if (tdesc->expedite_regs.empty ()) > { > - init_target_desc (tdesc.get (), expedite_regs); > + init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX); > gdb_assert (!tdesc->expedite_regs.empty ()); > } > current_process ()->tdesc = tdesc.release (); > diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc > index c4554c507a8..7170ad9922e 100644 > --- a/gdbserver/linux-riscv-low.cc > +++ b/gdbserver/linux-riscv-low.cc > @@ -91,7 +91,7 @@ riscv_target::low_arch_setup () > > if (tdesc->expedite_regs.empty ()) > { > - init_target_desc (tdesc.get (), expedite_regs); > + init_target_desc (tdesc.get (), expedite_regs, GDB_OSABI_LINUX); > gdb_assert (!tdesc->expedite_regs.empty ()); > } > > diff --git a/gdbserver/linux-tic6x-low.cc b/gdbserver/linux-tic6x-low.cc > index 707be2e7b0f..754dd00590c 100644 > --- a/gdbserver/linux-tic6x-low.cc > +++ b/gdbserver/linux-tic6x-low.cc > @@ -228,7 +228,7 @@ tic6x_read_description (enum c6x_feature feature) > { > *tdesc = tic6x_create_target_description (feature); > static const char *expedite_regs[] = { "A15", "PC", NULL }; > - init_target_desc (*tdesc, expedite_regs); > + init_target_desc (*tdesc, expedite_regs, GDB_OSABI_LINUX); > } > > return *tdesc; > diff --git a/gdbserver/linux-x86-tdesc.cc b/gdbserver/linux-x86-tdesc.cc > index 13c80762605..6aa5c4ab970 100644 > --- a/gdbserver/linux-x86-tdesc.cc > +++ b/gdbserver/linux-x86-tdesc.cc > @@ -26,10 +26,21 @@ > void > x86_linux_post_init_tdesc (target_desc *tdesc, bool is_64bit) > { > + enum gdb_osabi osabi = GDB_OSABI_LINUX; > + > +#ifndef IN_PROCESS_AGENT > + /* x86 target descriptions are created with the osabi already set. > + However, init_target_desc requires us to override the already set > + value. That's fine, out new string should match the old one. */ > + gdb_assert (tdesc_osabi_name (tdesc) != nullptr); > + gdb_assert (strcmp (tdesc_osabi_name (tdesc), > + gdbarch_osabi_name (osabi)) == 0); > +#endif /* ! IN_PROCESS_AGENT */ > + > #ifdef __x86_64__ > if (is_64bit) > - init_target_desc (tdesc, amd64_expedite_regs); > + init_target_desc (tdesc, amd64_expedite_regs, osabi); > else > #endif > - init_target_desc (tdesc, i386_expedite_regs); > + init_target_desc (tdesc, i386_expedite_regs, osabi); > } > diff --git a/gdbserver/netbsd-aarch64-low.cc b/gdbserver/netbsd-aarch64-low.cc > index f20a1a71773..8834e0ad894 100644 > --- a/gdbserver/netbsd-aarch64-low.cc > +++ b/gdbserver/netbsd-aarch64-low.cc > @@ -98,7 +98,7 @@ netbsd_aarch64_target::low_arch_setup () > = aarch64_create_target_description ({}); > > static const char *expedite_regs_aarch64[] = { "x29", "sp", "pc", NULL }; > - init_target_desc (tdesc, expedite_regs_aarch64); > + init_target_desc (tdesc, expedite_regs_aarch64, GDB_OSABI_NETBSD); > > current_process ()->tdesc = tdesc; > } > diff --git a/gdbserver/netbsd-amd64-low.cc b/gdbserver/netbsd-amd64-low.cc > index b3f3aab5ec3..ad7cb430b92 100644 > --- a/gdbserver/netbsd-amd64-low.cc > +++ b/gdbserver/netbsd-amd64-low.cc > @@ -193,7 +193,7 @@ netbsd_amd64_target::low_arch_setup () > target_desc *tdesc > = amd64_create_target_description (X86_XSTATE_SSE_MASK, false, false, false); > > - init_target_desc (tdesc, amd64_expedite_regs); > + init_target_desc (tdesc, amd64_expedite_regs, GDB_OSABI_NETBSD); > > current_process ()->tdesc = tdesc; > } > diff --git a/gdbserver/netbsd-i386-low.cc b/gdbserver/netbsd-i386-low.cc > index 247a39797c4..ea6fce4c6f9 100644 > --- a/gdbserver/netbsd-i386-low.cc > +++ b/gdbserver/netbsd-i386-low.cc > @@ -142,7 +142,7 @@ netbsd_i386_target::low_arch_setup () > target_desc *tdesc > = i386_create_target_description (X86_XSTATE_SSE_MASK, false, false); > > - init_target_desc (tdesc, i386_expedite_regs); > + init_target_desc (tdesc, i386_expedite_regs, GDB_OSABI_NETBSD); > > current_process ()->tdesc = tdesc; > } > diff --git a/gdbserver/tdesc.cc b/gdbserver/tdesc.cc > index d052f43c76e..da1287abbbe 100644 > --- a/gdbserver/tdesc.cc > +++ b/gdbserver/tdesc.cc > @@ -53,7 +53,8 @@ void target_desc::accept (tdesc_element_visitor &v) const > > void > init_target_desc (struct target_desc *tdesc, > - const char **expedite_regs) > + const char **expedite_regs, > + enum gdb_osabi osabi) > { > int offset = 0; > > @@ -88,6 +89,8 @@ init_target_desc (struct target_desc *tdesc, > int expedite_count = 0; > while (expedite_regs[expedite_count] != nullptr) > tdesc->expedite_regs.push_back (expedite_regs[expedite_count++]); > + > + set_tdesc_osabi (tdesc, osabi); > #endif > } > > diff --git a/gdbserver/tdesc.h b/gdbserver/tdesc.h > index 6fc37d038bc..80d9a9bebcb 100644 > --- a/gdbserver/tdesc.h > +++ b/gdbserver/tdesc.h > @@ -81,10 +81,11 @@ void copy_target_description (struct target_desc *dest, > const struct target_desc *src); > > /* Initialize TDESC, and then set its expedite_regs field to > - EXPEDITE_REGS. */ > + EXPEDITE_REGS. The osabi of TDESC is set to OSABI. */ > > void init_target_desc (struct target_desc *tdesc, > - const char **expedite_regs); > + const char **expedite_regs, > + enum gdb_osabi osabi); > > /* Return the current inferior's target description. Never returns > NULL. */ > diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc > index 0a761ca58ef..13f9aca99b1 100644 > --- a/gdbserver/win32-i386-low.cc > +++ b/gdbserver/win32-i386-low.cc > @@ -596,12 +596,12 @@ i386_arch_setup (void) > #ifdef __x86_64__ > tdesc = amd64_create_target_description (X86_XSTATE_SSE_MASK, false, > false, false); > - init_target_desc (tdesc, amd64_expedite_regs); > + init_target_desc (tdesc, amd64_expedite_regs, WINDOWS_OSABI); > win32_tdesc = tdesc; > #endif > > tdesc = i386_create_target_description (X86_XSTATE_SSE_MASK, false, false); > - init_target_desc (tdesc, i386_expedite_regs); > + init_target_desc (tdesc, i386_expedite_regs, WINDOWS_OSABI); > #ifdef __x86_64__ > wow64_win32_tdesc = tdesc; > #else > diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h > index ff997df0a66..e0a09674518 100644 > --- a/gdbserver/win32-low.h > +++ b/gdbserver/win32-low.h > @@ -21,6 +21,7 @@ > > #include > #include "nat/windows-nat.h" > +#include "gdbsupport/osabi-common.h" > > struct target_desc; > > @@ -31,6 +32,12 @@ extern const struct target_desc *win32_tdesc; > extern const struct target_desc *wow64_win32_tdesc; > #endif > > +#ifdef __CYGWIN__ > +constexpr enum gdb_osabi WINDOWS_OSABI = GDB_OSABI_CYGWIN; > +#else > +constexpr enum gdb_osabi WINDOWS_OSABI = GDB_OSABI_WINDOWS; > +#endif > + > struct win32_target_ops > { > /* Architecture-specific setup. */ Looks good to me. Approved-By: Luis Machado