Allow specifying an exit code for the 'quit' command
authorRaphael Isemann <teemperor@gmail.com>
Wed, 11 Jul 2018 17:18:01 +0000 (17:18 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Wed, 11 Jul 2018 17:18:01 +0000 (17:18 +0000)
commitc094d23f6f23a2bec0c7aa00a7113bee456f78c5
tree7a8ad3568fa360199085ffd7e8b49ebb6a8097bc
parent3f27e57adeb5fc262e07c191eca07f28977a1f3b
Allow specifying an exit code for the 'quit' command

Summary:
This patch adds the possibility to specify an exit code when calling quit.
We accept any int, even though it depends on the user what happens if the int is
out of the range of what the operating system supports as exit codes.

Fixes rdar://problem/38452312

Reviewers: davide, jingham, clayborg

Reviewed By: jingham

Subscribers: clayborg, jingham, lldb-commits

Differential Revision: https://reviews.llvm.org/D48659

llvm-svn: 336824
19 files changed:
lldb/include/lldb/API/SBCommandInterpreter.h
lldb/include/lldb/Interpreter/CommandInterpreter.h
lldb/lit/Quit/TestQuitExitCode-30.test [new file with mode: 0644]
lldb/lit/Quit/TestQuitExitCode0.test [new file with mode: 0644]
lldb/lit/Quit/TestQuitExitCode30.test [new file with mode: 0644]
lldb/lit/Quit/TestQuitExitCodeHex0.test [new file with mode: 0644]
lldb/lit/Quit/TestQuitExitCodeHexA.test [new file with mode: 0644]
lldb/lit/Quit/TestQuitExitCodeImplicit0.test [new file with mode: 0644]
lldb/lit/Quit/TestQuitExitCodeNonInt.test [new file with mode: 0644]
lldb/lit/Quit/TestQuitExitCodeTooManyArgs.test [new file with mode: 0644]
lldb/lit/Quit/expect_exit_code.py [new file with mode: 0755]
lldb/lit/Quit/lit.local.cfg [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/quit/TestQuit.py [new file with mode: 0644]
lldb/scripts/interface/SBCommandInterpreter.i
lldb/source/API/SBCommandInterpreter.cpp
lldb/source/Commands/CommandObjectQuit.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/tools/driver/Driver.cpp
lldb/tools/driver/Driver.h