Re: gdb -batch always exits with status 0

Ruslan Kabatsayev <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAHEcG97NpFZNPphu+6va0i6AsC3Vk9OnXHi54bEWeQMzifVrdg@mail.gmail.com>
On Fri, 17 Aug 2018 at 14:03, Gary Benson <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.