From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <gdb-patches@sourceware.org>
Subject: [PING] [RFC] Extend gdb_ari.sh with ARI_OFF/ARI_ON
Date: Thu, 20 May 2010 21:13:00 -0000 [thread overview]
Message-ID: <000f01caf860$7e5f63d0$7b1e2b70$@muller@ics-cnrs.unistra.fr> (raw)
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. */
next reply other threads:[~2010-05-20 21:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-20 21:13 Pierre Muller [this message]
[not found] <10524.3587088355$1274389681@news.gmane.org>
2010-05-21 16:22 ` Tom Tromey
2010-05-21 16:25 ` Pierre Muller
[not found] ` <37953.9021793336$1274458961@news.gmane.org>
2010-05-21 16:52 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000f01caf860$7e5f63d0$7b1e2b70$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox