From patchwork Tue Jan 15 22:47:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 31070 Received: (qmail 93406 invoked by alias); 15 Jan 2019 22:47:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 93377 invoked by uid 89); 15 Jan 2019 22:47:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.9 required=5.0 tests=BAYES_00, BODY_8BITS, GARBLED_BODY, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, MIME_BASE64_BLANKS autolearn=ham version=3.3.2 spammy=pm, Hx-spam-relays-external:15.20.1537.25, H*RU:15.20.1537.25, reproduced X-HELO: sesbmg23.ericsson.net Received: from sesbmg23.ericsson.net (HELO sesbmg23.ericsson.net) (193.180.251.37) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Jan 2019 22:47:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/relaxed; q=dns/txt; i=@ericsson.com; t=1547592462; x=1550184462; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=yk50jsACGbdHVyE0W6vHWlODeLtL1JgTPIRI6J0v6mg=; b=Vksfm1CAcNHIkRmusF4Zr+sU6DUQnsbP20mV6hDFDDSqBx6DztdABUI3B+IbnPiC HYeqyEfkaO0B2SKkX6dEy3JVN+pZ9xmwhep7GcImP/fHoIlhqD2Fi96T5uVNY+39 Db+J+ywYDR6W6cEWrknTc8Zx8bT0bbg+qx0YUrUNUmo=; Received: from ESESBMB505.ericsson.se (Unknown_Domain [153.88.183.118]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id E4.F9.24567.E036E3C5; Tue, 15 Jan 2019 23:47:42 +0100 (CET) Received: from ESESSMB501.ericsson.se (153.88.183.162) by ESESBMB505.ericsson.se (153.88.183.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 15 Jan 2019 23:47:41 +0100 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB501.ericsson.se (153.88.183.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Tue, 15 Jan 2019 23:47:42 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yk50jsACGbdHVyE0W6vHWlODeLtL1JgTPIRI6J0v6mg=; b=QbNQyK3XxM8c8uEEfldKIRC0INbxGzxIhwTnj8ZTxJBrwvy0Wba8mvRy8YiujGbgN2Ns733brPENRdgM+LBVCU/XOpAh2lQGfGFzZBUaE8zh22m0uALWnrfSzkFRxeYALMXy+NV/c2CRrgsKwb34haj8GqHwecS/3YCnxbrzlg8= Received: from BYAPR15MB2390.namprd15.prod.outlook.com (52.135.198.30) by BYAPR15MB3303.namprd15.prod.outlook.com (20.179.58.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1537.25; Tue, 15 Jan 2019 22:47:38 +0000 Received: from BYAPR15MB2390.namprd15.prod.outlook.com ([fe80::a4b4:ea6a:6321:191e]) by BYAPR15MB2390.namprd15.prod.outlook.com ([fe80::a4b4:ea6a:6321:191e%4]) with mapi id 15.20.1516.019; Tue, 15 Jan 2019 22:47:38 +0000 From: Simon Marchi To: =?utf-8?B?0J/QsNCy0LXQuyDQmtGA0Y7QutC+0LI=?= , "Simon Marchi" CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] Define 'EXTERN' for simulation internals Date: Tue, 15 Jan 2019 22:47:37 +0000 Message-ID: <5ab5d5d2-7c79-07b1-6180-15a7542dc567@ericsson.com> References: <52fdec0b9bd5845037454da18adefe09@polymtl.ca> <02d7b4f081f3247bb798b07f2735e40f@polymtl.ca> In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) Content-ID: <9D7524E77B55AA45A81147DECF46FA1E@namprd15.prod.outlook.com> MIME-Version: 1.0 Return-Path: simon.marchi@ericsson.com X-IsSubscribed: yes On 2019-01-15 5:32 p.m., Павел Крюков wrote: > Yes, it would be fine as well. Thanks, I pushed this. From dc7e818497f0af0a3ee569f6eee0ad74e19b4bc2 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 15 Jan 2019 17:45:39 -0500 Subject: [PATCH] sim: Fix definition of SIM_ARANGE_INLINE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If HAVE_INLINE is false, SIM_ARANGE_INLINE is currently defined as #define SIM_ARANGE_INLINE EXTERN However, EXTERN is not defined anywhere, leading to errors such as: In file included from /mipt-mips/simulator/../../sim/common/sim-basics.h:147:0, from /mipt-mips/simulator/export/gdb/sim-main.h:13, from /mipt-mips/simulator/export/gdb/gdb_interface.cpp:7: /mipt-mips/simulator/../../sim/common/sim-arange.h:71:27: error: ‘EXTERN’ does not name a type; did you mean ‘EUSERS’? #define SIM_ARANGE_INLINE EXTERN ^ /mipt-mips/simulator/../../sim/common/sim-arange.h:76:1: note: in expansion of macro ‘SIM_ARANGE_INLINE’ SIM_ARANGE_INLINE int ^~~~~~~~~~~~~~~~~ I (Simon) have reproduced the problem by simply removing the HAVE_INLINE definition. This was originally reported by Pavel I. Kryukov . sim/common/ChangeLog: * sim-arange.h (SIM_ARANGE_INLINE): Change EXTERN to extern. --- sim/common/ChangeLog | 4 ++++ sim/common/sim-arange.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 01ee122b019..a95735a4793 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2019-01-15 Simon Marchi + + * sim-arange.h (SIM_ARANGE_INLINE): Change EXTERN to extern. + 2018-12-18 Andrew Burgess * sim-syscall.c (sim_syscall_multi): Don't update sc->errcode at diff --git a/sim/common/sim-arange.h b/sim/common/sim-arange.h index ce84c1138ad..f2ac595390f 100644 --- a/sim/common/sim-arange.h +++ b/sim/common/sim-arange.h @@ -68,7 +68,7 @@ extern void sim_addr_range_delete (ADDR_RANGE * /*ar*/, #define SIM_ARANGE_INLINE EXTERN_INLINE #endif #else -#define SIM_ARANGE_INLINE EXTERN +#define SIM_ARANGE_INLINE extern #endif /* Return non-zero if ADDR is in range AR, traversing the entire tree.