Move safe_strerror to common/
[deliverable/binutils-gdb.git] / gdb / contrib / ari / gdb_ari.sh
index d5e2a97222bbd0044fe4c0f7c154bfd1930d8fbc..b868a17e175950196c6f30ab3aafc1f352ff74dc 100644 (file)
@@ -2,7 +2,7 @@
 
 # GDB script to list of problems using awk.
 #
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015 Free Software Foundation, Inc.
 #
 # This file is part of GDB.
 #
@@ -306,14 +306,6 @@ Do not include assert.h, instead include \"gdb_assert.h\"";
     fail("assert.h")
 }
 
-BEGIN { doc["dirent.h"] = "\
-Do not include dirent.h, instead include gdb_dirent.h"
-    category["dirent.h"] = ari_regression
-}
-/^#[[:space:]]*include[[:space:]]*.dirent\.h./ {
-    fail("dirent.h")
-}
-
 BEGIN { doc["regex.h"] = "\
 Do not include regex.h, instead include gdb_regex.h"
     category["regex.h"] = ari_regression
@@ -340,16 +332,6 @@ Do not include gnu-regex.h, instead include gdb_regex.h"
     fail("gnu regex.h")
 }
 
-BEGIN { doc["stat.h"] = "\
-Do not include stat.h or sys/stat.h, instead include gdb_stat.h"
-    category["stat.h"] = ari_regression
-    fix("stat.h", "common/gdb_stat.h", 1)
-}
-/^#[[:space:]]*include[[:space:]]*.stat\.h./ \
-|| /^#[[:space:]]*include[[:space:]]*.sys\/stat\.h./ {
-    fail("stat.h")
-}
-
 BEGIN { doc["wait.h"] = "\
 Do not include wait.h or sys/wait.h, instead include gdb_wait.h"
     fix("wait.h", "common/gdb_wait.h", 2);
@@ -543,7 +525,7 @@ Function name starts lower case but has uppercased letters."
     editCase_full_line = ""
 }
 (possible_editCase) {
-    if (ARI_OK == "ediCase function") {
+    if (ARI_OK == "editCase function") {
        possible_editCase = 0
     }
     # Closing brace found?
@@ -609,7 +591,11 @@ BEGIN { doc["OP eol"] = "\
 Do not use &&, or || at the end of a line"
     category["OP eol"] = ari_code
 }
-/(\|\||\&\&|==|!=)[[:space:]]*$/ {
+# * operator needs a special treatment as it can be a
+# valid end of line for a pointer type definition
+# Only catch case where an assignment or an opening brace is present
+/(\|\||\&\&|==|!=|[[:space:]][+\-\/])[[:space:]]*$/ \
+|| /(\(|=)[[:space:]].*[[:space:]]\*[[:space:]]*$/ {
     fail("OP eol")
 }
 
@@ -617,8 +603,8 @@ BEGIN { doc["strerror"] = "\
 Do not use strerror(), instead use safe_strerror()"
     category["strerror"] = ari_regression
     fix("strerror", "gdb/gdb_string.h", 1)
-    fix("strerror", "gdb/mingw-hdep.c", 1)
-    fix("strerror", "gdb/posix-hdep.c", 1)
+    fix("strerror", "gdb/common/mingw-strerror.c", 1)
+    fix("strerror", "gdb/common/posix-strerror.c", 1)
 }
 /(^|[^_[:alnum:]])strerror[[:space:]]*\(/ {
     fail("strerror")
@@ -752,7 +738,7 @@ Replace ADD_SHARED_SYMBOL_FILES with nothing, not needed?"
 
 BEGIN { doc["SOLIB_ADD"] = "\
 Replace SOLIB_ADD with nothing, not needed?"
-    category["SOLIB_ADD"] = ari_deprecate
+    category["SOLIB_ADD"] = ari_regression
 }
 /(^|[^_[:alnum:]])SOLIB_ADD([^_[:alnum:]]|$)/ {
     fail("SOLIB_ADD")
@@ -760,7 +746,7 @@ Replace SOLIB_ADD with nothing, not needed?"
 
 BEGIN { doc["SOLIB_CREATE_INFERIOR_HOOK"] = "\
 Replace SOLIB_CREATE_INFERIOR_HOOK with nothing, not needed?"
-    category["SOLIB_CREATE_INFERIOR_HOOK"] = ari_deprecate
+    category["SOLIB_CREATE_INFERIOR_HOOK"] = ari_regression
 }
 /(^|[^_[:alnum:]])SOLIB_CREATE_INFERIOR_HOOK([^_[:alnum:]]|$)/ {
     fail("SOLIB_CREATE_INFERIOR_HOOK")
@@ -792,7 +778,7 @@ Replace PROCESS_LINENUMBER_HOOK with nothing, not needed?"
 
 BEGIN { doc["PC_SOLIB"] = "\
 Replace PC_SOLIB with nothing, not needed?"
-    category["PC_SOLIB"] = ari_deprecate
+    category["PC_SOLIB"] = ari_regression
 }
 /(^|[^_[:alnum:]])PC_SOLIB([^_[:alnum:]]|$)/ {
     fail("PC_SOLIB")
@@ -1036,7 +1022,6 @@ a DECR_PC_AFTER_BREAK"
     category["write_pc"] = ari_deprecate
 }
 /(^|[^_[:alnum:]])write_pc[[:space:]]*\(/ || \
-/(^|[^_[:alnum:]])set_gdbarch_write_pc[[:space:]]*\(/ || \
 /(^|[^_[:alnum:]])TARGET_WRITE_PC[[:space:]]*\(/ {
     fail("write_pc")
 }
This page took 0.025136 seconds and 4 git commands to generate.