]> git.ipfire.org Git - thirdparty/elfutils.git/log
thirdparty/elfutils.git
14 years agoMerge branch 'master' into dwarf
Mark Wielaard [Tue, 3 May 2011 09:45:27 +0000 (11:45 +0200)] 
Merge branch 'master' into dwarf

Conflicts:
tests/Makefile.am: New tests merged.

14 years agoMerge branch 'mjw/sdt'
Mark Wielaard [Tue, 3 May 2011 09:35:22 +0000 (11:35 +0200)] 
Merge branch 'mjw/sdt'

14 years agoMerge branch 'mjw/gdb_index'
Mark Wielaard [Thu, 28 Apr 2011 08:14:39 +0000 (10:14 +0200)] 
Merge branch 'mjw/gdb_index'

14 years agoAdd printing of .gdb_index section to readelf.
Mark Wielaard [Thu, 14 Apr 2011 21:47:26 +0000 (23:47 +0200)] 
Add printing of .gdb_index section to readelf.

14 years agolibdw: Sanity check end of section against cu_data () of die->cu.
Mark Wielaard [Tue, 26 Apr 2011 15:15:28 +0000 (17:15 +0200)] 
libdw: Sanity check end of section against cu_data () of die->cu.

A Dwarf_CU can come from either the debug_info compile unit or a
debug_type type unit section. Use the correct one for sanity checking
whether we have a truncated section.

14 years agoAdd support for printing SDT elf notes.
Mark Wielaard [Sun, 24 Apr 2011 15:53:38 +0000 (17:53 +0200)] 
Add support for printing SDT elf notes.

libebl/
    * libebl.h (ebl_object_note_type_name): Add const char *name arg.
    * eblhooks.h (object_note_type_name): Likewise.
    * eblopenbackend.c (default_object_note_type_name): Likewise.
    * eblobjnotetypename.c (ebl_object_note_type_name): Likewise.
    And print version if name is "stapsdt".
    * eblobjnote.c (ebl_object_note): Add output for "stapsdt" notes.
src/
    * readelf.c (handle_notes_data): Call ebl_object_note_type_name
    with note name.

14 years agodwarflint: check_linkage_external_die.cc (is_external): Remove unused entry.
Mark Wielaard [Thu, 21 Apr 2011 12:57:45 +0000 (14:57 +0200)] 
dwarflint: check_linkage_external_die.cc (is_external): Remove unused entry.

14 years agodwarflint: Fix excessive alignment computation
Petr Machata [Tue, 19 Apr 2011 15:30:57 +0000 (17:30 +0200)] 
dwarflint: Fix excessive alignment computation

14 years agodwarflint: Revamp location reporting
Petr Machata [Tue, 19 Apr 2011 15:29:41 +0000 (17:29 +0200)] 
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.

14 years agoFix doubled words.
Marek Polacek [Fri, 15 Apr 2011 09:41:32 +0000 (11:41 +0200)] 
Fix doubled words.

14 years agodwarflint: Add duplicate filtering also for C (non-stream based) wr_messages.
Mark Wielaard [Wed, 13 Apr 2011 11:44:38 +0000 (13:44 +0200)] 
dwarflint: Add duplicate filtering also for C (non-stream based) wr_messages.

wr_message () will ask for the id () filtering, so the "warning: " string
is already printed, so remove the same string from wr_vwarning ().

14 years agodwarflint: new check_die_line_info die check.
Mark Wielaard [Wed, 13 Apr 2011 10:33:29 +0000 (12:33 +0200)] 
dwarflint: new check_die_line_info die check.

Check that each code block start address is also mentioned in the
line table.

14 years agodwarflint: new check_die_decl_call.cc die_check.
Mark Wielaard [Wed, 13 Apr 2011 10:26:44 +0000 (12:26 +0200)] 
dwarflint: new check_die_decl_call.cc die_check.

Check that each decl or call attribute come in file/line and
column/line pairs.

14 years agoAdd elfutils::dwarf::attribute_type::find_integrate ().
Mark Wielaard [Tue, 12 Apr 2011 13:01:02 +0000 (15:01 +0200)] 
Add elfutils::dwarf::attribute_type::find_integrate ().

Same as find (), but if the attribute name isn't found,
but there is  is an abstract_origin or specification
attribute, then will try to find_integrate () the name
from that reference.

check_linkage_external_die.is_external () now uses it.

