From patchwork Fri Feb 10 15:54:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 140679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3D97CB6EE7 for ; Sat, 11 Feb 2012 02:54:54 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329494094; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Received:Received:Received:To: Subject:Message-Id:Date:From:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=KbBqj7l9FVTeJ9ucrPUDW5aGRtU=; b=OUTqBX8kQ4j/shP V20/rvj9x8+8Yi3+QRWoQFTk1t8YYEqEO0/CfMK+egZH2rDvgytWKu5GNMZ5CRZ2 8A7Eici+2/HSFFeHDIhGmhS9+Mhf2qA24Qj7paoOn3a+mFHy5Z+NTQrzoCUCHTnD V8PDcIQz9erNcDgBoTVsRXPqb3cc= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Received:Received:Received:To:Subject:Message-Id:Date:From:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=JsTvC3iDgGPFcjwHXZOMmuBr14Hem0FtwCNZXoHeVaQ0nYasutSxUs66JCRYQd 8pseROZZA9KvpKnVFxPA/xfB6ZnaVUk6+QHAdpu3Mjqej0BaUavjPifzufl30Hvb qmZMeyclWjgKChouh66ajj2WxGakrCEHLVLuRGrSeG7k8=; Received: (qmail 19092 invoked by alias); 10 Feb 2012 15:54:51 -0000 Received: (qmail 19082 invoked by uid 22791); 10 Feb 2012 15:54:50 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-gx0-f201.google.com (HELO mail-gx0-f201.google.com) (209.85.161.201) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Feb 2012 15:54:35 +0000 Received: by ggno5 with SMTP id o5so295969ggn.2 for ; Fri, 10 Feb 2012 07:54:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.101.172.7 with SMTP id z7mr4546186ano.10.1328889274974; Fri, 10 Feb 2012 07:54:34 -0800 (PST) Received: by 10.101.172.7 with SMTP id z7mr4546177ano.10.1328889274872; Fri, 10 Feb 2012 07:54:34 -0800 (PST) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id j12si3065099anp.0.2012.02.10.07.54.34 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 10 Feb 2012 07:54:34 -0800 (PST) Received: from topo.tor.corp.google.com (topo.tor.corp.google.com [172.29.41.2]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id C3A5A10004D; Fri, 10 Feb 2012 07:54:34 -0800 (PST) Received: by topo.tor.corp.google.com (Postfix, from userid 54752) id 1311E1DA1C1; Fri, 10 Feb 2012 10:54:33 -0500 (EST) To: reply@codereview.appspotmail.com,gcc-patches@gcc.gnu.org Subject: [contrib] Add a commonly used flag to repro_fail (issue5650057) Message-Id: <20120210155434.1311E1DA1C1@topo.tor.corp.google.com> Date: Fri, 10 Feb 2012 10:54:34 -0500 (EST) From: dnovillo@google.com (Diego Novillo) X-Gm-Message-State: ALoCoQlN1hdXBzXM4AUo5qlM3dQSzFW7irsTj9Xmu8I8cbY7yxj6Gy/k7r8eueYlgkmNpvmMLGWaQNViJCDAx9iiDkroZdC8N4twN9NZiXqyKIrqb/PIpzx7in9x/HvhJigrNXWTagc90zqnyGxWHcRckx8Jw92biWd7c0Q820iaw9C8SMZEBDA= X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch adds two common shortcuts to the failure reproducer script. Committed to trunk. 2012-02-10 Diego Novillo * repro_fail: Add --debug and --debug-tui flags. --- This patch is available for review at http://codereview.appspot.com/5650057 diff --git a/contrib/repro_fail b/contrib/repro_fail index 8100456..c55d080 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