public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [review] Remove ARI check for multiple calls to warning or error
@ 2019-12-12 17:51 Tom Tromey (Code Review)
  2019-12-13 14:27 ` Pedro Alves (Code Review)
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-12 17:51 UTC (permalink / raw)
  To: gdb-patches

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

Remove ARI check for multiple calls to warning or error

ARI has a check for multiple calls to warning or error, suggesting
that they be combined into a single call.  This triggers at three
places in gdb, and after examining these, I think they all make sense
as-is.  Instead, it makes sense to remove this check from ARI.

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

	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
	warning or error.

Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d
---
M gdb/ChangeLog
M gdb/contrib/ari/gdb_ari.sh
2 files changed, 5 insertions(+), 15 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2911956..3453b07 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-12-12  Tom Tromey  <tromey@adacore.com>
 
+	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
+	warning or error.
+
+2019-12-12  Tom Tromey  <tromey@adacore.com>
+
 	* contrib/ari/gdb_ari.sh: Remove call to "fix" for "long long".
 
 2019-12-05  Tom Tromey  <tromey@adacore.com>
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh
index 5f05890..3ed9116 100755
--- a/gdb/contrib/ari/gdb_ari.sh
+++ b/gdb/contrib/ari/gdb_ari.sh
@@ -619,21 +619,6 @@
 
 # General problems
 
-BEGIN { doc["multiple messages"] = "\
-Do not use multiple calls to warning or error, instead use a single call"
-    category["multiple messages"] = ari_gettext
-}
-FNR == 1 {
-    warning_fnr = -1
-}
-/(^|[^_[:alnum:]])(warning|error)[[:space:]]*\(/ {
-    if (FNR == warning_fnr + 1) {
-	fail("multiple messages")
-    } else {
-	warning_fnr = FNR
-    }
-}
-
 # Commented out, but left inside sources, just in case.
 # BEGIN { doc["inline"] = "\
 # Do not use the inline attribute; \

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

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

* [review] Remove ARI check for multiple calls to warning or error
  2019-12-12 17:51 [review] Remove ARI check for multiple calls to warning or error Tom Tromey (Code Review)
@ 2019-12-13 14:27 ` Pedro Alves (Code Review)
  2019-12-13 19:24 ` Tom Tromey (Code Review)
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Pedro Alves (Code Review) @ 2019-12-13 14:27 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/+/756
......................................................................


Patch Set 1:

(1 comment)

| --- /dev/null
| +++ /COMMIT_MSG
| @@ -1,0 +1,20 @@ 
| +Parent:     0ecf9a76 (Remove "fix" call for "long long" from ARI)
| +Author:     Tom Tromey <tromey@adacore.com>
| +AuthorDate: 2019-12-12 10:40:08 -0700
| +Commit:     Tom Tromey <tromey@adacore.com>
| +CommitDate: 2019-12-12 10:40:08 -0700
| +
| +Remove ARI check for multiple calls to warning or error
| +
| +ARI has a check for multiple calls to warning or error, suggesting
| +that they be combined into a single call.  This triggers at three
| +places in gdb, and after examining these, I think they all make sense
| +as-is.  Instead, it makes sense to remove this check from ARI.

PS1, Line 12:

What are these places?

| +
| +gdb/ChangeLog
| +2019-12-12  Tom Tromey  <tromey@adacore.com>
| +
| +	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
| +	warning or error.
| +
| +Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d
Gerrit-Change-Number: 756
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Fri, 13 Dec 2019 14:27:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

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

* [review] Remove ARI check for multiple calls to warning or error
  2019-12-12 17:51 [review] Remove ARI check for multiple calls to warning or error Tom Tromey (Code Review)
  2019-12-13 14:27 ` Pedro Alves (Code Review)
@ 2019-12-13 19:24 ` Tom Tromey (Code Review)
  2019-12-13 20:41 ` Pedro Alves (Code Review)
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-13 19:24 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/+/756
......................................................................


Patch Set 1:

(1 comment)

| --- /dev/null
| +++ /COMMIT_MSG
| @@ -1,0 +1,20 @@ 
| +Parent:     0ecf9a76 (Remove "fix" call for "long long" from ARI)
| +Author:     Tom Tromey <tromey@adacore.com>
| +AuthorDate: 2019-12-12 10:40:08 -0700
| +Commit:     Tom Tromey <tromey@adacore.com>
| +CommitDate: 2019-12-12 10:40:08 -0700
| +
| +Remove ARI check for multiple calls to warning or error
| +
| +ARI has a check for multiple calls to warning or error, suggesting
| +that they be combined into a single call.  This triggers at three
| +places in gdb, and after examining these, I think they all make sense
| +as-is.  Instead, it makes sense to remove this check from ARI.

PS1, Line 12:

> What are these places?

See throw_bad_regnum_error, guile_repl_command, and the end of
value_cast

