Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PING] [RFC] Extend gdb_ari.sh with ARI_OFF/ARI_ON
@ 2010-05-20 21:13 Pierre Muller
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2010-05-20 21:13 UTC (permalink / raw)
  To: gdb-patches

 Noone reacted to that proposal yet...

Pierre
as ARI maintainer.

-----Message d'origine-----
De : gdb-patches-owner@sourceware.org
[mailto:gdb-patches-owner@sourceware.org] De la part de Pierre Muller
Envoyé : Monday, May 10, 2010 11:01 AM
À : gdb-patches@sourceware.org
Objet : [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
===================================================================
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 == bug) {
+    if ((ARI_OK == 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 = ""
+    delete ari_off
 }

 /\/\* ARI:[[:space:]]*(.*)[[:space:]]*\*\// {
@@ -228,6 +229,20 @@ BEGIN {
     ARI_OK = ""
 }

+/\/\* ARI_OFF:[[:space:]]*(.*)[[:space:]]*\*\// {
+    off_bug = gensub(/^.*\/\*
ARI_OFF:[[:space:]]*(.*[^[:space:]])[[:space:]]*\*\/.*$/, "\\1", 1, $0)
+    # print "ARI_OFF \"" off_bug "\""
+    ari_off[off_bug] = 1
+}
+
+/\/\* ARI_ON:[[:space:]]*(.*)[[:space:]]*\*\// {
+    on_bug = 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
===================================================================
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. */



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-21 16:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <10524.3587088355$1274389681@news.gmane.org>
2010-05-21 16:22 ` [PING] [RFC] Extend gdb_ari.sh with ARI_OFF/ARI_ON Tom Tromey
2010-05-21 16:25   ` Pierre Muller
     [not found]   ` <37953.9021793336$1274458961@news.gmane.org>
2010-05-21 16:52     ` Tom Tromey
2010-05-20 21:13 Pierre Muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox