* gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
[gcc.git] / contrib / repro_fail
index 8100456ac6295e450316864d70bd4f5914a9cff6..9ea79f2bccfced4217703e4077c2f53177341350 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # Contributed by Diego Novillo <dnovillo@google.com>
 #
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
 # 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
 
 # Find the commands in LOGF that reference PATTERN.
-lines=$(grep -E "^spawn .*$pattern" $logf | sed -e 's/^spawn //')
+lines=$(grep -E "^spawn .*$pattern" $logf \
+        | sed -e 's/^spawn -ignore SIGHUP //' \
+        | sed -e 's/^spawn //')
 if [ -z "$lines" ] ; then
     echo "Could not find a spawn command for pattern $pattern"
     exit 1
@@ -77,6 +91,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