2016-05-07 David Anderson
    * libdwarf.h.in, dwarf_errmsg_list.c: New error codes for
      stopping due to corrupted frame data.
    * dwarf_frame.c,dwarf_frame.h,dwarf_frame2.c,dwarf_line.c:
      Notice frame area overrun and generate error.
2016-05-06 David Anderson
    * dwarf_errmsg_list.c: Added DW_DLE_ZLIB_SECTION_SHORT.
    * dwarf_form.c: Now checking for section overrun.
    * dwarf_init_finish.c: Now checking zlib reading
      for section overrun.
    * dwarf_macro5.c: Now checking for section overrun and
      also fixing double delete caused by having
      _dwarf_get_alloc() space pointing at other _dwarf_get_alloc()
      space. Because in case of error the order of free 
      of such is unpredictable!
    * dwarf_macro5.h: Added comment on mc_srcfiles member.
    * libdwarf.h.in: Added DW_DLE_ZLIB_SECTION_SHORT.
2016-05-05 David Anderson
    * dwarf_form.c: Add a test so that a really large form_block length
      will not  be considered safe (due to unsigned arithmetic
      overflow).
      Fixed the new check-code reading  string offsets section
      so the endpoint in the check is that section, not debug_info.
    * dwarf_query.c: New function _dwarf_calculate_info_section_start_ptr()
      helps in some checking.
    * dwarf_util.h: Add a test so arithmetic overflow will not show
      a bogus value as being ok.
    * libdwarf.h.in,dwarf_errmsg_list.c: Add error code 
      DW_DLE_FORM_BLOCK_LENGTH_ERROR so we have a specific
      error for this case.
    * dwarf_line.c: %lld switched to  "%" DW_PR_DSd
    * dwarf_opaque.h: Added function declaration for 
      _dwarf_calculate_info_section_start_ptr().
2016-05-04 David Anderson
    * dwarf_macro5.c(construct_at_path_from_parts): Move 3 lines 
      of code up to test for NULL pointer. So we do not 
      dereference the pointer.
2016-05-03 David Anderson
    * dwarf_die_deliv.c: Add checks for overrun of end of section
      due to corrupted DWARF.
    * dwarf_arange.c,dwarf_util.c: first use of READ_UNALIGNED_CK.
    * dwarf_errmsg_list.c, libdwarf.h.in: DW_DLE_READ_LITTLEENDIAN_ERROR
      and DW_DLE_READ_BIGENDIAN_ERROR are errors possible
      in READ_UNALIGNED_CK. DW_DLE_LINE_OFFSET_WRONG_FORM gives
      a more meaningful description of a particular corruption
      problem (not a new test, just a new error name).
    * dwarf_elf_access.c: Add a check on relocations to ensure
      we do not write off the end of the section.
    * dwarf_query.c: Using local variables for shorter lines.
    * dwarf_util.h: Implement READ_UNALIGNED_CK macros.
    * dwarf_leb.c: Improve a couple comments.
    * dwarf_line.c: Now use DW_DLE_LINE_OFFSET_WRONG_FORM.
      Add operandmismatch() to get better debug information
      in case of corrupted dwarf. Revise the code for
      clarity.
    * dwarf_macro5.c: Duplicate free() could result if
      dwarf_finish() was used to clean up from a dwarf macro
      context.  Two functions are really static so
      the function type set properly now.
2016-04-30 David Anderson
    * dwarf_frame.c, dwarf_line_table_reader_common.c,
      dwarf_loc2.c: switch to using DECODE_LEB*_CK.
    * dwarf_frame.c: Delete unused local variables.
         Use DECODE_LEB*_CK for better error checking.
    * dwarf_frame2.c, dwarf_frame.h: Internal functions get new
      arguments to support DECODE_LEB*_CK. 
    * dwarf_arange.c: Using UNUSEDARG to suppress warning.
    * dwarf_line_table_reader_common.c: Use DECODE_LEB*_CK 
      for better error checking.
    * dwarf_loc2.c: Use DECODE_LEB*_CK 
      for better error checking.
