From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90674 invoked by alias); 17 Aug 2018 11:25:37 -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 90652 invoked by uid 89); 17 Aug 2018 11:25:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1250 X-HELO: mail-wm0-f53.google.com Received: from mail-wm0-f53.google.com (HELO mail-wm0-f53.google.com) (74.125.82.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Aug 2018 11:25:35 +0000 Received: by mail-wm0-f53.google.com with SMTP id o11-v6so7223874wmh.2 for ; Fri, 17 Aug 2018 04:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=onFeBq8M9G0D815bHunbcSLpPFcyZgMUuKZ1fECSfYY=; b=qPOOtnDk6g61YbIky8A0kJx27zXHiGh/fuoJxQYG2beOHwK7oODS9bu0aqfDM/tJhw pjv3qibq/EfV+aFQNWxDMVvJoYPubPdwRoq3ogUAUrZOb+kkyCWayov7c/mNxr0hc2xv 7Wi76jtcL3tQAEjBIhUotsxhZcU4YuZ3v5wan6G0q7dO7UR4Kt0mEt7wzP4j7LDu4go8 kkR5UXlmppRfqw0WaHwFqdKOo25848ALeMd6Vz0znSev3rKS+CVVCR/0QWnkjMhBjwpu i23VcNIdT99CXmiqn0G2sEXA/ZSyD/Fa1Z/SZDSn77kwC8OecTf2iskJWQIr6z4qUojS AiFQ== MIME-Version: 1.0 References: <20180705144659.GA29169@blade.nx> <2c7ad73e90cc7417bd23b4529261d8c737668571.camel@gnu.org> <20180817110354.GB32726@blade.nx> In-Reply-To: <20180817110354.GB32726@blade.nx> From: Ruslan Kabatsayev Date: Fri, 17 Aug 2018 11:25:00 -0000 Message-ID: Subject: Re: gdb -batch always exits with status 0 To: Gary Benson Cc: psmith@gnu.org, gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00034.txt.bz2 On Fri, 17 Aug 2018 at 14:03, Gary Benson wrote: > > 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. Ideally, I'd like to have a more fine-grained way to choose which commands' errors are to be ignored. But if it's much harder to implement, the way you suggest is fine with me. > > Thanks, > Gary