]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Always allow scheduling hidden checks
authorPetr Machata <pmachata@redhat.com>
Tue, 14 Sep 2010 11:44:46 +0000 (13:44 +0200)
committerPetr Machata <pmachata@redhat.com>
Tue, 14 Sep 2010 11:44:46 +0000 (13:44 +0200)
- and mark a couple "servicing" checks as hidden
- this fixes --check again

dwarflint/dwarflint.cc
dwarflint/lowlevel_checks.cc
dwarflint/sections.cc
dwarflint/sections.hh

index f2116a82377829a1a7226a37c74778d31f748633..bbd17b5fae33bfb421de46e9c2112eb58d753841 100644 (file)
@@ -191,6 +191,12 @@ check_rules::should_check (checkstack const &stack) const
   std::cout << std::endl;
 #endif
 
+  // We always allow scheduling hidden checks.  Those are service
+  // routines that the user doesn't even see it the list of checks.
+  assert (!stack.empty ());
+  if (stack.back ()->hidden ())
+    return true;
+
   bool should = false;
   for (const_iterator it = begin (); it != end (); ++it)
     {
index 65349fadc4135cbb6ac35491fcd2269db069f4af..2b4abc1ed4c1b4bd5857c36c7c2e9db82d5ef894 100644 (file)
@@ -74,9 +74,9 @@ namespace
 
 lowlevel_checks::lowlevel_checks (checkstack &stack, dwarflint &lint)
 {
-  // Then check whatever else is there.  For each existing section
-  // request that the check passes.  Re-requesting already-passed
-  // checks is OK, the scheduler caches it.
+  // Then check all the debug sections that are there.  For each
+  // existing section request that the check passes.  Re-requesting
+  // already-passed checks is OK, the scheduler caches it.
 #define SEC(NAME)                                                      \
   section<sec_##NAME> *NAME =                                          \
     lint.toplev_check<section<sec_##NAME> > (stack);                   \
index 74685cecd79fdc6d7f261fb5b03a3150b495ae73..6b49044077a36c6f2f109528169f3281f1fa0e40 100644 (file)
@@ -40,7 +40,9 @@
 checkdescriptor const *
 load_sections::descriptor ()
 {
-  static checkdescriptor cd ("load_sections");
+  static checkdescriptor cd
+    (checkdescriptor::create ("load_sections")
+     .hidden ());
   return &cd;
 }
 
index 48151ae84b1c9fafd7e5ace3889140d54ee8553b..d216b004905d3b83846a1c48c128c7abfc1f0553 100644 (file)
@@ -68,7 +68,8 @@ public:
   static checkdescriptor const *descriptor () {
     static checkdescriptor cd
       (checkdescriptor::create (section_name[sec_id])
-       .inherit<section_base> ());
+       .inherit<section_base> ()
+       .hidden ());
     return &cd;
   }