Commit Graph

10 Commits

Author SHA1 Message Date
David Anderson
ebf7f8b181 * dwarf_die_deliv.c: Fixed issues with handling NULL
Dwarf_Error*  and with mistakes treating DW_DLV_NO_ENTRY
      as if it were DW_DLV_ERROR.
    * dwarf_form.c: Only do dwarf_errno(*error) when error is non-null.
    * dwarf_macro5.c, dwarf_query.c, dwarf_ranges.c: Avoid the
      possibility of
      doing dwarf_errno(*error) when error is null.
    * dwarf_util.c(_dwarf_error_mv_s_to_t): Added code to
      ensure that nothing crash-worthy happens
      even if a future internal caller calls it with one or more NULL
      arguments.
    * libdwarf2.1.mm: Added a few words about Error Handling in general
      to clarify earlier wording (earlier wording  was not as explicit
      as it should have been).
    * libdwarf2.1.pdf: Regenerated. Version 2.45
    * dwarf_sort_line.c: Though no longer built or used, added
      an initializer to a local variable for correctness.
2016-03-11 12:41:28 -08:00
David Anderson
20aa79e719 libdwarf:
dwarf_global.c,dwarf_line.c,dwarf_line.h,dwarf_line2.c,
       dwarf_line_table_reader_common.c,dwarf_sort_line.c,libdwarf.h.in:
       The SGI IRIX only fields in dwarf_line.h ifdef __sgi now.
       And all code referencing them that way too. Balancing
       #endif has /* __sgi */ now for searchability.
       Functions only usable on SGI IRIX only compiled in if __sgi
       macro defined.
libdwarf2.1.mm: Added a comment related to experimental
       two-level line tables.
2015-09-30 16:07:27 -07:00
David Anderson
456fe6c3c8 Changed an internal function to have a leading _ in the name
and added a Dwarf_CU_Context argument so we can get address
size and segment size when not in the line table.
All this related to two-level line tables.

dwarfdump/print_lines.c
libdwarf/dwarf.h
libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_line.c
libdwarf/dwarf_line.h
libdwarf/dwarf_opaque.h
libdwarf/dwarf_print_lines.c
libdwarf/dwarf_sort_line.c
libdwarf/libdwarf.h.in
2015-09-19 18:21:52 -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
6caed6d274 Here we fix some warnings and get gdbindex
to print better.  And get some section names to
come out exactly right (but not all, yet).
dwarfdump/dwarfdump.1
dwarfdump/dwarfdump.c
dwarfdump/print_gdbindex.c
dwarfdump2/dwarfdump.1
dwarfdump2/dwarfdump.cc
dwarfdump2/print_debugfission.cc
dwarfdump2/print_die.cc
dwarfdump2/print_gdbindex.cc

Here we fix some warnings.
libdwarf/dwarf_alloc.c
libdwarf/dwarf_alloc.h
libdwarf/dwarf_gdbindex.c
libdwarf/dwarf_loc.c
libdwarf/dwarf_query.c
libdwarf/dwarf_sort_line.c

Here we fix some warnings.
libdwarf/dwarf_tsearchhash.c
tsearch/dwarf_tsearchhash.c

Here we fix some warnings
libdwarf/dwarf_util.c
libdwarf/libdwarf.h.in
libdwarf/pro_alloc.c
libdwarf/pro_arange.c
libdwarf/pro_forms.c
libdwarf/pro_reloc.c
libdwarf/pro_types.c
2014-08-04 13:48:31 -07:00
David Anderson
b77498b0e4 libdwarf: dwarf_ranges.c, dwarf_sort_lines.c: Remove trailing whitespace. 2014-01-10 15:38:12 -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
353a3bf6c1 Added provisional LANG codes (DWARF5) to dwarf.h.
Otherwise just cleaning up (or commenting, where cleanup
not sensible) where there
were -Wall warnings.
2012-07-18 13:26:30 -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