From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108412 invoked by alias); 17 Aug 2018 15:44:12 -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 108384 invoked by uid 89); 17 Aug 2018 15:44:11 -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:769 X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Aug 2018 15:44:10 +0000 Received: by mail-wm0-f45.google.com with SMTP id s9-v6so7993031wmh.3 for ; Fri, 17 Aug 2018 08:44:10 -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=6DabwmaUVvPWItDxjY/kYoAH+W7UusDUtLbw/lt1foM=; b=f4Jfmj8ZL0EsfCLTsIOThvVcUNQvJh1cNi2sPLlgU0+aSc1zx5H9OP+lLiIyi/Ical 5Yj9Jvvef2LEMJYp7to+XKFtem2jQkEwfSeOjdSFYuEOABp9ANY366elhs7hiaEC8NuD VfffpDTSPyh911NrmNpu44NMcKdJAbNUBdmuFA/qquGhpwjM09j/eiD6DUxlhx3vdlHE OrxrvhzpTKjhQ1LlM3B9yQZiQ8XhH4wClG+57vOOuxRJ9lT40K/0SIWQm2c5IwoNsNFF 40J1Jbdc6pofBj9XTjoBzlXJD2f4bDi6wSBUl/mOepN7eAwMzvS4Z1ec5FGtxGrXy08b Fv/w== MIME-Version: 1.0 References: <20180705144659.GA29169@blade.nx> <2c7ad73e90cc7417bd23b4529261d8c737668571.camel@gnu.org> <20180817110354.GB32726@blade.nx> <20180817152345.GA2920@blade.nx> In-Reply-To: <20180817152345.GA2920@blade.nx> From: Ruslan Kabatsayev Date: Fri, 17 Aug 2018 15:44: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/msg00037.txt.bz2 On Fri, 17 Aug 2018 at 18:23, Gary Benson wrote: > > It would be the least impactful way, sure, but my point is that GDB > doesn't operate in an intuitive way, and my view is that whatever is > intuitive should be the default. Having to request it with a special > flag makes GDB harder for new users. Not sure about intuitiveness of early exit, but we have an example of the converse: bash (and other shells). Namely, by default it executes all the commands, exits with the exit status of the last command executed. But you can `set -e`, and then first failing command will stop processing. But then, there do exist means to suppress failure (e.g. `badCommand && true`), which GDB doesn't seem to have.