public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Sourceware to Gerrit sync (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: Tom Tromey <tromey@sourceware.org>,
	Pedro Alves <palves@redhat.com>,
	gdb-patches@sourceware.org
Subject: [pushed] Silence ARI for valid calls to abort
Date: Fri, 13 Dec 2019 22:17:00 -0000	[thread overview]
Message-ID: <20191213221709.2062C20AF6@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1575560698000.I09ce6aa5010bbe4e5bb73ffdb727481be39d34d6@gnutoolchain-gerrit.osci.io>

The original change was created by Tom Tromey.

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

Silence ARI for valid calls to abort

There are a handful of spots in gdb that validly call abort.  This
patch adds the appropriate ARI marker to these lines, to silence the
ARI report.  This also removes the "fix" call for "abort" from
gdb_ari.sh; it was incorrect and now is not needed.

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

	* contrib/ari/gdb_ari.sh: Remove "fix" call for abort.
	* utils.c (abort_with_message, dump_core, internal_vproblem): Add
	ARI marker to abort.
	* event-top.c (handle_sigsegv): Add ARI marker to abort.

Change-Id: I09ce6aa5010bbe4e5bb73ffdb727481be39d34d6
---
M gdb/ChangeLog
M gdb/contrib/ari/gdb_ari.sh
M gdb/event-top.c
M gdb/utils.c
4 files changed, 11 insertions(+), 5 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0204039..44bb65f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
 2019-12-13  Tom Tromey  <tromey@adacore.com>
 
+	* contrib/ari/gdb_ari.sh: Remove "fix" call for abort.
+	* utils.c (abort_with_message, dump_core, internal_vproblem): Add
+	ARI marker to abort.
+	* event-top.c (handle_sigsegv): Add ARI marker to abort.
+
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
 	* contrib/ari/gdb_ari.sh: Fix floatformat_from_double text.
 
 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 d05f4af..300ed76 100755
--- a/gdb/contrib/ari/gdb_ari.sh
+++ b/gdb/contrib/ari/gdb_ari.sh
@@ -647,7 +647,6 @@
 BEGIN { doc["abort"] = "\
 Do not use abort, instead use internal_error; GDB should never abort"
     category["abort"] = ari_regression
-    fix("abort", "gdb/utils.c", 3)
 }
 /(^|[^_[:alnum:]])abort[[:space:]]*\(/ {
     fail("abort")
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 9ec599e..5feb292 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -881,7 +881,7 @@
   install_handle_sigsegv ();
 
   if (thread_local_segv_handler == nullptr)
-    abort ();
+    abort ();			/* ARI: abort */
   thread_local_segv_handler (sig);
 }
 
diff --git a/gdb/utils.c b/gdb/utils.c
index 0b8ec02..41241af 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -186,7 +186,7 @@
   else
     fputs_unfiltered (msg, gdb_stderr);
 
-  abort ();		/* NOTE: GDB has only three calls to abort().  */
+  abort ();		/* ARI: abort */
 }
 
 /* Dump core trying to increase the core soft limit to hard limit first.  */
@@ -200,7 +200,7 @@
   setrlimit (RLIMIT_CORE, &rlim);
 #endif /* HAVE_SETRLIMIT */
 
-  abort ();		/* NOTE: GDB has only three calls to abort().  */
+  abort ();		/* ARI: abort */
 }
 
 /* Check whether GDB will be able to dump core using the dump_core
@@ -320,7 +320,7 @@
            does not fix this problem.  This is the solution suggested
            at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509.  */
 	if (write (STDERR_FILENO, msg, sizeof (msg)) != sizeof (msg))
-          abort (); /* NOTE: GDB has only three calls to abort().  */
+          abort (); /* ARI: abort */
 	exit (1);
       }
   }

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

  parent reply	other threads:[~2019-12-13 22:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 15:51 [review] " Tom Tromey (Code Review)
2019-12-05 16:50 ` Pedro Alves (Code Review)
2019-12-12 17:21 ` Tom Tromey (Code Review)
2019-12-12 17:51 ` [review v2] " Tom Tromey (Code Review)
2019-12-13 14:25 ` Pedro Alves (Code Review)
2019-12-13 22:17 ` Sourceware to Gerrit sync (Code Review) [this message]
2019-12-13 22:23 ` [pushed] " Sourceware to Gerrit sync (Code Review)

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=20191213221709.2062C20AF6@gnutoolchain-gerrit.osci.io \
    --to=gerrit@gnutoolchain-gerrit.osci.io \
    --cc=gdb-patches@sourceware.org \
    --cc=noreply@gnutoolchain-gerrit.osci.io \
    --cc=palves@redhat.com \
    --cc=tromey@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).