From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31032 invoked by alias); 8 May 2013 20:38:46 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 31012 invoked by uid 306); 8 May 2013 20:38:46 -0000 Date: Wed, 08 May 2013 20:38:00 -0000 Message-ID: <20130508203845.30980.qmail@sourceware.org> From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] tromey/cleanup-checker: add argument processing to gcc-with-excheck X-Git-Refname: refs/heads/tromey/cleanup-checker X-Git-Reftype: branch X-Git-Oldrev: f5d8768064370f71e441a6dd3e36c0a655a4909d X-Git-Newrev: 1e7f1c853c0909e2cf49a4fdb7092625cfb3b638 X-SW-Source: 2013-q2/txt/msg00058.txt.bz2 List-Id: The branch, tromey/cleanup-checker has been updated via 1e7f1c853c0909e2cf49a4fdb7092625cfb3b638 (commit) from f5d8768064370f71e441a6dd3e36c0a655a4909d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 1e7f1c853c0909e2cf49a4fdb7092625cfb3b638 Author: Tom Tromey Date: Wed May 8 14:26:57 2013 -0600 add argument processing to gcc-with-excheck ----------------------------------------------------------------------- Summary of changes: gdb/contrib/gcc-with-excheck | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) First 500 lines of diff: diff --git a/gdb/contrib/gcc-with-excheck b/gdb/contrib/gcc-with-excheck index b810878..da144ac 100755 --- a/gdb/contrib/gcc-with-excheck +++ b/gdb/contrib/gcc-with-excheck @@ -17,12 +17,42 @@ # You must set PYTHON_PLUGIN in the environment. # It should be the directory holding the "python.so" file. +# Usage: gcc-with-excheck [-Xx|-Xc] [--] ARGS +# -Xx means to invoke the exception checker. +# -Xc means to invoke the cleanup checker. +# -- means stop processing -X options. +# ARGS are passed to gcc. +GCC=${GCC:-gcc} exdir=`dirname $0` +pargs= +while true; do + case "$1" in + -Xc) + pargs="$pargs -fplugin-arg-python-script=$exdir/cleanup_check.py" + ;; + -Xx) + pargs="$pargs -fplugin-arg-python-script=$exdir/excheck.py" + ;; + -X*) + echo "unrecognized argument $1" 1>&2 + exit 1 + ;; + --) + shift + break + ;; + *) + break + ;; + esac + shift +done + # Recent versions of the Python plugin build two .so files in # different directories, so we have to set this. This will be fixed # upstream at some point. export LD_LIBRARY_PATH=$PYTHON_PLUGIN:$PYTHON_PLUGIN/gcc-c-api -gcc -fplugin=$PYTHON_PLUGIN/python.so -fplugin-arg-python-script=$exdir/excheck.py "$@" +gcc -fplugin=$PYTHON_PLUGIN/python.so $pargs "$@" hooks/post-receive -- Repository for Project Archer.