From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125770 invoked by alias); 17 Aug 2018 11:03:59 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 125760 invoked by uid 89); 17 Aug 2018 11:03:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:957 X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Aug 2018 11:03:57 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 082CCF2B5A; Fri, 17 Aug 2018 11:03:56 +0000 (UTC) Received: from blade.nx (ovpn-117-165.ams2.redhat.com [10.36.117.165]) by smtp.corp.redhat.com (Postfix) with ESMTP id B25BA2166BA5; Fri, 17 Aug 2018 11:03:55 +0000 (UTC) Received: by blade.nx (Postfix, from userid 1000) id 1AB0180AFCC4; Fri, 17 Aug 2018 12:03:55 +0100 (BST) Date: Fri, 17 Aug 2018 11:03:00 -0000 From: Gary Benson To: Paul Smith Cc: Ruslan Kabatsayev , gdb@sourceware.org Subject: Re: gdb -batch always exits with status 0 Message-ID: <20180817110354.GB32726@blade.nx> References: <20180705144659.GA29169@blade.nx> <2c7ad73e90cc7417bd23b4529261d8c737668571.camel@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c7ad73e90cc7417bd23b4529261d8c737668571.camel@gnu.org> X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00033.txt.bz2 Paul Smith wrote: > On Thu, 2018-07-05 at 15:47 +0100, Gary Benson wrote: > > Would anybody object to my changing GDB's behaviour to terminate > > on the first error in batch mode? > > I would definitely not like this. Often I write batch files that > are used to collect information about cores (or running processes); > if some aspect of the core is not as I expect, or values are > optimized out, or some operation fails for whatever reason, I > definitely do not want my batch processing to stop. I want it to > continue so I can get as much information as possible. > > If a "stop on error" mode is needed then there should be a separate > option to GDB such as '-batch-fail' or whatever for that, IMO. Paul, Ruslan, would it be acceptable to you if I: 1) changed the default behaviour to exit 1 on the first error 2) added an option (e.g. -ignore-errors) to revert to the current behaviour. Thanks, Gary