14 years agoFix libdwfl compile issue in case none of the compression libraries are there.
Mark Wielaard [Mon, 11 Apr 2011 15:24:16 +0000 (17:24 +0200)] 
Fix libdwfl compile issue in case none of the compression libraries are there.

    * linux-kernel-modules.c (vmlinux_suffixes): Guard definition
    by check for zlib, bzlib or lzma defines to check it isn't empty.
    (try_kernel_name): Use same guard for use of vmlinux_suffixes.

14 years agodwarflint: check_dups_abstract_origin use wr_message id for filtering dups.
Mark Wielaard [Mon, 11 Apr 2011 14:34:17 +0000 (16:34 +0200)] 
dwarflint: check_dups_abstract_origin use wr_message id for filtering dups.

14 years agodwarflint: Don't assert in check_debug_info can trigger an assert.
Mark Wielaard [Mon, 11 Apr 2011 11:55:58 +0000 (13:55 +0200)] 
dwarflint: Don't assert in check_debug_info can trigger an assert.

Instead of asserting a form must exist, let form_class () return
max_dw_class, like ambiguous_class () does. max_dw_class is already
used as sentinel in read_die_chain () in case the attribute is unknown.
This lets things work out for the low level check_debug_info check and
then makes the higher-level checks complain about the unexpected form
instead. Added an example binary and test dwarflint/tests/run-upper.sh.

14 years agoRun elflint and dwarflint on c++ programs.
Mark Wielaard [Mon, 11 Apr 2011 11:08:57 +0000 (13:08 +0200)] 
Run elflint and dwarflint on c++ programs.

* tests/run-dwarflint-self.sh: Add dwarflint itself.
* tests/run-elflint-self.sh: Add dwarfcmp, unstrip and dwarflint.

14 years agoMerge branch 'default_dups' into dwarf
Mark Wielaard [Fri, 8 Apr 2011 22:25:47 +0000 (00:25 +0200)] 
Merge branch 'default_dups' into dwarf

14 years agodwarflint: check_dups_abstract_origin more specific and add member variables.
Mark Wielaard [Fri, 8 Apr 2011 22:09:26 +0000 (00:09 +0200)] 
dwarflint: check_dups_abstract_origin  more specific and add member variables.

14 years agodwarflint: anonymous typedef unions also can have linkage_name extension.
Mark Wielaard [Fri, 8 Apr 2011 21:10:15 +0000 (23:10 +0200)] 
dwarflint: anonymous typedef unions also can have linkage_name extension.

14 years agodwarflint: GNU upper_bound is allowed to also be a block (dwarf3 in dwarf2).
Mark Wielaard [Fri, 8 Apr 2011 20:15:54 +0000 (22:15 +0200)] 
dwarflint: GNU upper_bound is allowed to also be a block (dwarf3 in dwarf2).

14 years agodwarflint: Default to --dups=16.
Mark Wielaard [Fri, 8 Apr 2011 12:25:30 +0000 (14:25 +0200)] 
dwarflint: Default to --dups=16.

14 years agoMerge branch 'dwarf' of git://git.fedorahosted.org/git/elfutils into dwarf
Mark Wielaard [Fri, 8 Apr 2011 09:38:56 +0000 (11:38 +0200)] 
Merge branch 'dwarf' of git://git.fedorahosted.org/git/elfutils into dwarf

14 years agodwarflint: check_linkage_external_die keep symbol table and double check.
Mark Wielaard [Fri, 8 Apr 2011 09:30:58 +0000 (11:30 +0200)] 
dwarflint: check_linkage_external_die keep symbol table and double check.

We pull the symbol table from the dwarf file and check when a linkage_name
is set that the symbol table contains that name and is marked not marked
local, with the following exceptions:

- No symbol in table, OK, if not a defining or const object.
  Or GNU extension, anonymous structs can have a linkage_name.
- Symbol in table marked local, OK if not a defining object
  and marked external.  Which means it comes from some external
  symbol table.

14 years agodwarflint: expected-at GNU extension for anonymous typedef structs and enums.
Mark Wielaard [Fri, 8 Apr 2011 09:17:48 +0000 (11:17 +0200)] 
dwarflint: expected-at GNU extension for anonymous typedef structs and enums.

14 years agodwarflint: check_dups_abstract_origin allow subprogram defined outside body.
Mark Wielaard [Fri, 8 Apr 2011 09:16:11 +0000 (11:16 +0200)] 
dwarflint: check_dups_abstract_origin allow subprogram defined outside body.