2016-04-30 David Anderson
    * 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-29 David Anderson
    * dwarf_line_table_reader_common.c, dwarf_macro.c,
      dwarf_macro5.c, dwarf_util.c, dwarf_util.h:
      Now use DECODE_LEB128_*CK macros simplifying
      the code while catching errors/corruption in DWARF
      data.
2016-04-28 David Anderson
    * dwarf_die_deliv.c: Now _dwarf_next_die_info_ptr() has
      a section length argument.
    * dwarf_query.c, dwarf_util.c: Now uses the checked version
      of leb reading.
    * dwarf_util.h: Now _dwarf_get_size_of_val() has
      section_end_ptr argument for checking leb values
      do not overrun end of section.
2016-04-27 David Anderson
    * dwarf_frame2.c: Now notices a frame-length field
      which is too large to be meaningful and returns
      an error..
2016-04-27 David Anderson
    * Makefile.in: Now dwarf_error.o dependency on
      dwarf_errmsg_list.c is explicit.
    * dwarf_errmsg_list.c: New error strings.
    * libdwarf.h.in: New error values for when running off
      end of section and line range and address size where
      zero leads to trouble..
    * dwarf_abbrev.c,dwarf_die_deliv.c, dwarf_frame.c,
      dwarf_frame.h, dwarf_frame2.c,dwarf_frame3.c,dwarf_leb.c,
      dwarf_line.c, dwarf_line.h, dwarf_line_table_reader_common.c,
      dwarf_query.c,dwarf_util.c,dwarf_util.h: 
      Add checks for running off end of section.
2016-04-26 David Anderson
    * Makefile.in: The new errmsg_check dependency
      line was a bit wrong. libdwarf.h should not have $(srcdir)
2016-04-25 David Anderson
    * dwarf_errmsg_list.c: When -DTESTING ensure all the 
      error messages have a value in () so we can check 
      that value.
2016-04-25 David Anderson
    * dwarf_tied.c: A C11-ism crept in. Fixed.
      Added 'static' to local function declaration.
      Removed unused local variable.
    * dwarf_errmsg_list.c: Now checks that the number in ()
      matches the index (and still checks that the array size
      is the declared size) when compiled -DTESTING. 
2016-04-25 David Anderson
    * dwarf_errmsg_list.c: Fixed indent mistakes.
    * dwarf_leb.c: Fixed places were leb128_length
      was assumed non-null (dwarf_form.c passes NULL!).
2016-04-25 David Anderson
    * Makefile.in: Added testing of the _dwarf_errmsgs array.
    * dwarf_error.c: Moved _dwarf_errmsgs out of dwarf_error.c into
      dwarf_errmsg_list.c
    * dwarf_errmsg_list.c: Now has error strings and test code.
2016-04-25 David Anderson
    * dwarf_error.c: The error description
      "DW_DLE_GDB_INDEX_INDEX_ERROR(264)" was missing the
      comma so following errors were reporting the wrong string.
2016-04-21  Carlos Alberto Enciso
     * Use the _WIN32 macro to identify a WINDOWS specific code.
2016-03-14 David Anderson
    * dwarf_util.c: Changed 'byte' to 'byte pair'
      in a comment.  Where we read abbreviation AT/FORM lists.
2016-03-14 David Anderson
    * dwarf_error.c(_dwarf_errno): Now prints to stdout and
      does abort(1) when it has to give up. Instead of
      using stderr and abort().
      It is not a good idea for applications to fail to provide
      error handling, so no one should notice this change.
    * libdwarf2.1.mm: Documents behavior in case there is no error
      handling provided by our caller.
    * libdwarf2.1.pdf: Regenerated. Rev 2.48.
2016-03-14 David Anderson
    * libdwarf2.1.mm: Documents Dwarf_Handler error handler function.
    * libdwarf2.1.pdf: Regenerated. Rev 2.47.
2016-03-13 David Anderson
    * dwarf_query.c: Use dwarf_formstring to read string
      attributes as it handles all the string types already.
      Now dwarf_diename() and dwarf_die_text() call dwarf_formstring()
      so DW_FORM_strp_sup and DW_FORM_GNU_strp_alt are
      properly handled(along with all the other string FORMs).
    * dwarf_form.c: Handle an error in dwarf_formstring()
      (for tied files, or the lack thereof)
      differently so it all works properly even if the incoming
      error argument is null.
