# 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.
#
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
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);
editCase_full_line = ""
}
(possible_editCase) {
- if (ARI_OK == "ediCase function") {
+ if (ARI_OK == "editCase function") {
possible_editCase = 0
}
# Closing brace found?
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")
}
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")
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")
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")
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")
category["write_pc"] = ari_deprecate
}
/(^|[^_[:alnum:]])write_pc[[:space:]]*\(/ || \
-/(^|[^_[:alnum:]])set_gdbarch_write_pc[[:space:]]*\(/ || \
/(^|[^_[:alnum:]])TARGET_WRITE_PC[[:space:]]*\(/ {
fail("write_pc")
}