A subprogram can be defined outside the body of the enclosing class,
then file and/or line attributes can differ.

14 years agodwarflint: Simplify formatting of wheres
Petr Machata [Fri, 8 Apr 2011 00:34:21 +0000 (02:34 +0200)] 
dwarflint: Simplify formatting of wheres

14 years agoMerge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf
Petr Machata [Fri, 8 Apr 2011 00:10:01 +0000 (02:10 +0200)] 
Merge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf

14 years agodwarflint: Drop checkdescriptor::{prereq,inherit}
Petr Machata [Fri, 8 Apr 2011 00:03:01 +0000 (02:03 +0200)] 
dwarflint: Drop checkdescriptor::{prereq,inherit}

- ... which was just duplicating the lint.check<> calls in check
  initializers.  It was needed for --list-checks to display all the
  checks.  Now we register all the checks that we either want to show
  in the list or run, and mark them as hidden or unscheduled as needed.
  We lose the ability to list dependees in --list-checks, but I don't
  think that is too interesting anyway.

14 years agoMerge branch 'dwarf' of git://git.fedorahosted.org/git/elfutils into dwarf
Mark Wielaard [Thu, 7 Apr 2011 22:57:33 +0000 (00:57 +0200)] 
Merge branch 'dwarf' of git://git.fedorahosted.org/git/elfutils into dwarf

14 years agoTurn check_dups_abstract_origin into a die_check class.
Mark Wielaard [Thu, 7 Apr 2011 16:03:19 +0000 (18:03 +0200)] 
Turn check_dups_abstract_origin into a die_check class.

14 years agoMerge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf
Petr Machata [Thu, 7 Apr 2011 15:56:43 +0000 (17:56 +0200)] 
Merge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf

14 years agodwarflint: More support for message tresholds and composed messages
Petr Machata [Thu, 7 Apr 2011 15:51:32 +0000 (17:51 +0200)] 
dwarflint: More support for message tresholds and composed messages

14 years agodwarflint: check_dups_abstract_origin allow dup object_pointer on subprogram.
Mark Wielaard [Thu, 7 Apr 2011 15:47:25 +0000 (17:47 +0200)] 
dwarflint: check_dups_abstract_origin allow dup object_pointer on subprogram.

14 years agodwarf::attr_value::constant_block () handle DW_FORM_locexpr.
Mark Wielaard [Thu, 7 Apr 2011 14:56:40 +0000 (16:56 +0200)] 
dwarf::attr_value::constant_block () handle DW_FORM_locexpr.

14 years agodwarflint: Use stream operations for wr_form_leb128_messages
Petr Machata [Thu, 7 Apr 2011 14:46:03 +0000 (16:46 +0200)] 
dwarflint: Use stream operations for wr_form_leb128_messages

14 years agodwarflint: Convert WHERE to a function
Petr Machata [Thu, 7 Apr 2011 14:36:51 +0000 (16:36 +0200)] 
dwarflint: Convert WHERE to a function

14 years agodwarflint: Support composed messages
Petr Machata [Wed, 6 Apr 2011 16:42:42 +0000 (18:42 +0200)] 
dwarflint: Support composed messages

- This should be used like this:
   bool whether = false;
   wr_message (where, cat).id (this, whether) << stuff stuff;
   wr_message (where2, cat2).when (whether) << stuffy stuff;

14 years agodwarflint: .ii -> _i.hh
Petr Machata [Wed, 6 Apr 2011 15:40:50 +0000 (17:40 +0200)] 
dwarflint: .ii -> _i.hh

14 years agodwarflint: Move DIE check registrar away from the class dwarflint
Petr Machata [Wed, 6 Apr 2011 11:14:10 +0000 (13:14 +0200)] 
dwarflint: Move DIE check registrar away from the class dwarflint

14 years agoMerge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf
Petr Machata [Wed, 6 Apr 2011 10:08:41 +0000 (12:08 +0200)] 
Merge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf

14 years agodwarflint: highlevel_check_i holds Dwarf et.al., pass it to die_check
Petr Machata [Wed, 6 Apr 2011 10:06:37 +0000 (12:06 +0200)] 
dwarflint: highlevel_check_i holds Dwarf et.al., pass it to die_check

