From b0f492b90f3d13da8ac80437e6ecb9a87db4a75b Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Wed, 29 Aug 2018 16:11:50 +0100 Subject: 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/testsuite/gdb.base/batch-exit-status.bad-commands | 1 + 1 file changed, 1 insertion(+) create mode 100644 gdb/testsuite/gdb.base/batch-exit-status.bad-commands (limited to 'gdb/testsuite/gdb.base/batch-exit-status.bad-commands') diff --git a/gdb/testsuite/gdb.base/batch-exit-status.bad-commands b/gdb/testsuite/gdb.base/batch-exit-status.bad-commands new file mode 100644 index 0000000..4793acb --- /dev/null +++ b/gdb/testsuite/gdb.base/batch-exit-status.bad-commands @@ -0,0 +1 @@ +bork -- cgit v1.1