Silence ARI for valid calls to abort
authorTom Tromey <tromey@adacore.com>
Thu, 5 Dec 2019 15:08:39 +0000 (08:08 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 13 Dec 2019 22:15:31 +0000 (15:15 -0700)
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

gdb/ChangeLog
gdb/contrib/ari/gdb_ari.sh
gdb/event-top.c
gdb/utils.c

index 02040390e22254fee9f1e04a1b4c8fb7f6253972..44bb65ffccc3eb7f24c05bb6ee8986eb82d92e33 100644 (file)
@@ -1,3 +1,10 @@
+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.
index d05f4af54c6839d5e9b685f0cad26efb35b86de4..300ed761f13f43bc0e05e776ec1a0da38d106cb8 100755 (executable)
@@ -647,7 +647,6 @@ FNR == 1 {
 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")
index 9ec599e8c4944eba691b0a7716bb102249a16de5..5feb2928e22eb3e72bb8248a5abae337a28c48b0 100644 (file)
@@ -881,7 +881,7 @@ handle_sigsegv (int sig)
   install_handle_sigsegv ();
 
   if (thread_local_segv_handler == nullptr)
-    abort ();
+    abort ();                  /* ARI: abort */
   thread_local_segv_handler (sig);
 }
 
index 0b8ec02abe6668c2ed59604335311248ea240592..41241afcd450188bde1bae815f6f533b9c9f62e1 100644 (file)
@@ -186,7 +186,7 @@ abort_with_message (const char *msg)
   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 @@ dump_core (void)
   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 @@ internal_vproblem (struct internal_problem *problem,
            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);
       }
   }
This page took 0.031928 seconds and 4 git commands to generate.