From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8910 invoked by alias); 15 Jan 2010 08:24:58 -0000 Received: (qmail 8902 invoked by uid 22791); 15 Jan 2010 08:24:58 -0000 X-SWARE-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_JMF_BL,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jan 2010 08:24:52 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0KWA00M004EHUR00@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Fri, 15 Jan 2010 10:24:35 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.60.183]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KWA00JK94OYPTB0@a-mtaout23.012.net.il>; Fri, 15 Jan 2010 10:24:35 +0200 (IST) Date: Fri, 15 Jan 2010 08:24:00 -0000 From: Eli Zaretskii Subject: Re: [patch] Do not disappoint on "Create a core file of GDB?" In-reply-to: <20100115002805.GA26155@host0.dyn.jankratochvil.net> To: Jan Kratochvil Cc: gingold@adacore.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83ockv7p1v.fsf@gnu.org> References: <20100111160241.GA12356@host0.dyn.jankratochvil.net> <83fx6c8ncd.fsf@gnu.org> <36BBE15B-5F48-48CD-ABE6-E0D39818EBB2@adacore.com> <836377867l.fsf@gnu.org> <20100115002805.GA26155@host0.dyn.jankratochvil.net> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00401.txt.bz2 > Date: Fri, 15 Jan 2010 01:28:05 +0100 > From: Jan Kratochvil > Cc: Tristan Gingold , gdb-patches@sourceware.org > > On Tue, 12 Jan 2010 20:37:50 +0100, Eli Zaretskii wrote: > > In case I wasn't clear, I was actually wondering how come we compile a > > source file that's needed for reading and writing core files on a > > system where core files aren't supported. We shouldn't compile it, > > and this problem should not exist. > > This code is about invoking system default SIGABRT action which is usually to > dump a core. Calling abort() is simple enough it IMO does not make sense to > move it to some host/target-dependent file. I don't want to start a dispute, just to make sure my intent is clear. We are calling `abort' here with a very specific purpose: producing a core file. On systems that don't support core files, calling `abort' in this context does not make sense, even though `bort' is an ANSI function and should be supported by any system where GDB can be built. So the code which does that should not be compiled on such systems, IMO. Ifdef'ing it away conditioned by such systems is much easier than introducing configury, whose results we know in advance.