From: Petr Machata Date: Tue, 14 Sep 2010 11:44:46 +0000 (+0200) Subject: dwarflint: Always allow scheduling hidden checks X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6cb58d643697768eebd0f8dadd93ae0f5274b8e;p=thirdparty%2Felfutils.git dwarflint: Always allow scheduling hidden checks - and mark a couple "servicing" checks as hidden - this fixes --check again --- diff --git a/dwarflint/dwarflint.cc b/dwarflint/dwarflint.cc index f2116a823..bbd17b5fa 100644 --- a/dwarflint/dwarflint.cc +++ b/dwarflint/dwarflint.cc @@ -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) { diff --git a/dwarflint/lowlevel_checks.cc b/dwarflint/lowlevel_checks.cc index 65349fadc..2b4abc1ed 100644 --- a/dwarflint/lowlevel_checks.cc +++ b/dwarflint/lowlevel_checks.cc @@ -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 *NAME = \ lint.toplev_check > (stack); \ diff --git a/dwarflint/sections.cc b/dwarflint/sections.cc index 74685cecd..6b4904407 100644 --- a/dwarflint/sections.cc +++ b/dwarflint/sections.cc @@ -40,7 +40,9 @@ checkdescriptor const * load_sections::descriptor () { - static checkdescriptor cd ("load_sections"); + static checkdescriptor cd + (checkdescriptor::create ("load_sections") + .hidden ()); return &cd; } diff --git a/dwarflint/sections.hh b/dwarflint/sections.hh index 48151ae84..d216b0049 100644 --- a/dwarflint/sections.hh +++ b/dwarflint/sections.hh @@ -68,7 +68,8 @@ public: static checkdescriptor const *descriptor () { static checkdescriptor cd (checkdescriptor::create (section_name[sec_id]) - .inherit ()); + .inherit () + .hidden ()); return &cd; }