[PATCH] Indicate batch mode failures by exiting with nonzero status

Gary Benson gbenson@redhat.com
Fri Aug 17 15:38:00 GMT 2018


Pedro Alves wrote:
> If we went that route, I'd think that could be a separate orthogonal
> option.  I.e., a "stop/continue processing commands on first error"
> option.  That could be used even without -batch.
>
> That would be something in the same spirit of the new
> "thread apply" / "frame apply" flags:
> 
>   FLAG arguments are -q (quiet), -c (continue), -s (silent).

I think, if we're going to add the behaviour that GDB should stop on
error, then that behaviour should be the default, at least for batch
mode.  Stopping at the first error is what most languages do isn't it?
Apart from shell scripts :)  Having to have an option to enable the
intuitive behaviour (what *I* think is intuitive anyway) just
maintains GDB's reputation as cryptic and hard to use.

Cheers,
Gary



More information about the Gdb-patches mailing list