14 years agodwarflint: Fix run-check_self_referential_die.sh expected warning message.
Mark Wielaard [Wed, 6 Apr 2011 09:17:15 +0000 (11:17 +0200)] 
dwarflint: Fix run-check_self_referential_die.sh expected warning message.

14 years agoTurn check_linkage_external_die into a die_check class.
Mark Wielaard [Tue, 5 Apr 2011 16:11:36 +0000 (18:11 +0200)] 
Turn check_linkage_external_die into a die_check class.

14 years agoTurn check_self_referential_die into a die_check class.
Mark Wielaard [Tue, 5 Apr 2011 15:59:48 +0000 (17:59 +0200)] 
Turn check_self_referential_die into a die_check class.

14 years agodwarflint: Make locstats an independent tool
Petr Machata [Tue, 5 Apr 2011 18:00:42 +0000 (20:00 +0200)] 
dwarflint: Make locstats an independent tool

14 years agoMerge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf
Petr Machata [Tue, 5 Apr 2011 15:55:46 +0000 (17:55 +0200)] 
Merge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf

14 years agodwarflint: Guard against exceptions in per-DIE checks
Petr Machata [Tue, 5 Apr 2011 15:55:30 +0000 (17:55 +0200)] 
dwarflint: Guard against exceptions in per-DIE checks

- throwing check_base::unscheduled can be used to turn off the per-DIE
  check for this file

14 years agodwarflint: Initialize check_debug_info::_m_need_ranges
Petr Machata [Tue, 5 Apr 2011 15:51:48 +0000 (17:51 +0200)] 
dwarflint: Initialize check_debug_info::_m_need_ranges

14 years agoUpdate dwarf-knowledge.cc and expected-at.cc with DWARF4 tags and attributes.
Mark Wielaard [Mon, 4 Apr 2011 14:10:20 +0000 (16:10 +0200)] 
Update dwarf-knowledge.cc and expected-at.cc with DWARF4 tags and attributes.

14 years agodwarflint: Allow DW_AT_ranges with const form, as gnu extension.
Mark Wielaard [Wed, 30 Mar 2011 10:44:14 +0000 (12:44 +0200)] 
dwarflint: Allow DW_AT_ranges with const form, as gnu extension.

Without -gstrict-dwarf gcc allows usage of attributes from
later versions. One strange case is DW_AT_ranges in version 2
since that version doesn't actually define a rangelistptr
class. This case is added in the form_allowed override for dwarf_gnu.
In gnu mode dwarf_version_union::form_allowed checks both variants,
source and extension, in no-gnu mode, only the latest is allowed.

14 years agodwarflint: linkage_name attributes checking.
Mark Wielaard [Mon, 4 Apr 2011 10:42:21 +0000 (12:42 +0200)] 
dwarflint: linkage_name attributes checking.

Dwarf4 introduces DW_AT_linkage_name, which is like DW_AT_MIPS_linkage_name
already used by gcc for earlier versions. Mark DW_TAG_common_block,
DW_TAG_constant, DW_TAG_entry_point, DW_TAG_subprogram and DW_TAG_variable
as optionally having at_linkage_name (either the old or new variant) in
expected-at.cc. Add new check_linkage_external_die.cc to find DIEs with
linkage_name set, but not marked DW_AT_external.

14 years agoAdd minimal support for DW_TAG_GNU_template.
Mark Wielaard [Sun, 3 Apr 2011 18:14:50 +0000 (20:14 +0200)] 
Add minimal support for DW_TAG_GNU_template.

http://gcc.gnu.org/wiki/TemplateParmsDwarf describes
DW_TAG_GNU_template_template_param, DW_TAG_GNU_template_parameter_pack,
DW_TAG_GNU_formal_parameter_pack and DW_AT_GNU_template_name.
Added to libdw/c++/dwarf-knowledge.cc, dwarflint/expected-at.cc and
dwarflint/dwarf_gnu.cc

14 years agodwarflint: Add DW_LNE_set_discriminator check and clean unknown upcode warn.
Mark Wielaard [Sat, 2 Apr 2011 15:33:41 +0000 (17:33 +0200)] 
dwarflint: Add DW_LNE_set_discriminator check and clean unknown upcode warn.

Print unknown (extended) opcodes has hex values.
Add dwarf_line_extended_opcode_string.
New simple DW_LNE_set_discriminator check (not zero).

