public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [review] Avoid ARI warnings with #include
@ 2019-12-05 15:51 Tom Tromey (Code Review)
  2019-12-05 16:55 ` Pedro Alves (Code Review)
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-05 15:51 UTC (permalink / raw)
  To: gdb-patches

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/746
......................................................................

Avoid ARI warnings with #include

ARI will complain about the use of certain include files, but in
isolated spots, these includes are actually necessary.  This patch
marks these spots to silence ARI.

gdb/ChangeLog
2019-12-05  Tom Tromey  <tromey@adacore.com>

	* gdb_regex.h: Add ARI comments.
	* gdb_vfork.h: Add ARI comment.

Change-Id: I215683952dec75379ea0a259e79c8dafbae210b9
---
M gdb/ChangeLog
M gdb/gdb_regex.h
M gdb/gdb_vfork.h
3 files changed, 8 insertions(+), 3 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fe81ff8..aa7e9ab 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-12-05  Tom Tromey  <tromey@adacore.com>
 
+	* gdb_regex.h: Add ARI comments.
+	* gdb_vfork.h: Add ARI comment.
+
+2019-12-05  Tom Tromey  <tromey@adacore.com>
+
 	* target-float.c (host_float_ops<T>::from_target): Add ARI
 	comment.
 
diff --git a/gdb/gdb_regex.h b/gdb/gdb_regex.h
index 58a0f22..5b81642 100644
--- a/gdb/gdb_regex.h
+++ b/gdb/gdb_regex.h
@@ -20,11 +20,11 @@
 #define GDB_REGEX_H 1
 
 #ifdef USE_INCLUDED_REGEX
-# include "xregex.h"
+# include "xregex.h"		/* ARI: xregex.h */
 #else
 /* Request 4.2 BSD regex functions.  */
 # define _REGEX_RE_COMP
-# include <regex.h>
+# include <regex.h>		/* ARI: regex.h */
 #endif
 
 /* A compiled regex.  This is mainly a wrapper around regex_t.  The
diff --git a/gdb/gdb_vfork.h b/gdb/gdb_vfork.h
index 8bf72d6..b76776b 100644
--- a/gdb/gdb_vfork.h
+++ b/gdb/gdb_vfork.h
@@ -20,7 +20,7 @@
 #define GDB_VFORK_H
 
 #if HAVE_VFORK_H
-#include <vfork.h>
+#include <vfork.h>		/* ARI: vfork.h */
 #endif
 
 #endif /* GDB_VFORK_H */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I215683952dec75379ea0a259e79c8dafbae210b9
Gerrit-Change-Number: 746
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange

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

* [review] Avoid ARI warnings with #include
  2019-12-05 15:51 [review] Avoid ARI warnings with #include Tom Tromey (Code Review)
@ 2019-12-05 16:55 ` Pedro Alves (Code Review)
  2019-12-05 16:57 ` Pedro Alves (Code Review)
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Pedro Alves (Code Review) @ 2019-12-05 16:55 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

Pedro Alves has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/746
......................................................................


Patch Set 1:

(1 comment)

| --- gdb/gdb_vfork.h
| +++ gdb/gdb_vfork.h
| @@ -13,14 +13,14 @@ /* GDB-friendly replacement for <vfork.h>.
|     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
|     GNU General Public License for more details.
|  
|     You should have received a copy of the GNU General Public License
|     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
|  
|  #ifndef GDB_VFORK_H
|  #define GDB_VFORK_H
|  
|  #if HAVE_VFORK_H
| -#include <vfork.h>
| +#include <vfork.h>		/* ARI: vfork.h */
|  #endif

PS1, Line 24:

Isn't this:

 BEGIN { doc["vfork.h"] = "\
 Do not include vfork.h, instead include gdb_vfork.h"
     fix("vfork.h", "gdb/gdb_vfork.h", 1);
                     ^^^^^^^^^^^^^^^
     category["vfork.h"] = ari_regression
 }

... supposed to suppress this case?

Same for the gdb_regex.h file.

|  
|  #endif /* GDB_VFORK_H */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I215683952dec75379ea0a259e79c8dafbae210b9
Gerrit-Change-Number: 746
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Thu, 05 Dec 2019 16:55:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

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

* [review] Avoid ARI warnings with #include
  2019-12-05 15:51 [review] Avoid ARI warnings with #include Tom Tromey (Code Review)
  2019-12-05 16:55 ` Pedro Alves (Code Review)
@ 2019-12-05 16:57 ` Pedro Alves (Code Review)
  2019-12-12 17:22 ` Tom Tromey (Code Review)
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Pedro Alves (Code Review) @ 2019-12-05 16:57 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

Pedro Alves has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/746
......................................................................


Patch Set 1:

(1 comment)

| --- gdb/gdb_vfork.h
| +++ gdb/gdb_vfork.h
| @@ -13,14 +13,14 @@ /* GDB-friendly replacement for <vfork.h>.
|     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
|     GNU General Public License for more details.
|  
|     You should have received a copy of the GNU General Public License
|     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
|  
|  #ifndef GDB_VFORK_H
|  #define GDB_VFORK_H
|  
|  #if HAVE_VFORK_H
| -#include <vfork.h>
| +#include <vfork.h>		/* ARI: vfork.h */
|  #endif

PS1, Line 24:

> Isn't this:
...
> ... supposed to suppress this case?

Note, I wouldn't be opposed to always tag in the header file directly.
But in that case, it seems like the patch should remove the fix() call
from
the ARI at the same time.

But I'm curious why that isn't working.

