Commit Graph

17 Commits

Author SHA1 Message Date
David Anderson
ac6673e32f dwarfdump
* print_die.c: Fix typo in error message.
* print_frames.c: Do additional checks for incorrect data
  when printing frame instructions to avoid dwarfdump crash..

libdwarf
    * dwarf_form.c: Directly check expression length against
      section length in case expression length very very large.
    * dwarf_query.c: _dwarf_calculate_info_section_*() routines
      made clearer and the *_start_ptr() instance also now returns
      the length (via a pointer arg).
    * dwarf_xu_index.c: Check data read from the section so
      a wildly large columns count or slots count will be caught
      and an error returned.
2016-05-18 18:50:58 -07:00
David Anderson
82d8e00785 bugxml/data.txt
Moved a couple functions between source files
and made them static. A couple commentary changes.
print_frames.c, though, needed hardening against
corrupt frame data.
dwarfdump/globals.h
dwarfdump/print_aranges.c
dwarfdump/print_die.c
dwarfdump/print_frames.c
dwarfdump/print_sections.c

All data reads from an object ensure the
read is actually in a section.
It is always possible something was overlooked, but
all the reading macros and functions now do checks.
libdwarf/dwarf_arange.c
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_errmsg_list.c
libdwarf/dwarf_form.c
libdwarf/dwarf_frame.c
libdwarf/dwarf_frame2.c
libdwarf/dwarf_global.c
libdwarf/dwarf_line.c
libdwarf/dwarf_line_table_reader_common.c
libdwarf/dwarf_loc.c
libdwarf/dwarf_loc2.c
libdwarf/dwarf_macro5.c
libdwarf/dwarf_opaque.h
libdwarf/dwarf_print_lines.c
libdwarf/dwarf_query.c
libdwarf/dwarf_ranges.c
libdwarf/dwarf_util.c
libdwarf/dwarf_util.h
libdwarf/dwarf_xu_index.c
libdwarf/libdwarf.h.in
2016-05-12 07:39:36 -07:00
David Anderson
e9cf490520 * configure.in: defines HAVE_UNUSED_ATTRIBUTE
if the gcc '__attribute__ ((name))' compiles ok.
    * config.h.in, configure: Regenerated.
    * libdwarfdefs.h: Test HAVE_UNUSED_ATTRIBUTE and define
      UNUSEDARG appropriately.
    * dwarf_alloc.c,dwarf_elf_access.c,dwarf_form.c,dwarf_frame2.c,
      dwarf_gdbindex.c,dwarf_global.c,dwarf_init_finish.c,dwarf_line.c,
      dwarf_line_table_reader_common.c,dwarf_macro5.c,
      dwarf_original_elf_init.c,dwarf_print_lines.c,dwarf_ranges.c,
      dwarf_tsearchhash.c,dwarf_util.c,dwarf_xu_index.c,
      pro_alloc.c,pro_frame.c,pro_init.c,pro_reloc.c,
      pro_reloc_stream.c,pro_section.c: Use UNUSEDARG to suppress
      meaningless unused-parameter warnings from gcc.
2016-02-06 09:20:41 -08: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
4ef592a4df A couple new routines failed to return the return code.
A couple places had C99-isms.

dwarfdump/print_die.c
libdwarf/dwarf_form.c
libdwarf/dwarf_xu_index.c
2015-09-15 09:32:06 -07:00
David Anderson
059395fa7a Implementing DWARF5 (and DWARF4 as an extension) DWP Package
File support.
dwarfdump/print_die.c
dwarfexample/simplereader.c
libdwarf/NEWS
libdwarf/dwarf_abbrev.c
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_form.c
libdwarf/dwarf_opaque.h
libdwarf/dwarf_util.c
libdwarf/dwarf_xu_index.c
libdwarf/libdwarf.h.in
libdwarf/libdwarf2.1.mm
libdwarf/libdwarf2.1.pdf
2015-05-06 10:55:32 -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
b755b9f925 Added DWARF5 tags and attributes.
(the standard is not yet final, some of these additions could change).
Added checking code to fix libdwarf coredumps when it is given
erroneous DWARF.
2015-02-04 13:31:09 -08: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
5547cefffb Adds most of the DWARF5 names to dwarf.h 2015-01-30 10:43:47 -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
61ffe240f6 libdwarf has a new interface: dwarf_get_die_section_name()
so clients can get the object
section names
(of .debug_info of .debug_types or the same with .dwo names).
Fixed indent and trailing whitespace a couple places too.
2014-07-12 13:23:29 -07:00
David Anderson
99e0371819 Now -I now prints the entire
.debug_cu_index and .debug_tu_index sections.
2014-07-11 09:22:35 -07:00
David Anderson
03a0883cb6 Now we can print the hash table data from the
.debug_tu_index and .debug_cu_index sections (
debug fission, the .dwp object file index data).
2014-07-10 15:58:02 -07:00
David Anderson
2eccd90196 Removed some newly introduced trailing whitespace characters. 2014-07-09 14:51:37 -07:00
David Anderson
f8caa95d63 libdwarf and dwarfdump now begin to support the DWARF5
sections .debug_tu_index and .debug_cu_index.
2014-07-09 14:45:30 -07:00