14 years agodwarf-knowledge.cc expected_value_space for DW_AT_GNU_vector is VS(flag).
Mark Wielaard [Fri, 1 Apr 2011 22:59:50 +0000 (00:59 +0200)] 
dwarf-knowledge.cc expected_value_space for DW_AT_GNU_vector is VS(flag).

Also DW_AT_GNU_vector is an optional attribute for DW_TAG_array_type
in dwarflint/expected-at.cc.

14 years agodwarflint: check_dups_abstract_origin, be specific about GNU_call_site dups.
Mark Wielaard [Fri, 1 Apr 2011 22:36:56 +0000 (00:36 +0200)] 
dwarflint: check_dups_abstract_origin, be specific about GNU_call_site dups.

A call site entry has a DW_AT_low_pc attribute which is the return
address after the call and a DW_AT_abstract_origin that is a
pointer to the reference it calls directly or indirectly. So
both may be available also at the abstract_origin (with different
values).

14 years agodwarflint: Turn global_opts into a static initializer function.
Mark Wielaard [Fri, 1 Apr 2011 13:59:27 +0000 (15:59 +0200)] 
dwarflint: Turn global_opts into a static initializer function.

Trick to make sure the static options are always initialized
before access (it is used from various global initializers).

14 years agodwarflint: Work around a GCC compilation problem
Petr Machata [Fri, 1 Apr 2011 12:38:07 +0000 (14:38 +0200)] 
dwarflint: Work around a GCC compilation problem

14 years agodwarflint: check_dups_abstract_origin, some (GNU_call_site) dups are OK.
Mark Wielaard [Thu, 31 Mar 2011 22:17:58 +0000 (00:17 +0200)] 
dwarflint: check_dups_abstract_origin, some (GNU_call_site) dups are OK.

A call site entry has a DW_AT_low_pc attribute which is the return
address after the call and a DW_AT_abstract_origin that is a
pointer to the reference it calls directly or indirectly.

14 years agodwarflint: check_debug_abbrev.cc (load_debug_abbrev) prev_abbr_off not used.
Mark Wielaard [Wed, 30 Mar 2011 21:07:03 +0000 (23:07 +0200)] 
dwarflint: check_debug_abbrev.cc (load_debug_abbrev) prev_abbr_off not used.

14 years agodwarflint: Add GNU_call attributes and tags to expected-at.cc.
Mark Wielaard [Wed, 30 Mar 2011 17:53:21 +0000 (19:53 +0200)] 
dwarflint: Add GNU_call attributes and tags to expected-at.cc.

14 years agoAdd DW_AT_GNU_call attributes to dwarf-knowledge.cc.
Mark Wielaard [Wed, 30 Mar 2011 15:09:17 +0000 (17:09 +0200)] 
Add DW_AT_GNU_call attributes to dwarf-knowledge.cc.

DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
DW_AT_GNU_call_site_target and DW_AT_GNU_call_site_target_clobbered
describe locations. DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites,
DW_AT_GNU_all_call_sites and DW_AT_GNU_all_source_call_sites are flags.

14 years agoNew test for ebl_dynamic_tag_name.
Marek Polacek [Mon, 28 Mar 2011 14:00:38 +0000 (16:00 +0200)] 
New test for ebl_dynamic_tag_name.

14 years agodwarflint: Add filtering of duplicate messages
Petr Machata [Mon, 28 Mar 2011 22:54:48 +0000 (00:54 +0200)] 
dwarflint: Add filtering of duplicate messages

- we use the first string component of stream implementation of wr_message
  as a key to decide whether we've seen the message before.  Most of the
  messages use streams, is why it's like that.  When (if) we get back to
  formatting strings, that string should be even better key, because there
  will be less chance for compiler to do duplicate elimination etc.

14 years agodwarflint: Drop wr_warning
Petr Machata [Mon, 28 Mar 2011 18:34:28 +0000 (20:34 +0200)] 
dwarflint: Drop wr_warning

- wr_error is for outright violations.  The rest should be passed through
  wr_message to allow filtering

14 years agodwarflint: Drop the "cat" function, use operator| instead
Petr Machata [Mon, 28 Mar 2011 18:19:36 +0000 (20:19 +0200)] 
dwarflint: Drop the "cat" function, use operator| instead

14 years agoMerge branch 'pmachata/dwarflint' into dwarf
Petr Machata [Mon, 28 Mar 2011 14:10:26 +0000 (16:10 +0200)] 
Merge branch 'pmachata/dwarflint' into dwarf

