[Bug gdb/13000] Return value with -batch is always 0

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Wed Aug 29 15:13:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=13000

--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gary Benson <gary@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b0f492b90f3d13da8ac80437e6ecb9a87db4a75b

commit b0f492b90f3d13da8ac80437e6ecb9a87db4a75b
Author: Gary Benson <gbenson@redhat.com>
Date:   Wed Aug 29 16:11:50 2018 +0100

    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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list