From: Petr Machata Date: Mon, 18 Oct 2010 17:56:06 +0000 (+0200) Subject: dwarflint: Finish checking .debug_abbrev before bailing out X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fe7738ba98069b90a64341a256688761fdd5813;p=thirdparty%2Felfutils.git dwarflint: Finish checking .debug_abbrev before bailing out --- diff --git a/dwarflint/check_debug_abbrev.cc b/dwarflint/check_debug_abbrev.cc index fac1f4688..b7e2f64af 100644 --- a/dwarflint/check_debug_abbrev.cc +++ b/dwarflint/check_debug_abbrev.cc @@ -157,6 +157,7 @@ namespace } where.addr1 = 0; + bool failed = false; while (true) { /* If we get EOF at this point, either the CU was improperly @@ -336,7 +337,6 @@ namespace bool low_pc = false; bool high_pc = false; bool ranges = false; - bool failed = false; std::map seen; do @@ -379,7 +379,7 @@ namespace if (attribute == NULL) { wr_error (where) - << "invalid name " << pri::hex (attrib_name) + << "invalid or unknown name " << pri::hex (attrib_name) << '.' << std::endl; failed = true; continue; @@ -404,6 +404,9 @@ namespace (ver, attrib_form, attribute, &where, false); if (form == NULL) { + wr_error (where) + << "invalid or unknown form " << pri::hex (attrib_form) + << '.' << std::endl; failed = true; continue; } @@ -434,11 +437,11 @@ namespace wr_error (where) << "the abbrev has DW_AT_high_pc & DW_AT_low_pc, " << "but also has DW_AT_ranges." << std::endl; - - if (failed) - throw check_base::failed (); } + if (failed) + throw check_base::failed (); + abbrev_table *last = NULL; for (check_debug_abbrev::abbrev_map::iterator it = abbrevs.begin (); it != abbrevs.end (); ++it)