From dd98145bc182af39645ba6bea0e5441afd84a1d3 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sat, 6 Oct 2012 23:48:07 +0200 Subject: 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 http://sourceware.org/ml/crossgcc/2012-09/msg00144.html Signed-off-by: Johannes Stezenbach [yann.morin.1998@free.fr: integrate in the fault handler] Signed-off-by: "Yann E. MORIN" Acked-by: Johannes Stezenbach Patchwork-Id: 191571 Patchwork-Id: 191668 --- config/global/ct-behave.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'config/global') 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 -- cgit v1.2.3