2016-03-12 David Anderson
    * dwarf_abbrev.c: Uses renamed fields abbrev internal struct.
      Removes some gratuitous (). Adds clarifying {}
    * dwarf_abbrev.h: renames Dwarf_Abbrev_s struct fields
      from ab_tag to dab_tag, etc.
      Adds global section offset to the fields.
    * dwarf_die_deliv.c: Uses renamed Abbrev_List fields.
      Adds dwarf_die_abbrev_global_offset() function so 
      clients can properly identify where an abbrev entry is
      in .debug_abbrev.
    * dwarf_die_deliv.h: renames Dwarf_Abbrev_List 
      struct fields from ab_tag to abl_tag etc.
      Adds abl_goffset, abl_count.
    * dwarf_query.c,dwarf_util.c: Uses renamed Dwarf_Abbrev_List 
      fields.
    * libdwarf.h.in: Adds function dwarf_die_abbrev_global_offset().
    * libdwarf2.1.mm: Documents dwarf_die_abbrev_global_offset().
    * libdwarf2.1.pdf: Regenerated. Rev 2.46.
2016-03-11 David Anderson
    * 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.
    * dwarf_addr_finder.c: Though no longer compiled or used (is IRIX only),
      cleaned up local variable declarations that were not
      up to the current standard usage in libdwarf.
2016-03-11 David Anderson
    * Makefile.in: Added a comment about pr and pdf-building.
2016-03-09 David Anderson
    * libdwarf2.1.mm: Slightly altered the dwarf_offsets_list() documentation.
    * libdwarf2.1.pdf: Rev 2.44. Regenerated.
2016-03-09 David Anderson
    * dwarf_form.c: Correct and amplify a comment.
2016-03-01 David Anderson
    * libdwarf2.1.mm: Documented dwarf_dietype() and
      dwarf_offset_list().
    * libdwarf2.1.pdf: Regenerated. Rev 2.43
    * checkexamples.c: Added example for dwarf_offset_list().
2016-02-19 Carlos Alberto Enciso 
   * dwarf_alloc.h, dwarf_alloc.c, dwarf_base_types.h, dwarf_opaque.h:
      New allocator type (DW_DLA_CHAIN_2), to allow a list of addressed
      types (address, offset).
      There was  Memory corruption due to incorrect usage of 
      memory allocator type.
    * dwarf_query.c: Use the new allocator type.
2016-02-14  David Anderson
    * libdwarf2.1.mm: dwarf_exprloc -> dwarf_formexprloc.
      The spelling error was introduced in version 2.41.
    * libdwarf2.1.pdf: Regenerated. Version 2.42
2016-02-13  David Anderson
    * libdwarf2.1.mm: Added dwarf_lineoff_b() documentation.
      Fixed a typo in dwarf_formexprloc() documentation.
    * libdwarf2.1.pdf: Regenerated. Version 2.41
    * Makefile.in: Add HOSTCFLAGS HOSTLDFLAGS HOSTCC to make
      it easier to cross-compile.  Remove common.c, common.h
      (a few lines of code moved to gennames.c).
    * README: document use of HOSTCC
    * common.c,common.h: Delete. A few lines of code moved to gennames.c.
    * configure.in: for AC_TRY_RUN add [],[] for else and for
      cross-compile cases.
    * configure: Regenerated.
    * dwarf_die_deliv.c, dwarf_frame2.c, dwarf_line.c, 
      dwarf_macro5.c, dwarf_print_lines.c, dwarf_ranges.c:
      Renamed to avoid shadowing variables with same name. 
      For clarity.
    * gennames.c: Incorporates a few lines from common.c
      so common.c, common.h can be deleted.
2016-02-10  David Anderson
    * README: Improved a comment about Dwarf_Obj_Access_Methods.
    * dwarf_elf_access.c: New function _dwarf_get_elf_flags_func()
      extracts the sh_flags field from Elf sections. In an odd way
      so we preserve binary and source compatibility.+
    * dwarf_error.c,libdwarf.h.in: New error DW_DLE_ELF_FLAGS_NOT_AVAILABLE.
    * dwarf_init_finish.c: Use new (global) function pointer
      _dwarf_get_elf_flags_func_ptr
      to access extra Elf data without breaking compatibility.
      Add additional way (SHF_COMPRESSED) to detect zlib
      compression and expand the compressed data.
