From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81605 invoked by alias); 5 Jul 2018 15:23: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 81573 invoked by uid 89); 5 Jul 2018 15:23:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,SPF_PASS autolearn=no version=3.3.2 spammy=Would, Gary, gary, Benson X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Jul 2018 15:23:57 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb66s-0001cJ-9M for gdb@sourceware.org; Thu, 05 Jul 2018 11:23:55 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb66n-0001aw-4z; Thu, 05 Jul 2018 11:23:49 -0400 Received: from [50.226.24.42] (port=46976 helo=pdsdesk) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fb66m-0006L3-RK; Thu, 05 Jul 2018 11:23:48 -0400 Message-ID: <2c7ad73e90cc7417bd23b4529261d8c737668571.camel@gnu.org> Subject: Re: gdb -batch always exits with status 0 From: Paul Smith Reply-To: psmith@gnu.org To: Gary Benson , gdb@sourceware.org Date: Thu, 05 Jul 2018 15:23:00 -0000 In-Reply-To: <20180705144659.GA29169@blade.nx> References: <20180705144659.GA29169@blade.nx> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00011.txt.bz2 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. Also, it would be nice if there were a way to distinguish between "bad command line/core file/executable and I couldn't start debugging", and "I loaded everything but some commands didn't work". But that may be a separate operation.