14 years agodwarflint: Rewrite check_duplicate_DW_tag_variable as a per-DIE check
Petr Machata [Mon, 28 Mar 2011 13:43:44 +0000 (15:43 +0200)] 
dwarflint: Rewrite check_duplicate_DW_tag_variable as a per-DIE check

14 years agodwarflint: Add check_die_tree pass for generic per-DIE checks
Petr Machata [Thu, 24 Mar 2011 16:44:12 +0000 (17:44 +0100)] 
dwarflint: Add check_die_tree pass for generic per-DIE checks

- add reg_die_check for registering per-DIE check passes
- turn check_registrar into a template to allow reuse among reg<> and
  reg_die_check<>
- the per-DIE checking magic is in check_die_tree.hh
- hide most of checks.hh into dwarflint.cc.  That has little to do
  with per-DIE checks as such, but was a necessary cleanup

14 years agoImprove output of readelf -wline
Petr Machata [Fri, 25 Mar 2011 14:17:04 +0000 (15:17 +0100)] 
Improve output of readelf -wline

14 years agoMerge branch 'mpolacek/readelf-pltrel-case'
Marek Polacek [Fri, 25 Mar 2011 12:14:19 +0000 (13:14 +0100)] 
Merge branch 'mpolacek/readelf-pltrel-case'

14 years agoMerge branch 'mpolacek/tlsdesc'
Marek Polacek [Fri, 25 Mar 2011 10:27:39 +0000 (11:27 +0100)] 
Merge branch 'mpolacek/tlsdesc'

14 years agoMerge branch 'pmachata/rerequest-tag'
Petr Machata [Thu, 24 Mar 2011 12:39:20 +0000 (13:39 +0100)] 
Merge branch 'pmachata/rerequest-tag'

14 years agoMerge branch 'mjw/call_site' into dwarf
Mark Wielaard [Thu, 24 Mar 2011 12:21:43 +0000 (13:21 +0100)] 
Merge branch 'mjw/call_site' into dwarf

14 years agoMerge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf
Petr Machata [Wed, 23 Mar 2011 17:45:05 +0000 (18:45 +0100)] 
Merge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf

14 years agodwarflint: Tolerate attributes from all DWARF versions, be less strict
Petr Machata [Wed, 23 Mar 2011 17:44:30 +0000 (18:44 +0100)] 
dwarflint: Tolerate attributes from all DWARF versions, be less strict

14 years agoAdd support for low-level dwarflint checks for call_site and entry_value. mjw/call_site
Mark Wielaard [Wed, 23 Mar 2011 12:31:06 +0000 (13:31 +0100)] 
Add support for low-level dwarflint checks for call_site and entry_value.

14 years agoCopy master readelf.c dwarf_tag/attr_string changes to dwarfstrings.c.
Mark Wielaard [Wed, 23 Mar 2011 09:17:48 +0000 (10:17 +0100)] 
Copy master readelf.c dwarf_tag/attr_string changes to dwarfstrings.c.

14 years agoMerge branch 'master' into dwarf
Mark Wielaard [Wed, 23 Mar 2011 09:07:44 +0000 (10:07 +0100)] 
Merge branch 'master' into dwarf

Conflicts:
libdw/ChangeLog
src/readelf.c
tests/ChangeLog
tests/Makefile.am

14 years agoAdd support for call_site and entry_value to dwarf.h and readelf.
Mark Wielaard [Tue, 22 Mar 2011 22:03:31 +0000 (23:03 +0100)] 
Add support for call_site and entry_value to dwarf.h and readelf.

New tags DW_TAG_GNU_call_site and DW_TAG_GNU_call_site_parameter.
New attributes DW_AT_GNU_call_site_value,
DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target,
DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call,
DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites,
and DW_AT_GNU_all_source_call_sites.
New operation DW_OP_GNU_entry_value.

14 years agodwarflint: Only add range to CU DIE coverage if low_pc > high_pc
Petr Machata [Tue, 22 Mar 2011 11:50:36 +0000 (12:50 +0100)] 
dwarflint: Only add range to CU DIE coverage if low_pc > high_pc

14 years agoDon't segfault at DT_PLTREL case.
Marek Polacek [Tue, 22 Mar 2011 00:07:20 +0000 (01:07 +0100)] 
Don't segfault at DT_PLTREL case.

