From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2074.outbound.protection.outlook.com [40.107.241.74]) by sourceware.org (Postfix) with ESMTPS id 9A2A73858C2F for ; Thu, 5 Oct 2023 11:23:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A2A73858C2F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jXlU/V6OWLxf2pGisWZPNARKJpvLhhGl/929sj1lsNo=; b=6JlHSmIvkpzHHsuSDqblZnKxX8PwtsIOMZmK/yFjtznsrKWHdE8EX83UYunTdJOQL0uATHNJewfgglQ6bFpnUGN53J8d1DPs7TN9cscfp8/UmjT8kqCXp+s/a8HFdIL/73fyvX1EKeRsu38X2I9ni55JR455WZeL5kSvgNkChj0= Received: from DUZP191CA0011.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f9::9) by PAVPR08MB9259.eurprd08.prod.outlook.com (2603:10a6:102:307::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.37; Thu, 5 Oct 2023 11:23:38 +0000 Received: from DBAEUR03FT008.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4f9:cafe::79) by DUZP191CA0011.outlook.office365.com (2603:10a6:10:4f9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.33 via Frontend Transport; Thu, 5 Oct 2023 11:23: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 DBAEUR03FT008.mail.protection.outlook.com (100.127.142.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.25 via Frontend Transport; Thu, 5 Oct 2023 11:23:38 +0000 Received: ("Tessian outbound d219f9a4f5c9:v211"); Thu, 05 Oct 2023 11:23:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b656696f5b559da8 X-CR-MTA-TID: 64aa7808 Received: from 579f483ce51a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F7B5C6E1-C7E1-4A77-AA55-21BD9AD559F3.1; Thu, 05 Oct 2023 11:23:31 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 579f483ce51a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 05 Oct 2023 11:23:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gL6VC50Vxs4L0Ynh/3FaoZq6zLrc+eLzXobKBq5TmN9/LHb8Tf9cXLGKWpaDhneBFFRtChIe1VaIONT5f3C83Q+ni7EH8VLNSVBr4UPBGsfStNHvH1SxWlAXJGMq/RiybIztFrT54oDrD00/CyGF0nQh/tmfVYkf5dnfm97S5vvxbuMedx5lB5/3Pmkxxk3vYT8pJRyopUinBjad2/IX2XFin443Hrv6nOHLPBCq5pFbOUTjE/E51JMX1+nE5gFr/a0TnrjL0LwP3NzlWjCRUMnGmpJQv70j5E+7YEFfDgbTllGXGILx2xtKy/GrTHXDcJiHJXdpMb4Cc7g6LzSi4Q== 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=jXlU/V6OWLxf2pGisWZPNARKJpvLhhGl/929sj1lsNo=; b=GLLnJAt9p258lD4EkkKc+4ZW8dQtzpfrVrauU8CNelSazUellYAlVtmzbhjbfRVppmUXDK+vxy20AJ2BbFtMaNoAgPrD2nPtR6yQe1Y+djQWBirAfEFyOmHSrJVEP4BDVsKfoo9Gu6fU9tXudj2wk1t36pqYB7YmwB0lLPiqWClytZNbzEA6l+IFP3ekFnaXxVDcJVfPPuxWElwiueiWukuNP7JsH1F9fzTy3ijBRJcDMLSU6ohkz6358tlTrOKZdExpLeH3hjtq+F4OEJZ6FUGRc5TwJAPnXVtcaauj8/R9hbisshGwI2ezE4dix8Aqe/0OkGBTFWh7n59Knk1VKQ== 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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jXlU/V6OWLxf2pGisWZPNARKJpvLhhGl/929sj1lsNo=; b=6JlHSmIvkpzHHsuSDqblZnKxX8PwtsIOMZmK/yFjtznsrKWHdE8EX83UYunTdJOQL0uATHNJewfgglQ6bFpnUGN53J8d1DPs7TN9cscfp8/UmjT8kqCXp+s/a8HFdIL/73fyvX1EKeRsu38X2I9ni55JR455WZeL5kSvgNkChj0= 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 PA4PR08MB5997.eurprd08.prod.outlook.com (2603:10a6:102:f0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.33; Thu, 5 Oct 2023 11:23:29 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::ec3b:5cf4:e970:6f67]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::ec3b:5cf4:e970:6f67%7]) with mapi id 15.20.6838.033; Thu, 5 Oct 2023 11:23:28 +0000 Message-ID: Date: Thu, 5 Oct 2023 12:23:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] gdbserver: fix gdbserver builds after expedite_regs changes Content-Language: en-US To: Andrew Burgess , gdb-patches@sourceware.org References: <3ae39ff41ea9a6832f24e3fe8425304a25ac671c.1696504740.git.aburgess@redhat.com> From: Luis Machado In-Reply-To: <3ae39ff41ea9a6832f24e3fe8425304a25ac671c.1696504740.git.aburgess@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0613.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:314::19) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|PA4PR08MB5997:EE_|DBAEUR03FT008:EE_|PAVPR08MB9259:EE_ X-MS-Office365-Filtering-Correlation-Id: acf801d5-2ab1-4349-329b-08dbc595859b 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: bjJapCCO+sieHHw5xkXWspqijH+3I/mdnmreHR/6NpOh7Heo6VUjXfSE96ugvhG5rLFIVv8CkYmBqw65LRgxcO/cXOYZJtDJ1PljaoCyyibKhE+sSvN/zAuK26xSJxv8NmYF0DyPQJDk5QebpoCYR7yeC2FlgUVubUkCZlr5vi6lUV0lNwofZ+OwOpggtYfQp7dFxrNyJ/GlXmgdLXMytk8WoSHtO1aCp1G4Ew0LGiibT9Gjmntlrj4NLsex/7Kmt4KAckaVds0YYuhoz+Sur2T+KroBId/OWnOHjWkFr4oo75dadgB1twGuuMqP7u7411k2wi+uX6bsXQOdryp/ebFFKmvcJjBgvhLi8TCYaSdsPt1t9HmSyo1wGtqsvzXzoH6G3RfJvLXZVK5+UnzM3/3BfMXL9tmNCvhH/R5TtWTYm0b9abblry95l5rvDrXXkW+fcYpu7eIDnT8TvxG7yMQbBzZtw5AiY39jtcKSBJsJJATMmE0zrFfhbyntefcubyaYwT+GUq2jzHMmkMvRu+3Piz/cWalHNHAMV/J7xLqGMUauPbCjKvKSXdMUWR1jgeUoLej5iJdn/v5o6zrm8syWKxg4QtMFWcjNQC452fZvqBtBi6kNvxvHf1s+LgRJ6Zw1RaNjtzyAyQSVbRLBBQ== 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:(13230031)(136003)(366004)(396003)(39860400002)(376002)(346002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(5660300002)(31696002)(2906002)(8936002)(8676002)(66556008)(316002)(86362001)(41300700001)(44832011)(66946007)(36756003)(66476007)(2616005)(6512007)(26005)(83380400001)(38100700002)(478600001)(6506007)(6666004)(53546011)(31686004)(6486002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB5997 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: DBAEUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 8591ff51-9eeb-487a-f0b6-08dbc5957dbd X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qo8ZlHBkG/RPlRbYRd+0Xa2tQXS+Tw/jEfiBmKgbZv8+ZehR3RjHwbxUPblGBiP63VvZoIENPL9dh6D4Wmrn8F1012wzJREZRlIz8jDkef9KPREWzWhZrI/gwCQQyGh3AK6yIZ6FlZjOD6lIAsXofce/nSJIufMqplE19kEmAM/pAmHzaK9bTZ5UG/rU3ZNluBT9X3VPgT2QdIbJjKDS2NP4ZlICs3w5rAw8ybEnmOMWbWR6NKUgC1tH58d42KlIkfvavUCcI/95BIEwXzOOP+vBmsq+3UBcROMVZVi+Cw4cdUACCTpoSz+S8+5zxOd0YuJJ2QeiaWkgXWx5iKy/K4rvbS67mnvGujkn27mvljYJdWLU44GGpnKXm5q858dRqbRQW0gtCs5Cyc4qrLlCOmzsBx4j1GCneuY/1kEfr1QYeuLLGm4I+mPhFkMvV0zmnzt22+BOuZURwCaDqFIorij9qe84ZU0agFRBvpuU4OE8Q+CDJ/1kDgAxlBuUR/IpyoMHjsNPTa8numjyOfT11g0wPW6Y6A4eEsna0X335MZijJN9fuC3yR0skVjwKDJGi36gVNzGGsdR+Tr3FezWOyVlOtu0WTNGCyGYW3XRZrSAf62llWQvkq5obmKccndUQ3ipdTc03HBgK2RB245oJve2a6DseyuqrbzFvpXI4yENO/fw3fDKP2brsbAQo9CkNHZVz5qlagkU8UTfsb5+9l7OoT+2U/npGKd2OH44tqmDLsuXf5CKAilC3MYd5sLs0kHEkrqXZymlHMTefsC6eQ== 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:(13230031)(4636009)(396003)(346002)(136003)(376002)(39860400002)(230922051799003)(82310400011)(451199024)(186009)(1800799009)(64100799003)(46966006)(36840700001)(40470700004)(478600001)(47076005)(40460700003)(2906002)(36860700001)(36756003)(31696002)(40480700001)(86362001)(81166007)(82740400003)(356005)(41300700001)(26005)(2616005)(70206006)(70586007)(316002)(336012)(8676002)(8936002)(6506007)(6486002)(6666004)(6512007)(53546011)(31686004)(83380400001)(44832011)(5660300002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2023 11:23:38.5084 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: acf801d5-2ab1-4349-329b-08dbc595859b 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: DBAEUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9259 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,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 List-Id: On 10/5/23 12:19, Andrew Burgess wrote: > After this commit: > > commit 6a65998a8a94abaaae7ca4ff0ab9c3f25dc2e766 > Date: Mon Sep 11 12:42:00 2023 +0100 > > Convert tdesc's expedite_regs to a string vector > > The risc-v, loongarch, and csky gdbserver builds were broken. A use > of target_desc::expedite_regs (for each architecture) was not updated > to take account of the type change. > > I've tested that this fixes the risc-v build. I haven't tested the > other architectures, but they should be fine. > --- > gdbserver/linux-csky-low.cc | 7 +++++-- > gdbserver/linux-loongarch-low.cc | 7 +++++-- > gdbserver/linux-riscv-low.cc | 8 ++++++-- > 3 files changed, 16 insertions(+), 6 deletions(-) > > diff --git a/gdbserver/linux-csky-low.cc b/gdbserver/linux-csky-low.cc > index 3117556f5de..feb428ec9d2 100644 > --- a/gdbserver/linux-csky-low.cc > +++ b/gdbserver/linux-csky-low.cc > @@ -132,8 +132,11 @@ csky_target::low_arch_setup () > static const char *expedite_regs[] = { "r14", "pc", NULL }; > target_desc_up tdesc = csky_create_target_description (); > > - if (!tdesc->expedite_regs) > - init_target_desc (tdesc.get (), expedite_regs); > + if (tdesc->expedite_regs.empty ()) > + { > + init_target_desc (tdesc.get (), expedite_regs); > + gdb_assert (!tdesc->expedite_regs.empty ()); > + } > > current_process ()->tdesc = tdesc.release (); > > diff --git a/gdbserver/linux-loongarch-low.cc b/gdbserver/linux-loongarch-low.cc > index ead2e76d25d..3eb87f55d0f 100644 > --- a/gdbserver/linux-loongarch-low.cc > +++ b/gdbserver/linux-loongarch-low.cc > @@ -84,8 +84,11 @@ loongarch_target::low_arch_setup () > features.xlen = sizeof (elf_greg_t); > tdesc = loongarch_create_target_description (features); > > - if (!tdesc->expedite_regs) > - init_target_desc (tdesc.get (), expedite_regs); > + if (tdesc->expedite_regs.empty ()) > + { > + init_target_desc (tdesc.get (), expedite_regs); > + 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 129bc3b138b..4c251bb179c 100644 > --- a/gdbserver/linux-riscv-low.cc > +++ b/gdbserver/linux-riscv-low.cc > @@ -90,8 +90,12 @@ riscv_target::low_arch_setup () > = riscv_linux_read_features (lwpid_of (current_thread)); > target_desc_up tdesc = riscv_create_target_description (features); > > - if (!tdesc->expedite_regs) > - init_target_desc (tdesc.get (), expedite_regs); > + if (tdesc->expedite_regs.empty ()) > + { > + init_target_desc (tdesc.get (), expedite_regs); > + gdb_assert (!tdesc->expedite_regs.empty ()); > + } > + > current_process ()->tdesc = tdesc.release (); > } > > > base-commit: 0515a7b643c6f7bbfb647764b702d4c6445618e8 Oops. Sorry about that, and thanks for fixing it. It would be great to have some speciments of those architectures in the sourceware CI to catch these hiccups.