diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-10 15:52:03 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-10 15:52:03 +0000 |
commit | 1091a9c04b818afe9a9c44081dec7c02b92b5a1e (patch) | |
tree | 36fbfe2ebbad57643afcb95c1fd96730e58b7077 /contrib | |
parent | 06308d2a85476f04a2a7249256a2ccccac9c4fd7 (diff) | |
download | gcc-1091a9c04b818afe9a9c44081dec7c02b92b5a1e.tar.gz |
This patch adds two common shortcuts to the failure reproducer
script.
Committed to trunk.
2012-02-10 Diego Novillo <dnovillo@google.com>
* repro_fail: Add --debug and --debug-tui flags.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184097 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ChangeLog | 4 | ||||
-rwxr-xr-x | contrib/repro_fail | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index a639b07405c..6e926884542 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2012-02-10 Diego Novillo <dnovillo@google.com> + + * repro_fail: Add --debug and --debug-tui flags. + 2012-02-02 Sumanth G <sumanth.gundapaneni@kpitcummins.com> Jayant R Sonar <jayant.sonar@kpitcummins.com> diff --git a/contrib/repro_fail b/contrib/repro_fail index 8100456ac62..c55d080951f 100755 --- a/contrib/repro_fail +++ b/contrib/repro_fail @@ -31,14 +31,26 @@ # command, it asks which one you want. if [ $# -lt 2 ] ; then - echo "usage: $0 pattern file.log [additional-args]" + echo "usage: $0 [--debug|--debug-tui] pattern file.log [additional-args]" echo echo "Finds the 'spawn' line matching PATTERN in FILE.LOG and executes" echo "the command with any arguments in ADDITIONAL-ARGS." echo + echo "If --debug is used, the compiler is invoked with -wrapper gdb,--args" + echo "If --debug-tui is used, the compiler is invoked with -wrapper "\ + "gdb,--tui,--args" exit 1 fi +if [ "$1" == "--debug" ] ; then + debug_args="-wrapper gdb,--args" + shift +elif [ "$1" == "--debug-tui" ] ; then + debug_args="-wrapper gdb,--tui,--args" + shift +else + debug_args="" +fi pattern="$1" logf="$2" shift 2 @@ -77,6 +89,6 @@ IFS="$old_IFS" for cmd_num in $cmds_to_run ; do cmd=${commands[$cmd_num]} set -x +e - $cmd "$@" + $cmd $debug_args "$@" set +x -e done |