2016-02-08  David Anderson
    * dwarf_alloc.c: Drop VALTYPE, use DW_TSHASHTYPE instead.
      Use DW_TSHASHTYPE in the hash functions.
    * dwarf_tied.c: Use DW_TSHASHTYPE in the hash function.
    * dwarf_tsearchhash.c: Add back the UNUSEDARG to avoid
      unused argument warnings.
2016-02-07  David Anderson
    * dwarf_init_finish.c: Fix indents. remove a trailing space.
    * dwarf_tsearch.h,dwarf_tsearchhash.c: Now DW_TSHASHTYPE (if not defined
      otherwise) defines the type returned by the hash function
      used in tsearchhash.
    * pro_alloc.c: Removed trailing whitespace.
2016-02-07  David Anderson
    * README: Mention 
      https://github.com/jrfonseca/drmingw/tree/master/src/mgwhelp
    * dwarf_init_finish.c: If SHT_RELA not defined define it as 4
      in hopes that will not cause trouble for mingw.  For Elf
      objects 4 is the correct value and is defined in elf.h
2016-02-06  David Anderson
    * dwarf_elf_access.c,dwarf_original_elf_init.c,dwarf_tsearchhash.c,
      libdwarfdefs.h: Remove trailing whitespace.
2016-02-06  David Anderson
    * configure.in: defines HAVE_UNUSED_ATTRIBUTE 
      if the gcc '__attribute__ ((unused))' 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  David Anderson
     * dwarf_tsearchhash.c: The original default
       hash table size (a prime number) was very small. Now its
       closer to 100.
2016-02-06  David Anderson
     * dwarf_frame.h: Added fde_fd_eh_table_value. 
       Added fde->fd_gnu_eh_aug_present so presence/absence
       is unambiguous.
     * dwarf_frame.c: Added code to set fd_eh_table_value when
       appropriate, though there is no interface for dwarfdump to
       get the value yet.
     * dwarf_frame2.c: Update the new fields appropriately.
       Corrected some comments about the eh_frame cie_id field.
2016-02-05  David Anderson
     * dwarf_frame2.c: Comments in get_cieptr_given_offset()
       were slightly incorrect and one calculation was pointlessly
       full of casts.  Fixed commentary about the CIE_pointer
       (CIE id or FDE id) field in a frame header.
     * dwarf_loc2.c: Fixed compiler warning on signed/unsigned
       comparison by changing local variable int->Dwarf_Unsigned..  
     * pro_init.c:  Removed extraneous semicolon to avoid
       warning for C90.
2016-01-26  David Anderson
     * dwarf_abbrev.c: Remove useless blank line.
     * dwarf_macro5.c: Add check for macro_import offset correctness.
