From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id XRdrC9sg1l9rLwAAWB0awg (envelope-from ) for ; Sun, 13 Dec 2020 09:10:35 -0500 Received: by simark.ca (Postfix, from userid 112) id 21A601F0AA; Sun, 13 Dec 2020 09:10:35 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9458F1E99A for ; Sun, 13 Dec 2020 09:10:34 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2642D385800A; Sun, 13 Dec 2020 14:10:34 +0000 (GMT) Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTP id 901E3385800A for ; Sun, 13 Dec 2020 14:10:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 901E3385800A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=brobecker@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 6F8695606E; Sun, 13 Dec 2020 09:10:31 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ifefx2nhiEoV; Sun, 13 Dec 2020 09:10:31 -0500 (EST) Received: from float.home (localhost.localdomain [127.0.0.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 1B9AE116FA6; Sun, 13 Dec 2020 09:10:30 -0500 (EST) Received: by float.home (Postfix, from userid 1000) id E9165A1880; Sun, 13 Dec 2020 18:10:25 +0400 (+04) Date: Sun, 13 Dec 2020 18:10:25 +0400 From: Joel Brobecker To: Pavel Kryukov Subject: Re: [PATCH] Include to cp1.c for abort() declaration Message-ID: <20201213141025.GI366101@adacore.com> References: <20201212124528.1095-1-kryukov@frtk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201212124528.1095-1-kryukov@frtk.ru> 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: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > sim/mips/ChangeLog: > > * cp1.c: Include :-/. Using "abort" in the sim is not a good idea, because the sim can be built into GDB. So imagine the scenario where a user uses an invalid switch as the sim calls "abort", instead of just reporting the error to the user and letting him try again, the debugging session just abort... However, in this particular case, the use of aborts is not your fault, and it's probably not new either, so it makes sense to include the corresponding system header. The patch is OK for me. Please feel free to push (do you have push permissions?). > --- > sim/mips/ChangeLog | 4 ++++ > sim/mips/cp1.c | 2 ++ > 2 files changed, 6 insertions(+) > > diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog > index 7ced3edd1b..f9a1eb96c6 100644 > --- a/sim/mips/ChangeLog > +++ b/sim/mips/ChangeLog > @@ -1,3 +1,7 @@ > +2020-12-12 Pavel I. Kryukov > + > + * cp1.c: Include . > + > 2020-07-29 Simon Marchi > > * configure: Re-generate. > diff --git a/sim/mips/cp1.c b/sim/mips/cp1.c > index 82fdea2bcb..d81b07a20c 100644 > --- a/sim/mips/cp1.c > +++ b/sim/mips/cp1.c > @@ -42,6 +42,8 @@ along with this program. If not, see . */ > > #include "sim-main.h" > > +#include > + > /* Within cp1.c we refer to sim_cpu directly. */ > #define CPU cpu > #define SD CPU_STATE(cpu) > -- > 2.17.1 -- Joel