14 years agoFix typo in TLSDESC_GOT.
Marek Polacek [Mon, 21 Mar 2011 22:46:56 +0000 (23:46 +0100)] 
Fix typo in TLSDESC_GOT.

14 years agodwarflint: Fix reporting of CU x arange mismatch
Petr Machata [Mon, 21 Mar 2011 15:47:26 +0000 (16:47 +0100)] 
dwarflint: Fix reporting of CU x arange mismatch

- report the direction of mismatch correctly
- clarify that we only care about CU DIEs, not any old DIE.  Clarify that
  in a comment in check_debug_info

14 years agodwarflint: Check that operand of DW_LNE_set_address is != 0
Petr Machata [Sat, 19 Mar 2011 10:55:07 +0000 (11:55 +0100)] 
dwarflint: Check that operand of DW_LNE_set_address is != 0

14 years agodwarflint: Do the ET_REL layout starting on address > 0
Petr Machata [Sat, 19 Mar 2011 10:53:31 +0000 (11:53 +0100)] 
dwarflint: Do the ET_REL layout starting on address > 0

14 years agodwarlint check_debug_line.cc DW_LNS_advance_line takes a sleb128 operan.
Mark Wielaard [Fri, 18 Mar 2011 10:38:38 +0000 (11:38 +0100)] 
dwarlint check_debug_line.cc DW_LNS_advance_line takes a sleb128 operan.

14 years agodwarflint: DW_AT_high_pc always has to be >= DW_AT_low_pc
Petr Machata [Fri, 18 Mar 2011 09:05:57 +0000 (10:05 +0100)] 
dwarflint: DW_AT_high_pc always has to be >= DW_AT_low_pc

14 years agodwarflint: Also cover DW_AT_low_pc == DW_AT_high_pc (if that is > 0)
Petr Machata [Fri, 18 Mar 2011 00:21:12 +0000 (01:21 +0100)] 
dwarflint: Also cover DW_AT_low_pc == DW_AT_high_pc (if that is > 0)

14 years agodwarflint: Catch and report exceptions thrown in checks
Petr Machata [Fri, 18 Mar 2011 00:12:34 +0000 (01:12 +0100)] 
dwarflint: Catch and report exceptions thrown in checks

14 years agodwarflint: Add a check for DW_AT_low_pc > DW_AT_high_pc
Petr Machata [Thu, 17 Mar 2011 23:01:38 +0000 (00:01 +0100)] 
dwarflint: Add a check for DW_AT_low_pc > DW_AT_high_pc

14 years agodwarflint: Support DW_AT_high_pc that is constant, check low_pc <= high_pc
Petr Machata [Thu, 17 Mar 2011 22:28:44 +0000 (23:28 +0100)] 
dwarflint: Support DW_AT_high_pc that is constant, check low_pc <= high_pc

14 years agoMerge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf
Petr Machata [Thu, 17 Mar 2011 16:20:22 +0000 (17:20 +0100)] 
Merge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf

14 years agodwarflint: Extract "local function" out of the method
Petr Machata [Thu, 17 Mar 2011 16:19:52 +0000 (17:19 +0100)] 
dwarflint: Extract "local function" out of the method

14 years agodwarflint: Add a test case for check_self_referential_die
Petr Machata [Thu, 17 Mar 2011 16:18:29 +0000 (17:18 +0100)] 
dwarflint: Add a test case for check_self_referential_die

14 years agoMerge remote-tracking branch 'origin/mjw/check_self_referential_die' into dwarf
Petr Machata [Thu, 17 Mar 2011 16:08:35 +0000 (17:08 +0100)] 
Merge remote-tracking branch 'origin/mjw/check_self_referential_die' into dwarf

14 years agodwarflint: Fix message filtering
Petr Machata [Thu, 17 Mar 2011 16:06:53 +0000 (17:06 +0100)] 
dwarflint: Fix message filtering

14 years agoWorkaround all self referential ref values, not just DW_AT_containing_type.
Mark Wielaard [Thu, 17 Mar 2011 11:46:06 +0000 (12:46 +0100)] 
Workaround all self referential ref values, not just DW_AT_containing_type.

14 years agodwarflint: More thorough validation of ELF sections
Petr Machata [Thu, 17 Mar 2011 12:17:35 +0000 (13:17 +0100)] 
dwarflint: More thorough validation of ELF sections