2016-01-21  David Anderson
     * libdwarf.h.in: Typo, */* fixed to be * /*
     * configure.in: Added new gcc compiler options to --enable-wall.
     * configure: regenerated.
     * dwarf_die_deliv.c dwarf_frame.c,dwarf_frame2.c,dwarf_gdbindex.c,
       dwarf_gdbindex.h,dwarf_line.c,dwarf_line.h,
       dwarf_line_table_reader_common.c,dwarf_macro5.c,dwarf_query.c,
       dwarf_tsearchhash.c: Eliminated use of int/Dwarf_Signed 
       in favor of unsigned types where
       signed served no purpose. Added ommitted return DW_DLV_NO_ERROR
       in dwarf_frame2.c.  Other than 'unused parameter' fixed
       the warnings from gcc.
       No interfaces changed though. To keep binary compatibility.
2016-01-20  David Anderson
     * dwarf_query.c: New function dwarf_die_text() is a general way
       to get strings from various attributes in a DIE.
     * libdwarf.h.in: Add prototype for dwarf_die_text().
     * libdwarf2.1.mm: Document dwarf_die_text().
     * libdwarf2.1.pdf: Regenerated. Version 2.40.

2016-01-19  David Anderson
     * Makefile.in: Remove dwarf_stubs.o.
     * configure.in: Add various gcc opts to --enable-wall
       to get appropriate coverage.
     * configure: regenerated.
     * dwarf_macro5.c: File-local functions now declared static.
     * dwarf_query.c: File-local functions now declared static.
     * dwarf_stubs.c: No longer this function. It never had a prototype
       declaration and never had more than return DW_DLV_ERROR as
       an implementation.
     * dwarf_util.c: Remove trailing whitespace.
     * dwarf_original_elf_init.c(dwarf_set_tied_dbg): Added 
       check for null dbg.
     * dwgetopt.c: Add include of dwgetopt.h. #if 0 a testing-only function.
       All functions prototyped, no ().
     * libdwarf.h.in: Comment out argument names for safety.
       Added dwarf_get_tied_dbg(), dwarf_dietype_offset(),
       dwarf_pubtype_type_die_offset() declarations.
       Sorted the dwarf_get_TAG_name() etc function names.
     * pro_alloc.c: Documented and commented a useless function,
       dwarf_p_dealloc(). .
     * pro_alloc.h: Prototyped both the useful and useless
       global-to-libdwarf producer 
       functions _dwarf_p_dealloc and dwarf_p_dealloc.
     * libdwarf2.1.mm: Documented dwarf_get_tied_dbg(),
       dwarf_fde_section_offset(), and dwarf_cie_section_offset() 
     * libdwarf2.1.pdf: Regenerated. Rev 2.39
2016-01-19  David Anderson
     * dwarf_form.c,dwarf_macro5.c: Ensure declarations 
       before executable statements
     * dwarf_loc.c: Cast pointer to Dwarf_Small* so pointer arithmetic
       works (standard conformance).
       Ensure declarations before executable statements
     * dwarf_macro5.c: Ensure declarations before executable statements.
     * dwarf_query.c: Ensure declarations before executable statements.
       Add dwarf_dietype_offset() convenience function.
     * dwarf_util.c: Use a local name that does not conflict
       with standards. use mydw_errno, not errno.
     * dwarf_frame2.c(dwarf_read_cie_fde_prefix):  Add tests 
       to ensure we do not access past end of a section.
2016-01-19  David Anderson
     * dwarf_form.c, dwarf_frame2.c,: Fix indentation and trailing whitespace.
2016-01-19  David Anderson
     * dwarf_line.c, dwarf_line_table_reader_common.c,
       dwarf_loc.c, dwarf_macro5.c, dwarf_query.c, pro_die.c:
       Remove silly second ; from ;; where appropriate.
2016-01-19  David Anderson
     * libdwarf.h.in, dwarf_error.c: New error numbers. 
       DW_DLE_LINE_STRP_OFFSET_BAD, DW_DLE_STRING_FORM_IMPROPER.
     * dwarf_form.c: Added suport for DW_FORM_line_strp into 
       dwarf_form_string().
2016-01-17  David Anderson
     * dwarf_frame2.c: Added additional checks for
       bad frame section. Looking for premature end of frame data.
2016-01-16  David Anderson
     * libdwarf2.1.mm: Documented DWARF5 macro operations.
       Version 2.38
     * libdwarf2.1.pdf: Regenerated.
     * libdwarf2p.1.pdf: Regenerated following a trivial
       clarification on cie production made a couple days ago.
2016-01-15  David Anderson
     * pro_frame.h, pro_frame.c: The code adding a CIE for output
       (dwarf_add_frame_cie())
       was simply assuming that the augmentation string passed in was
       in stable storage.  Now it uses strdup() to guarantee there
       no surprises.
2016-01-14  David Anderson
     * dwarf_query.c(dwarf_die_offsets): 'res ==' corrected to 'res ='.
2016-01-12  David Anderson
     * dwarf_macro5.c: Fixed DW_MACRO_define/undef
       calls of  _dwarf_check_string_valid().
       Arranged to get the macro unit offset out
       when creating context.
     * libdwarf.h.in: Fixed declaration of dwarf_get_macro_context()
       to get the macro unit offset out of it
       so it can work properly in all contexts.
     

