Petr Machata [Sat, 9 Oct 2010 18:45:04 +0000 (20:45 +0200)]
dwarflint: Streamlining code
- Extract checks common to direct and indirect forms to
check_debug_abbrev::check_form.
- Reading of indirect form is now done via a new function read_sc_value
in check_debug_info.cc. That function is also called for reading
normal values of classes sc_value and sc_block
Petr Machata [Fri, 8 Oct 2010 23:28:52 +0000 (01:28 +0200)]
dwarflint: Retrofit proper marking of exprloc and loclistptr to earlier DWARFs
- as a consequence, is_location_attrib is gone
- in check_debug_abbrev, we now check for appropriateness all form/attribute
pairs, not just those that are location attribs
- too-wide references are now checked in one place for all reference types
- pointer checking now actually looks sane--the maze of DW_FORM_/DW_AT_
switches was replaced by a straighforward switch on ver->form_class
- this introduces a testcase failure
- and similar work needs to be done for other cl_*ref classes
Petr Machata [Thu, 7 Oct 2010 01:47:18 +0000 (03:47 +0200)]
dwarflint: Move more code from dwarf_version.hh to .cc
- And drop selwidth_form, which was overly general for the two uses that we
have. Implement corresponding classes directly.
Petr Machata [Thu, 7 Oct 2010 00:42:38 +0000 (02:42 +0200)]
dwarflint: Introduce dwarf_version::extend
- Drop support for parental version in std_dwarf, implement the same via
the extension mechanism
- Drop the huge #if 0 that has been there for about a year or so
Petr Machata [Tue, 5 Oct 2010 18:33:03 +0000 (20:33 +0200)]
dwarflint: Revamping dwarf tables
- forms are now objects. The idea being they know how big they are, how
to relocate them, perhaps they might know how to extract value from
stream. The goal here is to concetrate all the form-related knowledge
to a sigle place. It now passes the suite, but is not really done yet.
Petr Machata [Fri, 1 Oct 2010 14:51:48 +0000 (16:51 +0200)]
dwarflint: Use wrapper to print check descriptions
- this should make it easier to write them
- also use argp to print out properly formatted help for each check. Drop
a bunch of code that was necessary to do things the old way
Petr Machata [Thu, 30 Sep 2010 12:23:55 +0000 (14:23 +0200)]
dwarflint: check_range_out_of_scope should run even on absent .debug_loc
- the actual fix is removing the forced lint.check <check_debug_loc>.
The lowlevel_checks pass takes care of validating any present sections.
In this case .debug_loc isn't there, yet the check needs to run.
- and add a test case for this.
Petr Machata [Fri, 24 Sep 2010 16:11:26 +0000 (18:11 +0200)]
dwarflint: Rename local options to include the check pass prefix
- The original intention was that this is added automatically, but perhaps
the better way to handle it is to make it easy to pick whatever name one
wishes. Short options will share namespace anyway, so one has to be
careful with their naming anyway.
Petr Machata [Thu, 23 Sep 2010 16:00:36 +0000 (18:00 +0200)]
dwarflint: Don't assume all options are global
- currently this breaks dwarflint, because per-check options are not yet
processed. Options that belonged to global group before still work and
are correctly registered as globals, but e.g. -i or the suite of options
at locstats aren't recognized.
Petr Machata [Mon, 20 Sep 2010 22:28:20 +0000 (00:28 +0200)]
dwarflint: Add DIE classification categories "mutable" and "immutable"
- however I guess the better thing to do would be to dump how big part
of a scope is mutable vs. immutable, or something like that
Petr Machata [Fri, 17 Sep 2010 15:31:54 +0000 (17:31 +0200)]
dwarflint: Add more options for ignoring and dumping dies to locstat
- these are probably mostly useful for myself as I'm trying to find out
what's really missing the info and what doesn't need one it the first
place, but why not allow others to do the tinkering too...
Petr Machata [Wed, 15 Sep 2010 13:55:10 +0000 (15:55 +0200)]
Only run low-level checks in dwarflint self-check
The reason being that high-level checks do and always have emitted a lot
of output, mainly for big c++ binaries. The low-level checks should
generally pass, and even if there are nits here and there, they should be
minor and shouldn't flood the terminal.
Petr Machata [Tue, 14 Sep 2010 12:35:25 +0000 (14:35 +0200)]
dwarflint: Fix test case
- now that we run the low-level checks as prerequisite of high-level ones,
we also get low-level errors in testsuite passes. One more reason to
implement some sensible message filtering command line options.
Petr Machata [Tue, 14 Sep 2010 12:34:11 +0000 (14:34 +0200)]
dwarflint: Move secinfo_map initiazitaion into ctor, avoid macros
- and reindent two statements below where it's instantiated
- and add a documentation to the section_name array