| +
| +gdb/ChangeLog
| +2019-12-12  Tom Tromey  <tromey@adacore.com>
| +
| +	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
| +	warning or error.
| +
| +Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d
Gerrit-Change-Number: 756
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 19:24:37 +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] 7+ messages in thread

* [review] Remove ARI check for multiple calls to warning or error
  2019-12-12 17:51 [review] Remove ARI check for multiple calls to warning or error Tom Tromey (Code Review)
  2019-12-13 14:27 ` Pedro Alves (Code Review)
  2019-12-13 19:24 ` Tom Tromey (Code Review)
@ 2019-12-13 20:41 ` Pedro Alves (Code Review)
  2019-12-13 22:15 ` Tom Tromey (Code Review)
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Pedro Alves (Code Review) @ 2019-12-13 20:41 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/+/756
......................................................................


Patch Set 1: Code-Review+2

(1 comment)

| --- /dev/null
| +++ /COMMIT_MSG
| @@ -1,0 +1,20 @@ 
| +Parent:     0ecf9a76 (Remove "fix" call for "long long" from ARI)
| +Author:     Tom Tromey <tromey@adacore.com>
| +AuthorDate: 2019-12-12 10:40:08 -0700
| +Commit:     Tom Tromey <tromey@adacore.com>
| +CommitDate: 2019-12-12 10:40:08 -0700
| +
| +Remove ARI check for multiple calls to warning or error
| +
| +ARI has a check for multiple calls to warning or error, suggesting
| +that they be combined into a single call.  This triggers at three
| +places in gdb, and after examining these, I think they all make sense
| +as-is.  Instead, it makes sense to remove this check from ARI.

PS1, Line 12:

> > What are these places?
> 
> See throw_bad_regnum_error, guile_repl_command, and the end of value_cast

Thanks.  (It'd be nice to have them mentioned in the commit log.)

| +
| +gdb/ChangeLog
| +2019-12-12  Tom Tromey  <tromey@adacore.com>
| +
| +	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
| +	warning or error.
| +
| +Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d
Gerrit-Change-Number: 756
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Fri, 13 Dec 2019 20:41:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
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] 7+ messages in thread

* [review] Remove ARI check for multiple calls to warning or error
  2019-12-12 17:51 [review] Remove ARI check for multiple calls to warning or error Tom Tromey (Code Review)
                   ` (2 preceding siblings ...)
  2019-12-13 20:41 ` Pedro Alves (Code Review)