|  
|  #endif /* GDB_VFORK_H */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I215683952dec75379ea0a259e79c8dafbae210b9
Gerrit-Change-Number: 746
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Thu, 05 Dec 2019 16:57:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Pedro Alves <palves@redhat.com>
Gerrit-MessageType: comment

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

* [review] Avoid ARI warnings with #include
  2019-12-05 15:51 [review] Avoid ARI warnings with #include Tom Tromey (Code Review)
  2019-12-05 16:55 ` Pedro Alves (Code Review)
  2019-12-05 16:57 ` Pedro Alves (Code Review)
@ 2019-12-12 17:22 ` Tom Tromey (Code Review)
  2019-12-13 14:35 ` Pedro Alves (Code Review)
  2019-12-16 19:23 ` Tom Tromey (Code Review)
  4 siblings, 0 replies; 6+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-12 17:22 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pedro Alves

Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/746
......................................................................


Patch Set 1:

(1 comment)

| --- gdb/gdb_vfork.h
| +++ gdb/gdb_vfork.h
| @@ -13,14 +13,14 @@ /* GDB-friendly replacement for <vfork.h>.
|     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
|     GNU General Public License for more details.
|  
|     You should have received a copy of the GNU General Public License
|     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
|  
|  #ifndef GDB_VFORK_H
|  #define GDB_VFORK_H
|  
|  #if HAVE_VFORK_H
| -#include <vfork.h>
| +#include <vfork.h>		/* ARI: vfork.h */
|  #endif

PS1, Line 24:

> > Isn't this:
> ...
> > ... supposed to suppress this case?
> 
> Note, I wouldn't be opposed to always tag in the header file directly.
> But in that case, it seems like the patch should remove the fix() call from
> the ARI at the same time.
> 
> But I'm curious why that isn't working.

I ran it incorrectly -- I ran it from the gdb directory, but actually
you have to run it from the top-level source directory, so that the
paths match.  This is one reason I think removing the fix() calls
in favor of explicit annotations is better.

|  
|  #endif /* GDB_VFORK_H */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I215683952dec75379ea0a259e79c8dafbae210b9
Gerrit-Change-Number: 746
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Thu, 12 Dec 2019 17:22:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Pedro Alves <palves@redhat.com>
Gerrit-MessageType: comment

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

* [review] Avoid ARI warnings with #include
  2019-12-05 15:51 [review] Avoid ARI warnings with #include Tom Tromey (Code Review)
                   ` (2 preceding siblings ...)
  2019-12-12 17:22 ` Tom Tromey (Code Review)
@ 2019-12-13 14:35 ` Pedro Alves (Code Review)
  2019-12-16 19:23 ` Tom Tromey (Code Review)
  4 siblings, 0 replies; 6+ messages in thread
From: Pedro Alves (Code Review) @ 2019-12-13 14:35 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

Pedro Alves has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/746
......................................................................


Patch Set 1:

(1 comment)

| --- gdb/gdb_vfork.h
| +++ gdb/gdb_vfork.h
| @@ -13,14 +13,14 @@ /* GDB-friendly replacement for <vfork.h>.
|     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
|     GNU General Public License for more details.
|  
|     You should have received a copy of the GNU General Public License
|     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
|  
|  #ifndef GDB_VFORK_H
|  #define GDB_VFORK_H
|  
|  #if HAVE_VFORK_H
| -#include <vfork.h>
| +#include <vfork.h>		/* ARI: vfork.h */
|  #endif

PS1, Line 24:

> > Note, I wouldn't be opposed to always tag in the header file directly.
> > But in that case, it seems like the patch should remove the fix() call from
> > the ARI at the same time.
> > 
> > But I'm curious why that isn't working.
> 
> I ran it incorrectly -- I ran it from the gdb directory, but actually
> you have to run it from the top-level source directory, so that the
> paths match.  This is one reason I think removing the fix() calls
> in favor of explicit annotations is better.

Yeah, let's remove the fix() calls.

|  
|  #endif /* GDB_VFORK_H */

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I215683952dec75379ea0a259e79c8dafbae210b9
Gerrit-Change-Number: 746
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Fri, 13 Dec 2019 14:35:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Pedro Alves <palves@redhat.com>
Comment-In-Reply-To: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: comment

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

* [review] Avoid ARI warnings with #include
  2019-12-05 15:51 [review] Avoid ARI warnings with #include Tom Tromey (Code Review)
                   ` (3 preceding siblings ...)
  2019-12-13 14:35 ` Pedro Alves (Code Review)
@ 2019-12-16 19:23 ` Tom Tromey (Code Review)
  4 siblings, 0 replies; 6+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-16 19:23 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pedro Alves

Tom Tromey has abandoned this change. ( https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/746 )

Change subject: Avoid ARI warnings with #include
......................................................................


Abandoned

I dropped this one for the time being.
-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I215683952dec75379ea0a259e79c8dafbae210b9
Gerrit-Change-Number: 746
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Pedro Alves <palves@redhat.com>
Gerrit-MessageType: abandon

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

end of thread, other threads:[~2019-12-16 19:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 15:51 [review] Avoid ARI warnings with #include Tom Tromey (Code Review)
2019-12-05 16:55 ` Pedro Alves (Code Review)
2019-12-05 16:57 ` Pedro Alves (Code Review)
2019-12-12 17:22 ` Tom Tromey (Code Review)
2019-12-13 14:35 ` Pedro Alves (Code Review)
2019-12-16 19:23 ` Tom Tromey (Code Review)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).