Commit Graph

16 Commits

Author SHA1 Message Date
David Anderson
0c259d4b70 libdwarf
* dwarf_die_deliv.c: Deleted unused local variable.
    * dwarf_form.c,dwarf_macro.c, dwarf_macro5.c: Now uses
      DCODE_LEB128*_CK nearly everywhere
      for better checking for corrupted data.
    * dwarf_opaque.h:New argument to _dwarf_get_addr_index_itself()
      for better data checks..
    * dwarf_query.c: Uses revised _dwarf_get_addr_index_itself()
      interface.
    * dwarf_util.c: Fixed formatting errors.
2016-04-30 07:15:22 -07:00
David Anderson
d15483a528 libdwarf: Catching leb errors/corruption
and simplifying the code.
   dwarf_line_table_reader_common.c
   dwarf_macro.c
   dwarf_macro5.c
   dwarf_util.c
   dwarf_util.h
2016-04-29 15:41:16 -07:00
David Anderson
8857cf5fea Now supports experimental two-level line tables,
though -vvv -l (printing internal details) does not
yet work.
Some dead variables deleted and indent mistakes fixed too.
dwarfdump/common.c
dwarfdump/dwarfdump.c
dwarfdump/print_lines.c
libdwarf/dw-linetableheader.txt
libdwarf/dwarf_abbrev.c
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_form.c
libdwarf/dwarf_init_finish.c
libdwarf/dwarf_line.c
libdwarf/dwarf_loc.c
libdwarf/dwarf_macro.c
libdwarf/dwarf_query.c
libdwarf/dwarf_tied.c
libdwarf/dwarf_xu_index.c
2015-09-23 13:08:30 -07:00
David Anderson
abb74550fe dwarf_form.c,dwarf_global.c,dwarf_line.c,dwarf_macro.c,dwarf_util.c:
Fixed indents and removed trailing whitespace.
2015-09-14 15:46:47 -07:00
David Anderson
f5650ae6ec This ensures that non-terminated DWARF strings
are caught so we avoid some coredumps.

Such strings in DWARF are created by 'fuzzing' or
by a bug in a compiler or linker.

libdwarf/dwarf_error.c
libdwarf/dwarf_form.c
libdwarf/dwarf_frame.c
libdwarf/dwarf_frame.h
libdwarf/dwarf_frame2.c
libdwarf/dwarf_global.c
libdwarf/dwarf_line.c
libdwarf/dwarf_macro.c
libdwarf/dwarf_string.c
libdwarf/dwarf_util.c
libdwarf/dwarf_util.h
libdwarf/libdwarf.h.in
2015-09-13 16:05:10 -07:00
David Anderson
c665613423 libdwarf: major changes to support DWP Package Files
in DWARF5.   Some support of DWARF5 generally.

DWP support itself not well tested, but for non-DWP
objects things work as before.
2015-05-01 17:10:42 -07:00
David Anderson
2d88cea086 libdwarf: Complete the removal of obsolete SGI postal address and
oss.sgi.com from copyright notices.
libdwarf/LIBDWARFCOPYRIGHT has an original example of copyright
and explains the change.
2015-01-31 10:09:02 -08:00
David Anderson
b6ea605c1e Changes to support debugfission added, so we can
dump dwarf from .dwp files.
Some additional change an testing will be added.
2015-01-18 12:48:41 -08:00
David Anderson
80eb13ac27 3 one-line fixes, removing three compiler warnings.
dwarfdump/print_die.c

libdwarf/dwarf_macro.c
libdwarf/dwarf_xu_index.c
2014-08-11 14:18:40 -07:00
David Anderson
a4a854003e libdwarf:
dwarf_print_lines.c,dwarf_macro.c: Remove trailing whitespace.
dwarf_ranges.c, dwarf_sort_lines.c: Remove trailing whitespace.
dwarf_query.c, dwarf_pubtypes.c: Remove trailing whitespace.
dwarf_original_elf_init.c,dwarf_loc.c: Remove trailing whitespace.
gennames.c: Fix a printf so the generated dwarf_names.c
        does not have a trailing space.
2014-01-10 16:21:01 -08:00
David Anderson
791398ca4d Makes it easier to build under FreeBSD.
Fixes signed/unsigned comparison issues noted by -Wsign-compare
2013-01-16 15:51:41 -08:00
David Anderson
22cc16439d Update copyright year on a large number of files.
Everthing touched recently.
2012-11-17 13:31:29 -08:00
Carlos Alberto Enciso
82491fc2c7 Changes requested by David Anderson and described below. Also a general
change to make consistent use of 'if', 'for' and 'while'.

===================
dwarfdump.c lines 73-78  Any time an 'extern foo' appears in a .c or a .cc
file it represents a current or future error that cannot be easily detected
at compile time. Bad.

Instead, put print_attributes_encoding and current_cu_die_for_print_frames
declarations into appropriate .h files (possibly new one or ones?) and
include the header in each .c/.cc where it is needed. That prevents future
spelling errors from causing mysterious runtime failures due to argument
errors: the compiler will catch argument errors.

Now line 56-58 is special in that it refers to some windows thing, not
defined in  dwarfdump. So that one perhaps should or must stay as written.

===================
dwarfdump.c line 549: the variable 'bitmap' should be named something else.
bitmap is just too generic, not helpful to the reader. Easier for a
reviewer to see this sort of issue than the author :-)

Possibly local_section_bitmap? Somehow get 'section' in there in that
function-argument-name?

=======
dwarfdump.c: good catch on the indent errors in qsort_compare_compiler(),
I have no idea how I failed to run dicheck on that.

======
dwarfdump.c line 1043.  The 'Just for the moment' comment is odd. What
does that mean?  Why 'for the moment'? I am not going to try to guess
why you did that, but it has to be somehow wrong?
Either the code or the comment?

========
dwarfdump.c line 1162.  The comment says do not do reloc_flag = TRUE
yet you added exactly that!  Yikes! I don't know what to do about
this, but something has to change. Comment or statement. Can we detect
non-elf somehow? We probably already do, but...

===================
dwarfdump.c line 1630. Oops. Good catch on removing the mistaken extra
break;
2012-11-01 12:35:57 +00:00
David Anderson
db3833f2d5 * NEWS: Mention the non-elf documentation oversight.
* dwarf_arange.c,dwarf_elf_access.c, dwarf_frame3.c,
       dwarf_funcs.c,dwarf_global.c,dwarf_init_finish.c,
       dwarf_line.c,dwarf_loc.c,dwarf_macro.c,dwarf_print_lines.c,
       dwarf_pubtypes.c,dwarf_query.c,dwarf_ranges.c,dwarf_string.c,
       dwarf_types.c,dwarf_vars.c, dwarf_weaks.c: Everything loading
       a section now checks the result for 'empty' and returns
       DW_DLV_NO_ENTRY explicitly.  This makes it easier to
       do nothing safely when there is no data.
2011-06-04 16:03:48 -07:00
David Anderson
a3eb288589 All the files changed, a massive correction to inconsistent
indentation.  No interfaces changed.  One new and
not very significant (to most people) interface added which
returns a count of abbreviations in an abbreviation section.
Copyrights updated for 2011.
2011-03-29 13:31:47 -07:00
David Anderson
637442ea0b Initial commit. Content is the libdwarf-20110113.tar.gz
last-released-libdwarf and dwarfdump.
2011-03-19 11:38:11 -07:00