Mark Wielaard [Wed, 24 Nov 2010 15:32:40 +0000 (16:32 +0100)]
Define struct die_info inside class dwarf_output.
g++ 4.5 corrected arg-dep lookup to include template args in the list of
associated classes. This prevented some usage of the die_info_pair
typedef std::pair<const debug_info_entry, die_info>. Because struct die_info
was declared outside the dwarf_output class. Declaring it inside the class
dwarf_output itself makes it visible for the lookup again.
Mark Wielaard [Wed, 24 Nov 2010 10:55:35 +0000 (11:55 +0100)]
Use local, not temporary, when using swap ().
g++ 4.5 now detects that swap wants a reference as argument. You cannot
use a temporary, which is an lvalue and so cannot be used as reference.
The lifetime of the temporary cannot be guaranteed, and so because it isn't
const, g++ refuses to use it as reference.
Mark Wielaard [Thu, 25 Nov 2010 12:34:46 +0000 (13:34 +0100)]
Rename class [raw_]compile_units to [raw_]compile_units_type.
We have both functions and classes named compile_units. This can be
confusing to (newer) g++ compilers. Keep the function names the same,
but rename the the classes to compile_units_type.
Petr Machata [Tue, 12 Oct 2010 11:24:20 +0000 (13:24 +0200)]
dwarflint: Move all the low_pc/high_pc processing after the attribute loop
- no point adding the low_pc/high_pc range once more for each attribute
after the second in the DW_AT_{high,low}_pc pair
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.