From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2079.outbound.protection.outlook.com [40.107.20.79]) by sourceware.org (Postfix) with ESMTPS id 4E598383D833 for ; Wed, 8 Jun 2022 07:54:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4E598383D833 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=CYCTuK8yL/l7lpWMUO8gzVAQhUQQUnSDkF4zN4AkbefXR0+sPUFJSShxumvUzNN+TYA+ARobgi/7x429Hmn1VWftBGIbK7hl7AJKE/e1A9gf3ZBwXtly83/XuN27gHYNbBKIpcFSCdWz31hGwMb/MXBjMikYXsTFWJ48rgzLf0OmTM9WqPx/lZHdMkATPMsXnOwPxuA6iDYsBL8bJXgA/YQr+qVMK2CHUNpo6D5/izXXNJCRp6XcNKFjk278sg8kPjGKf3WK2Io27FDusvMWNiuGgDBsnc32+oHM94930bJuFL79l2ITZ1E72fXlfoD+fuYo48vPIDP42jaP8S65tg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=dpH9wzcbY6qOMrnUSzfs4KiGSEAy+PBPnRac9+mkUmU=; b=g3wC/Inp0zSEvZrrOgjXKv9pvSiCxeTyzzDzare/zHPIgR6fNok8AIrKwgy+4bF0HQbgmcDyXFp/jm1zY/aF0gTAc4zgDLMx4Utat8aQ1HjChvqWjXz1JDKGa1+Fh74ITIdXFks3lvG3SWhQwBmWFhagurY9xGj5+SRRewkokBIoVf8UPh+tsJAbiEbd25Tb/oaCozV+L+DsdTOhcxOk1Vi9+JwHay/o8nOy/iOM/luCID85W96bfhh6GNQgQdz04/Wz+sv7U2Z8jWNaJSvx7SK4LNwAY/tBIt1miyStKiyNw3ty5s0JFTfrr02rdhFztPErhnEmijU7xwX5IeFtig== 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=armh.onmicrosoft.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]) Received: from AM6PR10CA0032.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:89::45) by VI1PR0801MB1776.eurprd08.prod.outlook.com (2603:10a6:800:5b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Wed, 8 Jun 2022 07:54:38 +0000 Received: from AM5EUR03FT041.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:89:cafe::2) by AM6PR10CA0032.outlook.office365.com (2603:10a6:209:89::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13 via Frontend Transport; Wed, 8 Jun 2022 07:54:38 +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=armh.onmicrosoft.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 AM5EUR03FT041.mail.protection.outlook.com (10.152.17.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.12 via Frontend Transport; Wed, 8 Jun 2022 07:54:37 +0000 Received: ("Tessian outbound 6f53897bcd4e:v120"); Wed, 08 Jun 2022 07:54:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 417d34244833aee6 X-CR-MTA-TID: 64aa7808 Received: from ed5c94954d9c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F51EA5EA-042B-4DA6-8D2D-D45712E6673A.1; Wed, 08 Jun 2022 07:54:30 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ed5c94954d9c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jun 2022 07:54:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QH0qpctDxhlNqgRLt7HoUwzvt0Tg9DAcujIMCqGQSGeWBZH0IRmGwm8UPSjJagJmjBFf/D7E9/ofuWc6iSIrgca2A0pL1x8/F3UNfpibOBq73dNEWLT9U/Nm9JSc7rhYnJucYwPpk949lqbykqjyPdVPYOFRrcXm3LGG+L2hSp9JVrr31cmvr76lFe5tZzPKVard219liMskq/ttbkn9k8m25+nlYLlX5Zu+daQu8aDQFovo0xCOmKxsVRiMG3wh2bRi6srOtzNspjy9LO/equvdEYiNSoKAQ3nbBjxbbuX9Ve2rtYEDn8mYK5U/CexQbJiSw+notqKPs3EZgZnIEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=dpH9wzcbY6qOMrnUSzfs4KiGSEAy+PBPnRac9+mkUmU=; b=LBeewOKYn1f0uG39vHOlRVLQgoC1pqjSQ65LcCZ28khK7eocQ//Ei9IZkSTZXgF/u7xNERLfbElePe6/i8M25Hfhd9MKoYzbKraoAgozMi1PgAy3J6PL5eq+NKvNrytxDRfvohisAW/jLv73MSJtCGwxb2NQcumVWI0pOmKBAtAPXRAgxHtSVjZ6gd0Uw1OjpoFJaVISGD1CTfdxeX5we9P2GEeKqo3v9GnIK5PKdvWOfM6Jq3dKW8hebQwxZ1SkVdhHkeEEx8iINWsW6nFDN00iJg/MrK3dmM4zB+SxU6HiDlrGCzTDJwKMMahd6bOs6FCTA0ManBFGn4ndvDdtyQ== 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 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by VI1PR08MB4400.eurprd08.prod.outlook.com (2603:10a6:803:f8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Wed, 8 Jun 2022 07:54:28 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::9545:ff73:df89:3e50]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::9545:ff73:df89:3e50%7]) with mapi id 15.20.5314.019; Wed, 8 Jun 2022 07:54:28 +0000 Message-ID: <9c711ccb-a558-8225-524b-5a1fa93fcee9@arm.com> Date: Wed, 8 Jun 2022 08:54:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 5/5] gdb: native target invalid architecture detection Content-Language: en-US To: Pedro Alves , Andrew Burgess , John Baldwin , gdb-patches@sourceware.org References: <71a986a5-2cfa-543e-4034-70f3af7dfecf@FreeBSD.org> <87ee09d4rt.fsf@redhat.com> <09afe250-9573-45e1-993b-a2f911f03630@arm.com> <87ilpdhn73.fsf@redhat.com> <87ee01hed4.fsf@redhat.com> <12c3913e-186d-b676-fe52-cc3322b00926@arm.com> <5c316bab-c2d3-309e-f938-7480e861b444@palves.net> From: Luis Machado In-Reply-To: <5c316bab-c2d3-309e-f938-7480e861b444@palves.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0229.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a6::18) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 868a29b3-9c9b-408a-e3c5-08da492422e6 X-MS-TrafficTypeDiagnostic: VI1PR08MB4400:EE_|AM5EUR03FT041:EE_|VI1PR0801MB1776:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: yOvW0GfW3MUa8MryauTu7mxe0qhKmYOtUd+vLpEttxfzs5g2x5xj6vhmFVVtF7bc96VMqwej5uNhVjmMRA0uutjjYlOn/DpLr4WsKodWMpzNWWOfDZBemgh45uZ867V31bm7pladDiZ7q/yAA2ntPW2PIt70HGQQfu00YiRRygXYIdAxEKluqmy5zG6ajxn4FIs391zdxZhcU4ginEjaZjhzcqyz8Dh+A+aIM3xMlmninT+GGp+DIiOCMwT+a+wSyn7F8G5O1JvK7+bFZQyXvIe10iU51Qv2+cINM7ljuxPdAFpBqeXbHNsJD5Ok/FsHb03/3JV2OoF46f8zt5WlWemOj3pEbTZkQ+0MykPBU7VVNAtlCp9GKo/7E8D7+ZZAsjS7EgluwQ+Mf5dZ8NE8va+q7ROfRnXe+8FuYU3+oNmKhPHtjYX7VdQ+/6+j/Yycff98PTl6e7/AHEAGUnepGuFAgH56FQHSjxpNGXBlRYBpudTF7Si6/W3DdjljxyRlxG8fXS5hsKf7Zp8qOqvosLDPAbSNE+7unFDTAQaY0y0u+rPuUfDoAhXP9DPgE0q7/3mNLjVwLjIKsNHf1rgeIBE/e6CwQsmRmLVfhFimS3ydnfPZlvWayCSktBU6MwhqdTnf+V0thCXHrobLgVSzLGV+8PH/1hRXblDV4PO/NTUJ0djbURO7fVVNZpa1Q2akzGSBf2WmAbSJrgBNf91Gy3qPExNtipTx6jhjs1lmoz1t69CKyHlQ+lGFgtOK16b1CdX1B65FsAzolgJeaG2X5W9QPNHo5JsefwZJZocePBwP+xtrBxAjW9VpUMv/aL8K X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB3919.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(26005)(6512007)(31696002)(53546011)(2906002)(66946007)(66556008)(66476007)(8676002)(38100700002)(44832011)(6486002)(8936002)(5660300002)(508600001)(86362001)(84970400001)(6506007)(316002)(31686004)(83380400001)(186003)(36756003)(2616005)(110136005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4400 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-Transport-CrossTenantHeadersStripped: AM5EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 181e0397-6e45-4b44-eb2d-08da49241ce8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /NRnTmnGzQI5I1WHbe/84nZEwod9beaeLKluSqTpLmgV2RtPfVMdS4td7fydO2lVu/tujqzEYrQyIImj+iaNEZvEDvjHgPD0UCnpYXUUE2WgWoNF552QM1tk7QNAFkG0CE9TlxwI1AVfEuGiB46i/YNmVRrWYLUXPpkWgY+mBvP3ZvTA4kdW5TDuGjk50/nO/ZVS4UqlhDe4T6BNiBEdnqBudNAqcELIjCdeaRu8Q1OQkCaq+XqWOFeK3PXFanhK4902mGe1YeHuP5/cuy5lNaoo0o0GNEuf6X9D82T03Vxoj2AOgOC/FoGjzxTJVkHq6ZgP9OSI7iRfuQ1lSzCQQvSOkQyVrHEEkuOVh5V4EYxBrDLvjCbsgSqDozj1G6JjSS9Xvr1ZsYIhPPzJQ6ocvuQKbR3NpZcCLpUy9i1TRTBB/XIn8SobNzQ56qVcS/2mRpDkTrJf9tWN+5k7x5tS8qKFOaG1d+GN+NiMhFCo8vdTng9RHs+qT28T4Phqm/bKllOHQgHX5QQzai0NQXj+REidVTQwSZmjNMHJqx24BaChWPs5WhhyWxRRSKZ4bfjs7Kxd3NV297FPFSBn0bRxEPvUI/DV2G2nq8uZhUOSBnccCHVTGh9gGFzvZEuERF8+3iceN3uxgbHghAHlsLlZ0MWJzjW4L8F1XWVCip6s3VYyWiv7zUpfCm5BXdhJ6J7KPrjEGOwYDxdgJfwhdd0FL0h8uevxTHdfhW74yh9Dtfa5Bo5ZdI1IQlTFw5WtFqqL0BCn+wF1D7x+q1YUpPE0of0ZKEnz1CUH67EZpocB1u0= 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:(13230001)(4636009)(40470700004)(36840700001)(46966006)(47076005)(186003)(2616005)(70206006)(86362001)(5660300002)(8936002)(110136005)(6512007)(6506007)(26005)(508600001)(336012)(84970400001)(36756003)(31686004)(53546011)(83380400001)(82310400005)(6486002)(70586007)(81166007)(356005)(44832011)(31696002)(36860700001)(316002)(8676002)(40460700003)(2906002)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2022 07:54:37.8928 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 868a29b3-9c9b-408a-e3c5-08da492422e6 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: AM5EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1776 X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, KAM_DMARC_NONE, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2022 07:54:44 -0000 On 6/7/22 19:42, Pedro Alves wrote: > On 2022-06-07 12:03, Luis Machado via Gdb-patches wrote: > >> Yeah, sorry for the poor experience. I can confirm your procedure is >> correct, and that you built GDB correctly. Unfortunately this part of >> the AArch64 port seems to have rotted away given it is a less common >> execution scenario. > > This is actually covered by the testsuite, since: > > ~~~~~ > commit 71be1fdc3655a170f4b14d795e5c9e81fcea06ef > Author: Yao Qi > AuthorDate: Tue Jul 7 16:58:19 2015 +0100 > Commit: Yao Qi > CommitDate: Tue Jul 7 16:58:19 2015 +0100 > > Adjust gdb.multi tests for aarch64 > > Multi-arch related tests under gdb.multi are to compile programs with > the same compiler but different compiler options (-m64 vs -m32). However, > different compilers are needed to compile both aarch64 program and > arm (aarch32) program. This patch is to adjust these test cases to > compile programs in different modes with different compiler. > > When we use gcc for arm-linux target, its file name can be different, > arm-linux-gnueabihf-gcc, arm-linux-gnueabi-gcc, or arm-none-linux-gnueabi-gcc, > so I add a variable ARM_CC_FOR_TARGET, so that user can set the name > of gcc for arm-linux target on aarch64, like: > > $ make check RUNTESTFLAGS='ARM_CC_FOR_TARGET=arm-linux-gnueabihf-gcc multi-arch.exp' > > gdb/testsuite: > > 2015-07-07 Yao Qi > > * gdb.multi/multi-arch-exec.exp: Set march1 and march2 to "" if target > is aarch64. If target is aarch64, set compiler=${ARM_CC_FOR_TARGET} > if it exists. > * gdb.multi/multi-arch.exp: Likewise. > > ~~~~~ > > I guess the issue is that nobody ever remembers to set ARM_CC_FOR_TARGET, or even > knows about it. Yeah. As a general comment, I always have to stop and think about the list of things that need to be installed in order for GDB's testsuite to run all/most of the tests. If you're missing something, most of the time things show up as UNTESTED/UNSUPPORTED. It would be nice to have a stable list of things we need to have complete (as much as possible) testsuite coverage. Having to set these options by hand is quite obscure as well. > > IWBN if the aarch64 bots people have access to tested with ARM_CC_FOR_TARGET, if they > aren't already. I think it is a less common scenario. Yes, this is supported, but my feeling is that people seldom use this. Which explains why nobody complained, and some are surprised this even works. > > Maybe it would be possible to come up with a way to default ARM_CC_FOR_TARGET to > something that works for most people when testing aarch64, somehow. The problem is that a compiler is not enough to make things run fine. If you have an aarch64 Ubuntu, for example, you'd need to add armhf as an architecture option and install both the compiler and the libraries (libc6:armhf mostly). Another problem is that not every processor/kernel supports running a 32-bit process in a 64-bit environment. This makes things more complicated.