]> git.ipfire.org Git - thirdparty/elfutils.git/commit
dwarflint: Revamp location reporting
authorPetr Machata <pmachata@redhat.com>
Tue, 19 Apr 2011 15:29:41 +0000 (17:29 +0200)
committerPetr Machata <pmachata@redhat.com>
Tue, 19 Apr 2011 15:29:41 +0000 (17:29 +0200)
commit60420a4194c1e88051bcb231371d3d46cdfbf027
treefc1770fc4cd0db17b091cbfca9953e1b4217c963
parentdcd9821c4aa4e44c8385d316929ff78f8c0c6af7
dwarflint: Revamp location reporting

- Drop struct where, introduce class locus, which is an abstract interface
  that the real locus classes implement.  Locus classes are still used as
  values, no heap allocation was necessary, although if polymorphism is
  necessary, loci can simply be new'ed and put in a vector etc.

- Formatting of most loci was kept the way it was, but some formats have
  been improved.  For example, DIE and abbrev loci now use attribute
  name directly to point to the attribute in question.

- Low-level allocation helpers (mostly WIPE) were dropped and replaced
  with constructors on those structures.  Placement new has to be used
  in a couple places to initialize data where REALLOC is still used.

- Functions that used to take struct where * now take locus const &.  The
  code was updated throughout.

- Values not corresponding to sections were removed from enum section_id.
  Part was dropped outright, because they were there just to support WHEREs,
  rel_* was moved to new class rel_target.

- Convert addr_recort, ref_record to classes inheriting off std::vector.
  ref_record in fact became ref_record_T and is now parametrized by
  locus type.
54 files changed:
dwarflint/Makefile.am
dwarflint/addr-record.cc
dwarflint/addr-record.hh
dwarflint/check_debug_abbrev.cc
dwarflint/check_debug_abbrev.hh
dwarflint/check_debug_aranges.cc
dwarflint/check_debug_aranges.hh
dwarflint/check_debug_info.cc
dwarflint/check_debug_info.hh
dwarflint/check_debug_line.cc
dwarflint/check_debug_loc_range.cc
dwarflint/check_debug_loc_range.hh
dwarflint/check_debug_pub.cc
dwarflint/check_debug_pub.hh
dwarflint/check_die_decl_call.cc
dwarflint/check_die_line_info.cc
dwarflint/check_die_tree.cc
dwarflint/check_duplicate_DW_tag_variable.cc
dwarflint/check_dups_abstract_origin.cc
dwarflint/check_expected_trees.cc
dwarflint/check_linkage_external_die.cc
dwarflint/check_matching_ranges.cc
dwarflint/check_nodebug.cc
dwarflint/check_range_out_of_scope.cc
dwarflint/check_self_referential_die.cc
dwarflint/checked_read.cc
dwarflint/checked_read.hh
dwarflint/checks.hh
dwarflint/coverage.cc
dwarflint/cu_coverage.cc
dwarflint/die_locus.cc [new file with mode: 0644]
dwarflint/die_locus.hh [new file with mode: 0644]
dwarflint/elf_file.hh
dwarflint/highlevel_check.hh
dwarflint/locstats.cc
dwarflint/locus.cc [new file with mode: 0644]
dwarflint/locus.hh [new file with mode: 0644]
dwarflint/lowlevel_checks.cc
dwarflint/main.cc
dwarflint/messages.cc
dwarflint/messages.hh
dwarflint/misc.cc
dwarflint/misc.hh
dwarflint/pri.cc
dwarflint/pri.hh
dwarflint/readctx.hh
dwarflint/reloc.cc
dwarflint/reloc.hh
dwarflint/section_id.hh
dwarflint/sections.cc
dwarflint/tests/run-DW_AT-later-version.sh
dwarflint/tests/run-bad.sh
dwarflint/where.c [deleted file]
dwarflint/where.h [deleted file]