@ 2019-12-13 22:15 ` Tom Tromey (Code Review)
  2019-12-13 22:17 ` [pushed] " Sourceware to Gerrit sync (Code Review)
  2019-12-13 22:23 ` Sourceware to Gerrit sync (Code Review)
  5 siblings, 0 replies; 7+ messages in thread
From: Tom Tromey (Code Review) @ 2019-12-13 22:15 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/+/756
......................................................................


Patch Set 1:

(1 comment)

| --- /dev/null
| +++ /COMMIT_MSG
| @@ -1,0 +1,20 @@ 
| +Parent:     0ecf9a76 (Remove "fix" call for "long long" from ARI)
| +Author:     Tom Tromey <tromey@adacore.com>
| +AuthorDate: 2019-12-12 10:40:08 -0700
| +Commit:     Tom Tromey <tromey@adacore.com>
| +CommitDate: 2019-12-12 10:40:08 -0700
| +
| +Remove ARI check for multiple calls to warning or error
| +
| +ARI has a check for multiple calls to warning or error, suggesting
| +that they be combined into a single call.  This triggers at three
| +places in gdb, and after examining these, I think they all make sense
| +as-is.  Instead, it makes sense to remove this check from ARI.

PS1, Line 12:

> > > What are these places?
> > 
> > See throw_bad_regnum_error, guile_repl_command, and the end of value_cast
> 
> Thanks.  (It'd be nice to have them mentioned in the commit log.)

I've made this change, and I'm going to push this series.
There's still some more work to be done before ARI is really
reliable.  What I'd like is if we could make it an ordinary
part of the build somehow, so we don't get these warnings
only after pushing.

| +
| +gdb/ChangeLog
| +2019-12-12  Tom Tromey  <tromey@adacore.com>
| +
| +	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
| +	warning or error.
| +
| +Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d
Gerrit-Change-Number: 756
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Fri, 13 Dec 2019 22:15:16 +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] 7+ messages in thread

* [pushed] Remove ARI check for multiple calls to warning or error
  2019-12-12 17:51 [review] Remove ARI check for multiple calls to warning or error Tom Tromey (Code Review)
                   ` (3 preceding siblings ...)
  2019-12-13 22:15 ` Tom Tromey (Code Review)
@ 2019-12-13 22:17 ` Sourceware to Gerrit sync (Code Review)
  2019-12-13 22:23 ` Sourceware to Gerrit sync (Code Review)
  5 siblings, 0 replies; 7+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-12-13 22:17 UTC (permalink / raw)
  To: Tom Tromey, Pedro Alves, gdb-patches

The original change was created by Tom Tromey.

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

Remove ARI check for multiple calls to warning or error

ARI has a check for multiple calls to warning or error, suggesting
that they be combined into a single call.  This triggers at three
places in gdb -- throw_bad_regnum_error, guile_repl_command, and the
end of value_cast -- and after examining these, I think they all make
sense as-is.  Instead, it makes sense to remove this check from ARI.

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

	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
	warning or error.

Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d
---
M gdb/ChangeLog
M gdb/contrib/ari/gdb_ari.sh
2 files changed, 5 insertions(+), 15 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 90c3742..7d4f982 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-12-13  Tom Tromey  <tromey@adacore.com>
 
+	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
+	warning or error.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
 	* contrib/ari/gdb_ari.sh: Remove call to "fix" for "long long".
 
 2019-12-13  Tom Tromey  <tromey@adacore.com>
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh
index 5f05890..3ed9116 100755
--- a/gdb/contrib/ari/gdb_ari.sh
+++ b/gdb/contrib/ari/gdb_ari.sh
@@ -619,21 +619,6 @@
 
 # General problems
 
-BEGIN { doc["multiple messages"] = "\
-Do not use multiple calls to warning or error, instead use a single call"
-    category["multiple messages"] = ari_gettext
-}
-FNR == 1 {
-    warning_fnr = -1
-}
-/(^|[^_[:alnum:]])(warning|error)[[:space:]]*\(/ {
-    if (FNR == warning_fnr + 1) {
-	fail("multiple messages")
-    } else {
-	warning_fnr = FNR
-    }
-}
-
 # Commented out, but left inside sources, just in case.
 # BEGIN { doc["inline"] = "\
 # Do not use the inline attribute; \

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d
Gerrit-Change-Number: 756
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset

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

* [pushed] Remove ARI check for multiple calls to warning or error
  2019-12-12 17:51 [review] Remove ARI check for multiple calls to warning or error Tom Tromey (Code Review)
                   ` (4 preceding siblings ...)
  2019-12-13 22:17 ` [pushed] " Sourceware to Gerrit sync (Code Review)
@ 2019-12-13 22:23 ` Sourceware to Gerrit sync (Code Review)
  5 siblings, 0 replies; 7+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-12-13 22:23 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches; +Cc: Pedro Alves

Sourceware to Gerrit sync has submitted this change.

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

Remove ARI check for multiple calls to warning or error

ARI has a check for multiple calls to warning or error, suggesting
that they be combined into a single call.  This triggers at three
places in gdb -- throw_bad_regnum_error, guile_repl_command, and the
end of value_cast -- and after examining these, I think they all make
sense as-is.  Instead, it makes sense to remove this check from ARI.

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

	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
	warning or error.

Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d
---
M gdb/ChangeLog
M gdb/contrib/ari/gdb_ari.sh
2 files changed, 5 insertions(+), 15 deletions(-)


diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 90c3742..7d4f982 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-12-13  Tom Tromey  <tromey@adacore.com>
 
+	* contrib/ari/gdb_ari.sh: Remove check for multiple calls to
+	warning or error.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
 	* contrib/ari/gdb_ari.sh: Remove call to "fix" for "long long".
 
 2019-12-13  Tom Tromey  <tromey@adacore.com>
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh
index 5f05890..3ed9116 100755
--- a/gdb/contrib/ari/gdb_ari.sh
+++ b/gdb/contrib/ari/gdb_ari.sh
@@ -619,21 +619,6 @@
 
 # General problems
 
-BEGIN { doc["multiple messages"] = "\
-Do not use multiple calls to warning or error, instead use a single call"
-    category["multiple messages"] = ari_gettext
-}
-FNR == 1 {
-    warning_fnr = -1
-}
-/(^|[^_[:alnum:]])(warning|error)[[:space:]]*\(/ {
-    if (FNR == warning_fnr + 1) {
-	fail("multiple messages")
-    } else {
-	warning_fnr = FNR
-    }
-}
-
 # Commented out, but left inside sources, just in case.
 # BEGIN { doc["inline"] = "\
 # Do not use the inline attribute; \

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I0618683623a3c7324460c7b9e5d7f252d88c2e8d
Gerrit-Change-Number: 756
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: merged

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12 17:51 [review] Remove ARI check for multiple calls to warning or error Tom Tromey (Code Review)
2019-12-13 14:27 ` Pedro Alves (Code Review)
2019-12-13 19:24 ` Tom Tromey (Code Review)
2019-12-13 20:41 ` Pedro Alves (Code Review)
2019-12-13 22:15 ` Tom Tromey (Code Review)
2019-12-13 22:17 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-13 22:23 ` Sourceware to Gerrit sync (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).