diff options
author | Yann E. MORIN" <yann.morin.1998@free.fr> | 2012-10-06 23:48:07 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@free.fr> | 2012-10-06 23:48:07 +0200 |
commit | dd98145bc182af39645ba6bea0e5441afd84a1d3 (patch) | |
tree | 757098117f03c960017353fbcbb20a08c077d2f6 /config | |
parent | df3be9eef3cc4e0b111d25d75b12fa5ed69a3c1d (diff) | |
download | crosstool-ng-dd98145bc182af39645ba6bea0e5441afd84a1d3.tar.gz crosstool-ng-dd98145bc182af39645ba6bea0e5441afd84a1d3.tar.bz2 crosstool-ng-dd98145bc182af39645ba6bea0e5441afd84a1d3.zip |
scripts: add option to start an interactive debug shell
Add an option that, when a command fails:
- starts an interactive shell with the failed command's environment
- attempts re-execution of the failed command, continues, or aborts
at user's whim.
Before starting the debug-shell, the backtrace is printed.
When exiting for an abort, the standard error message is printed.
Based on an idea and a patch from: Johannes Stezenbach <js@sig21.net>
http://sourceware.org/ml/crossgcc/2012-09/msg00144.html
Signed-off-by: Johannes Stezenbach <js@sig21.net>
[yann.morin.1998@free.fr: integrate in the fault handler]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Johannes Stezenbach <js@sig21.net>
Patchwork-Id: 191571
Patchwork-Id: 191668
Diffstat (limited to 'config')
-rw-r--r-- | config/global/ct-behave.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/config/global/ct-behave.in b/config/global/ct-behave.in index bbe4324f..6256a34e 100644 --- a/config/global/ct-behave.in +++ b/config/global/ct-behave.in @@ -87,4 +87,23 @@ config NO_OVERIDE_LC_MESSAGES Say N, please. +config DEBUG_INTERACTIVE + bool + prompt "Interactive shell on failed commands" + help + If you say 'y' here, then an interactive shell will be spawned for + each failed command. + + This shell will have the same environment that the failed command + was run with, and the working directory will be set to the directory + the failed command was run in. + + After you fix the issue, you can exit the interactive shell with any + of these exit codes: + 1 the issue was fixed, continue the build with the next command + 2 the issue was fixed, re-run the failed command + 3 abort the build + + Note: '2' is only possible for commands run via CT_DoExecLog, though. + endif |