From patchwork Fri Oct 13 14:44:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lancelot SIX X-Patchwork-Id: 77668 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8C0B63857707 for ; Fri, 13 Oct 2023 14:46:07 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2040.outbound.protection.outlook.com [40.107.95.40]) by sourceware.org (Postfix) with ESMTPS id 5BCD6385C6FC for ; Fri, 13 Oct 2023 14:45:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5BCD6385C6FC Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GogUF52Mt4aCxJuHgjeTnLvym/qNXo4WqefgGRKhTNoLioZYqey6rm0vzw/qtaqdENphxA5U+W+Y3Z1Fs3FGgjG4v7x/zkrqJHpvjWYNT9iDrXen19KzfXEVYM2WgR/usyXZh2hlK/Mh/Fi5euzVD8PYGnHztgyHwVS973C4IHYh+uTCI95C9kwanS2czr0bNdaT0J5tVd4dNHLDVAt2BlOjx1j39s/T59CF19JYNLKQUqO4K2/Fs3SfYptKkHQHsbYjXV6iNmc8q8TTXTGWzVarUkbQWk75HgYiKT9HxJfyeXWsphARJCtLsAhbarzqPfEZoys3nXvypCWQv9EsyQ== 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=kb31PWc9ZHKc+cmgohWCAMmv1P2QBNAQHtGUNM/QtyU=; b=EF7rATzDPMGceW7H0UzQPKgPGNa5tz2g3KE6qWvePo8HFAIn9l9hCT2qEMvrkbn4L2y9LcCNkv+nIveJokeWF5VjBajc/FGwlzbW4mRIocyfChFH5OUlHUz1wrYyPXEjoVzRnnKEoDu4AROViuI8z+IdRohP9F2giGY4AqtEJZPg8KEmR5LZNgFwI8IxIX33BXtl7JYTW2i3kjZtmBbfNrU6zjLGJxvdsevxK7+6B7Oo0ZnJQlSb3Y9Z9cJDo8OulUa+207x0GDIKHIDMEGwwGG0YF6BxoFPE/fXCo0OpYhSZFrYYjq+nVge3RmveHkOD8YinsDu7fxJht34s2F8tw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kb31PWc9ZHKc+cmgohWCAMmv1P2QBNAQHtGUNM/QtyU=; b=MPfR2rz4Dm/wEtIFYbU2/SXeM2O7qHxgQ/5kwivzEMhG+U2hUm+9wGQEKOVMApFBFxoXVF7aFxmoWGMe5V4+SjBA0SJZ3CrcWO6H2Dq5w05D15/ePrGSGA3vL2sEhKyTN1RsgD+68siXs52YkD0snvI7ckZAL/jEbgVKTbKAT/M= Received: from DM6PR11CA0018.namprd11.prod.outlook.com (2603:10b6:5:190::31) by DM4PR12MB6446.namprd12.prod.outlook.com (2603:10b6:8:be::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.44; Fri, 13 Oct 2023 14:45:01 +0000 Received: from DS1PEPF00017096.namprd05.prod.outlook.com (2603:10b6:5:190:cafe::67) by DM6PR11CA0018.outlook.office365.com (2603:10b6:5:190::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.27 via Frontend Transport; Fri, 13 Oct 2023 14:45:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF00017096.mail.protection.outlook.com (10.167.18.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.22 via Frontend Transport; Fri, 13 Oct 2023 14:45:01 +0000 Received: from hpe6u-23.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 13 Oct 2023 09:44:57 -0500 From: Lancelot Six To: CC: Lancelot Six Subject: [PATCH 10/11] gdb/disasm.h: Mark callbacks noexcept unconditionally Date: Fri, 13 Oct 2023 14:44:17 +0000 Message-ID: <20231013144418.3180617-11-lancelot.six@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013144418.3180617-1-lancelot.six@amd.com> References: <20231013144418.3180617-1-lancelot.six@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017096:EE_|DM4PR12MB6446:EE_ X-MS-Office365-Filtering-Correlation-Id: 995f8489-640f-498f-7320-08dbcbfafac7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rHKO8j+hE+awJrQFZTZSF00JCOQ6hxtd2/ICSi36z6IumJCQIrvYmYTnC9TRMb+1AUb7bo9YwbJnxotMXQ137IfcxTXWNZ/uNU1EdZlI0SlWObXGNGBVnqq2sFM3W6QOOa1Nwxbb6pa6bWqt/wCHqznsON+ndzEwYOmDw+i7YVM1A4GxdpwsKhZ9I0b9cKepJtxAhQq+YFlLyEPODsZ+eJ87GNfvN26FNALCMeqfZ+6qO8K2d3KUR9I12ranIxEHMrWAQyFFsraYieYR+MEf/HnMdLxRvUh03a2H2eGutNxfJaKQaxbWi9dBW6KidD25oGMzTu8lSY4eDzL5wqPg1NpVUlilsyRV4v/wvdySporKjIhY1p/h0PDJHVyW2dCatDeS43bMc7tdrVmzd9lRvefjfd+EbzLQ2Lvu5UL+3O8F2LWWABSGVSN0VG8EIuF5xzD9Oa+DgW+g4ENxuWfhfoGy8HE4VMoUYxOuX4fjsmVS1ptlsW6SpN5SvoH/shHrC6KiVbX8v1HOtYJhfn90glaSKRnQwle22N5fRYNRr2FU6Lnxzqyr+NfHLwseCEAM8RQ1jiZyisZ1HhcfO0UCSyEuRaf3b7gVLbyzATn4yvYwbcr4VU4h3fAyFiRFcpvcaEg0MpiVQnp14O5JLHazNEHUVm43j2BG14lSb1FTJu9zw39TDuKeorao4qGGC0ExuMQr7htuE2DZaFIQOmxdi0ljMZnJx4sdp685MWf/4IVpbLIWbpz0tM8gC4+jVZtgESiAweCF55xef4eM7ACmkw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(346002)(396003)(136003)(376002)(230922051799003)(451199024)(82310400011)(64100799003)(186009)(1800799009)(40470700004)(46966006)(36840700001)(40460700003)(82740400003)(5660300002)(356005)(41300700001)(8676002)(44832011)(81166007)(4326008)(8936002)(40480700001)(2906002)(86362001)(36860700001)(426003)(2616005)(336012)(1076003)(16526019)(478600001)(47076005)(7696005)(6666004)(36756003)(26005)(316002)(70206006)(70586007)(6916009)(83380400001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2023 14:45:01.0976 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 995f8489-640f-498f-7320-08dbcbfafac7 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017096.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6446 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Given that C+17 is now a requirement for GBD, update gdb/disasm.h to define callback function types noexcept unconditionally. The pre-C++17 configuration is not supported anymore. Change-Id: I0a38e22b7912c70a11425363a991f0b01614343e --- gdb/disasm.h | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/gdb/disasm.h b/gdb/disasm.h index 5596bd62a10..90fa1dfc02b 100644 --- a/gdb/disasm.h +++ b/gdb/disasm.h @@ -26,12 +26,6 @@ struct gdbarch; struct ui_out; struct ui_file; -#if __cplusplus >= 201703L -#define LIBOPCODE_CALLBACK_NOEXCEPT noexcept -#else -#define LIBOPCODE_CALLBACK_NOEXCEPT -#endif - /* A wrapper around a disassemble_info and a gdbarch. This is the core set of data that all disassembler sub-classes will need. This class doesn't actually implement the disassembling process, that is something @@ -58,27 +52,18 @@ struct gdb_disassemble_info protected: /* Types for the function callbacks within m_di. The actual function - signatures here are taken from include/dis-asm.h. The noexcept macro - expands to 'noexcept' for C++17 and later, otherwise, it expands to - nothing. This is because including noexcept was ignored for function - types before C++17, but both GCC and Clang warn that the noexcept - will become relevant when you switch to C++17, and this warning - causes the build to fail. */ + signatures here are taken from include/dis-asm.h. */ using read_memory_ftype = int (*) (bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *) - LIBOPCODE_CALLBACK_NOEXCEPT; + noexcept; using memory_error_ftype - = void (*) (int, bfd_vma, struct disassemble_info *) - LIBOPCODE_CALLBACK_NOEXCEPT; + = void (*) (int, bfd_vma, struct disassemble_info *) noexcept; using print_address_ftype - = void (*) (bfd_vma, struct disassemble_info *) - LIBOPCODE_CALLBACK_NOEXCEPT; + = void (*) (bfd_vma, struct disassemble_info *) noexcept; using fprintf_ftype - = int (*) (void *, const char *, ...) - LIBOPCODE_CALLBACK_NOEXCEPT; + = int (*) (void *, const char *, ...) noexcept; using fprintf_styled_ftype - = int (*) (void *, enum disassembler_style, const char *, ...) - LIBOPCODE_CALLBACK_NOEXCEPT; + = int (*) (void *, enum disassembler_style, const char *, ...) noexcept; /* Constructor, many fields in m_di are initialized from GDBARCH. The remaining arguments are function callbacks that are written into m_di.