Indicate batch mode failures by exiting with nonzero status
authorGary Benson <gbenson@redhat.com>
Wed, 29 Aug 2018 15:11:50 +0000 (16:11 +0100)
committerGary Benson <gbenson@redhat.com>
Wed, 29 Aug 2018 15:11:50 +0000 (16:11 +0100)
commitb0f492b90f3d13da8ac80437e6ecb9a87db4a75b
tree1b77332c0e4f9f694b3a5b8702e2a8ceb17ebed0
parent2362e7f76adb395df19c867cd27c75f77a0ade6f
Indicate batch mode failures by exiting with nonzero status

This commit causes GDB in batch mode to exit with nonzero status
if the last command to be executed fails.

gdb/ChangeLog:

PR gdb/13000:
* gdb/main.c (captured_main_1): Exit with nonzero status
in batch mode if the last command to be executed failed.
* NEWS: Mention the above.

gdb/testsuite/ChangeLog:

PR gdb/13000:
* gdb.base/batch-exit-status.exp: New file.
* gdb.base/batch-exit-status.good-commands: Likewise.
* gdb.base/batch-exit-status.bad-commands: Likewise.
gdb/ChangeLog
gdb/NEWS
gdb/main.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/batch-exit-status.bad-commands [new file with mode: 0644]
gdb/testsuite/gdb.base/batch-exit-status.exp [new file with mode: 0644]
gdb/testsuite/gdb.base/batch-exit-status.good-commands [new file with mode: 0644]
This page took 0.025811 seconds and 4 git commands to generate.