Commit Graph

15 Commits

Author SHA1 Message Date
David Anderson
4945a195c3 Removed trailing whitespace.
dwarfdump/print_die.c
dwarfdump/tag_attr.c
dwarfdump/tag_tree.c

libdwarf/dwarf_elf_access.c
libdwarf/dwarf_original_elf_init.c
libdwarf/dwarf_tsearchhash.c
libdwarf/libdwarfdefs.h
2016-02-06 14:38:13 -08: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
3e442d6a40 Better compiler checking with --enable-wall..
Now all with prototypes.
Local functions now declared static.
One crucial bug in macrocheck.c in calling dwarf_twalk fixed.
dwarfdump/configure
dwarfdump/configure.in
dwarfdump/dwarf_tsearchbal.c delete unused function
dwarfdump/dwarfdump.c
dwarfdump/dwconf.c
dwarfdump/dwgetopt.c
dwarfdump/globals.h
dwarfdump/macrocheck.c
dwarfdump/naming.c
dwarfdump/print_gdbindex.c
dwarfdump/tag_attr.c
dwarfdump/tag_common.c

Better compiler checking with --enable-wall..
Now all with prototypes.
Local functions now declared static.
Some old and new functions documented in mm.
libdwarf/Makefile.in
libdwarf/configure
libdwarf/configure.in
libdwarf/dwarf_macro5.c
libdwarf/dwarf_original_elf_init.c
libdwarf/dwarf_query.c
libdwarf/dwarf_stubs.c
libdwarf/dwarf_util.c
libdwarf/dwgetopt.c
libdwarf/libdwarf.h.in
libdwarf/libdwarf2.1.mm
libdwarf/libdwarf2.1.pdf Regenerated. V 2.39
libdwarf/pro_alloc.c
libdwarf/pro_alloc.h

delete unused function.
tsearch/dwarf_tsearchbal.c

files:
2016-01-20 10:32:39 -08:00
David Anderson
8b2ac2b95a * dwarfdump.1: Documented -x line5=.
* dwarfdump.c: Revised -g so it no longer turns on -i.
       Revised the meaning of -g to mean use old loclist interfaces
       (for testing the older interfaces with dwarfdump).
     * print_die.c(get_small_encoding_integer_and_name): a dwarf_dealloc
       referenced err whereas *err was correct.
       Revised loclist output making it look a bit like DWARF5
       even for DWARF2,3,4 output. Reads better, I think.
     * print_locs.c: -l gets a 'no longer supported' message

dwarfdump/dwarfdump.1
dwarfdump/dwarfdump.c
dwarfdump/print_die.c
dwarfdump/print_locs.c

     * dwarf_alloc.c: Added new checks so  user mixing up
       tied dbg with regular dbg won't lead to crashes
       when calling dwarf_dealloc or dwarf_finish().
       Zeroed out some fields to recognize space deallocated.
     * dwarf_die_deliv.c: Added support of split dwarf
       DW_AT_[GNU_]ranges_base
     * dwarf_form.c: Load string from tieddbg when appropriate.
     * dwarf_harmless.c: On free() zero out a field to show that was done.
     * dwarf_loc.c: Correct the handling of split dwarf loclist.
     * dwarf_opaque.h: Add cc_ranges_base_present for split dwarf.
       Add _dwarf_get_ranges_base_attr_from_tied() for split dwarf.
     * dwarf_query.c: Get and remember skeleton compilaton unit
       DW_AT_[GNU_]ranges_base from tied objects for split dwarf.
     * dwarf_ranges.c: If a tied object present, look for ranges
       there, not in split dwarf object.
     * dwarf_util.c: Housekeeping zeros out fields to ensure not
       used after dealloc.

libdwarf/dwarf_alloc.c
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_form.c
libdwarf/dwarf_harmless.c
libdwarf/dwarf_loc.c
libdwarf/dwarf_loc2.c
libdwarf/dwarf_opaque.h
libdwarf/dwarf_original_elf_init.c
libdwarf/dwarf_query.c
libdwarf/dwarf_ranges.c
libdwarf/dwarf_util.c
2015-11-07 14:42:52 -08:00
David Anderson
75cef5f84e Small corrections to dwarfdump.c for DebugFission handling.
More substantial corrections to get the DebugFission code
in libdwarf working.
2015-09-12 12:46:01 -07:00
David Anderson
c5ab119f8c Adding -x tied=<path> option to dwarfdump and added
code in libdwarf to go to the other, the tied, object
and retrieve .debug_addr data.
dwarfdump/ChangeLog
dwarfdump/dwarfdump.1
dwarfdump/dwarfdump.c
dwarfdump/print_die.c
libdwarf/ChangeLog
libdwarf/Makefile.in
libdwarf/dwarf_alloc.c
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_error.c
libdwarf/dwarf_form.c
libdwarf/dwarf_opaque.h
libdwarf/dwarf_original_elf_init.c
libdwarf/dwarf_query.c
dwarf_tied.c
libdwarf/libdwarf.h.in
2015-09-11 09:04:05 -07:00
David Anderson
a019919b48 libdwarf/dwarf_original_elf_init.c(dwarf_elf_init_file_ownership):
When dwarf_elf_object_access_init() returns DW_DLV_ERROR
the Dwarf_Error was not getting set. Now it is set.
2015-02-13 09:15:30 -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
e73b507d2e Avoid passing null dbg to dwarf_finish. Update version strings.
dwarfdump/common.c
dwarfdump/dwarfdump.c

Now avoids coredump if null DBG passed to dwarf_finish()
libdwarf/dwarf_original_elf_init.c
2015-01-05 11:44:02 -08: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
a9b1aa627f Regenerate configure in dwarfdump, libdwarf, dwarfdump2.
Add a comment about a libdwarf reference to HAVE_ELF_C_READ_MMAP.
That define looks like it belongs in config.h but
does not appear there nor in config.h.in
-- because it is not really necessary.
2012-11-17 14:18:03 -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
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