From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22990 invoked by alias); 20 May 2010 21:07:52 -0000 Received: (qmail 22847 invoked by uid 22791); 20 May 2010 21:07:51 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.152) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 May 2010 21:07:45 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o4KL7gso084904 for ; Thu, 20 May 2010 23:07:42 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o4KL7gJW086680 for ; Thu, 20 May 2010 23:07:42 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o4KL7eVd096737 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 20 May 2010 23:07:41 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [PING] [RFC] Extend gdb_ari.sh with ARI_OFF/ARI_ON Date: Thu, 20 May 2010 21:13:00 -0000 Message-ID: <000f01caf860$7e5f63d0$7b1e2b70$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00448.txt.bz2 Noone reacted to that proposal yet... Pierre as ARI maintainer. -----Message d'origine----- De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] De la part de Pierre Muller Envoy=E9=A0: Monday, May 10, 2010 11:01 AM =C0=A0: gdb-patches@sourceware.org Objet=A0: [RFC] Extend gdb_ari.sh with ARI_OFF/ARI_ON This patch to ss/gdb_ari.sh would allow to turn off a specific rule for a given file until it is, optionally turned on again. I had this idea after the discussion about editCase function rule, for which it appeared that adding /*ARI: editCase function */ inside each declaration using mixed case was too disturbing. We this new patch, we can disable all 8 warnings of windows-nat.c by adding just two lines: /* ARI_OFF: editCase function */ and /* ARI_ON: editCase function */ at the start and the end of the list of bad_MixedFunctionNameSameAsWindowsAPI list. Comments? Pierre Muller Pascal language support maintainer for GDB as ARI maintainer. $ cvs diff -u -p gdb_ari.sh Index: gdb_ari.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/gdbadmin/ss/gdb_ari.sh,v retrieving revision 1.104 diff -u -p -r1.104 gdb_ari.sh --- gdb_ari.sh 4 May 2010 23:20:37 -0000 1.104 +++ gdb_ari.sh 10 May 2010 08:53:32 -0000 @@ -154,7 +154,7 @@ function fail(bug,supplement) { exit } - if (ARI_OK =3D=3D bug) { + if ((ARI_OK =3D=3D bug) ||(bug in ari_off)) { return } # Trim the filename down to just DIRECTORY/FILE so that it can be @@ -217,6 +217,7 @@ END { BEGIN { ARI_OK =3D "" + delete ari_off } /\/\* ARI:[[:space:]]*(.*)[[:space:]]*\*\// { @@ -228,6 +229,20 @@ BEGIN { ARI_OK =3D "" } +/\/\* ARI_OFF:[[:space:]]*(.*)[[:space:]]*\*\// { + off_bug =3D gensub(/^.*\/\* ARI_OFF:[[:space:]]*(.*[^[:space:]])[[:space:]]*\*\/.*$/, "\\1", 1, $0) + # print "ARI_OFF \"" off_bug "\"" + ari_off[off_bug] =3D 1 +} + +/\/\* ARI_ON:[[:space:]]*(.*)[[:space:]]*\*\// { + on_bug =3D gensub(/^.*\/\* ARI_ON:[[:space:]]*(.*[^[:space:]])[[:space:]]*\*\/.*$/, "\\1", 1, $0) + # print "ARI_ON \"" on_bug "\"" + if (on_bug in ari_off) { + delete ari_off[on_bug] + } +} + # Things in comments Example of ARI editCase fix for windows-nat.c Index: windows-nat.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/windows-nat.c,v retrieving revision 1.208 diff -u -p -r1.208 windows-nat.c --- windows-nat.c 16 Apr 2010 07:49:35 -0000 1.208 +++ windows-nat.c 10 May 2010 09:00:00 -0000 @@ -2522,7 +2522,8 @@ _initialize_check_for_gdb_ini (void) } /* Define dummy functions which always return error for the rare cases where - these functions could not be found. */ + these functions could not be found. */ +/* ARI_OFF: editCase function */ static BOOL WINAPI bad_DebugActiveProcessStop (DWORD w) { @@ -2569,6 +2570,7 @@ bad_OpenProcessToken (HANDLE w, DWORD x, { return FALSE; } +/* ARI_ON: editCase function */ /* Load any functions which may not be available in ancient versions of Windows. */