Re: gdb -batch always exits with status 0

Ruslan Kabatsayev <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAHEcG96yy8tekiVGjSvjn=AnmFkYRzPhCL_+5tSNj-81-D6HUw@mail.gmail.com>
On Fri, 17 Aug 2018 at 18:23, Gary Benson <[email protected]> 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.
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.