From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 425 invoked by alias); 25 Aug 2018 19:52:24 -0000 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 Received: (qmail 411 invoked by uid 89); 25 Aug 2018 19:52:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=overthinking, H*f:sk:1534425, H*f:sk:87r2ix9, 2018-08-19 X-HELO: mailsec101.isp.belgacom.be Received: from mailsec101.isp.belgacom.be (HELO mailsec101.isp.belgacom.be) (195.238.20.97) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 25 Aug 2018 19:52:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1535226742; x=1566762742; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=/g5FAg8nEr1hYH2RkBGDs7i64vUgMEhWFVEIETzzRPs=; b=bBK8fE2UJ2GXZYidVPKDlaeaCEkzHB4hanx0eGlznc8Hvg/4XkYdLoPz s/9tdXlU1ApFwnVIOwUm5eObQ2RKmQ==; Received: from 217.24-133-109.adsl-dyn.isp.belgacom.be (HELO md) ([109.133.24.217]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 25 Aug 2018 21:52:19 +0200 Message-ID: <1535226739.1438.8.camel@skynet.be> Subject: Re: [PATCH] Indicate batch mode failures by exiting with nonzero status From: Philippe Waroquiers To: Tom Tromey , Gary Benson Cc: gdb-patches@sourceware.org Date: Sat, 25 Aug 2018 19:52:00 -0000 In-Reply-To: <87bm9ygyiv.fsf@tromey.com> References: <1534425783-11599-1-git-send-email-gbenson@redhat.com> <87r2ix98pk.fsf@tromey.com> <20180817105923.GA32726@blade.nx> <87bm9ygyiv.fsf@tromey.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00618.txt.bz2 On Sun, 2018-08-19 at 09:35 -0600, Tom Tromey wrote: > > > > > > "Gary" == Gary Benson writes: > > > Also, why just the last command? I mean, I guess I don't really know > > > what I would expect, but maybe if any command failed, gdb should exit? > > Gary> That was my thinking, to have GDB exit 1 on the first error in batch > Gary> mode, but people objected; see the followups to: > > Oh, ok, sorry for wading into an already open issue without the > background. > > On reflection perhaps I'm overthinking it. It seems to me that it is > fine for these command line options to be defined based on whatever > seems convenient. > > For "real" scripting, a script file could be used. Maybe we could > finally land that try/catch patch, or the ignore-errors command. > Or, longer term, finally make it possible to really script with Python. Note that I still have on my list of things to do to rework the 'block of commands' patch that I started some (long) time ago. One of the objectives was to allow to group commands in blocks such as: { command1 ; command2 ; command3 } And have (optional) flags -c and -s to follow the { to control continuing (silently or not) the execution of a sequence of commands when there is a failure. Another objective is to allow something like:   thread apply all { command1; command 2} and similar for frame apply, Philippe