Commit Graph

374 Commits

Author SHA1 Message Date
David Anderson
2b236bb094 Added to Changes, added a brief section on UTF-8.
libdwarf2.1.mm
libdwarf2.1.pdf
2015-09-14 11:27:03 -07:00
David Anderson
0f5c47c4b4 libdwarf
libdwarf2.1.mm: Revision 2.28. Now describes dwarf_set_tied_dbg().
  libdwarf2.1.pdf: Regenerated
2015-09-14 08:17:22 -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
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
6c405e3aa6 libdwarf/Makefile now removes ./dwarftied test executable. 2015-09-11 12:44:35 -07:00
David Anderson
f3a5455345 Adding DW_AT_GNU_macros 0x2119
to dwarf.h
2015-09-11 10:18:53 -07:00
David Anderson
c9769665ce Adding DW_AT_GNU_discriminator to dwarf.h 2015-09-11 10:06:49 -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
b06cfaf77e Fixed indent of two lines of dwarf.h 2015-09-05 13:21:56 -07:00
David Anderson
c13df9b5d5 Now use dwoptarg etc, not the standard optarg.
So we use the local version for everything.
libdwarf, dwarfdump,dwarfgen.
2015-07-12 17:10:29 -07:00
Carlos Alberto Enciso
041cbcb69b These changes cover the following areas:
1) Improve the '-S' option algorithm, to get indirect names, from
   DW_AT_specification and DW_AT_abstract_origin attributes, to use
   those names in the comparison for member and inlines functions.
2) Correct incorrect calculation of 'pointer_size' for proprietary
   EM_PPC64 machine type.
3) Changes required when porting the samples to Windows
4) Include additional information for the Windows version.
2015-06-15 10:41:47 +01:00
David Anderson
b272f04131 Dead code surrounded by #if 0 either removed
or commented so output of grep 'if 0' is smaller and less
surprising.

   dwarf_die_deliv.c
   dwarf_frame.c
   dwarf_frame2.c
   dwgetopt.c
   pro_forms.c
   pro_section.c
2015-05-07 13:03:20 -07:00
David Anderson
67578bcf90 Refined libdwarf/NEWS text. 2015-05-07 09:08:01 -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
83e785bc96 Added libdwarf NEWS item 2015-05-01 17:15:31 -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
1a51e18826 Now defining and using
DW_CIE_VERSION* DW_CU_VERSION**
       DW_ARANGES_VERSION* DW_LINE_VERSION* DW_LOC_VERSION*
       DW_LINE_STR_VERSION5, DW_MACRO_VERSION5,
       DW_LINE_LOC, DW_NAMES_VERSION5, DW_PUBNAMES_VERSION*,
       DW_PUBTYPES_VERSION*, DW_STR_OFFSETS_VERSION5,
       DW_SUP_VERSION*, DW_CU_INDEX_VERSION5

exclusively. Deleting the CURRENT_VERSION_STAMP* macros.
The intent is to improve readability given we now have
4 versions of DWARF to deal with.
2015-04-23 13:37:37 -07:00
David Anderson
ec586ede9d Fixing dwgetopt.c. Added test cases for it.
Fixed a very few instances of trailing whitespace in
dwarfdump.
2015-03-10 09:02:41 -07:00
David Anderson
19a6063c59 Now libdwarf dwgetopt.c matches dwarfdump version.
We no longer do inappropriate checking of pc addrs
when a type_unit refers to the line table (there is
no low or high pc, so such checking would fail anyway).
2015-03-09 14:58:21 -07:00
David Anderson
88fe6433c7 Now all getopt() calls use dwgetopt() instead
so all is easier for those without getopt() to build.
To avoid unwanted dependencies dwgetopt.h and dwgetopt.c
are in both dwarfdump and libdwarf directories.
2015-02-26 14:21:06 -08: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
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
b004f18f43 Changing the hash return from the debugfission
from an integer to an 8 byte glob: Dwarf_Sig8
2015-01-31 09:03:03 -08:00
David Anderson
5547cefffb Adds most of the DWARF5 names to dwarf.h 2015-01-30 10:43:47 -08:00
David Anderson
585d0100cc Fixed c99-isms and fixed foratting mistakes
in cmplrs/dwarf_addr_finder.h
2015-01-29 11:05:15 -08:00
David Anderson
8227a4df19 removing unwanted DebugFission code from dwarf_form.c
dwarf_gdbindex.c
Fixing version number libdwarf2.1.mm
regenerate v2.25 libdwarf2.1.pdf
2015-01-28 13:16:10 -08:00
David Anderson
73b19f43e5 libdwarf2.1.mm: documented another debug fission function.
Regenerated, Ver 2.25
2015-01-28 13:08:56 -08:00
David Anderson
2b669f3c5e Level 2 section duplicate of Global Namespace operations
removed from libdwarf2.1.mm
2015-01-28 12:50:15 -08:00
David Anderson
970c6d3ee1 libdwarf/libdwarf2.1.mm: All the dwarf_get_TAG_name
etc functions mislabeled as level 2. Switch to level 3.
2015-01-28 12:45:37 -08:00
David Anderson
46a28e7d5f Now getopt is hard coded (NetBSD BSD license) in libdwarf
so we get consistent behavior.  Specifically allowing the
notion of :: in the option list.
Fixed issues with handling files with both .debug_types and
.debug_info (got spurious warnings with -ky -kd, for example)
on a .dwp object.
Corrected a couple places where we needed to reset a static
variable (renamed the static variable for readability and removed
it from the globals variables).
2015-01-24 16:28:25 -08:00
David Anderson
be85a0a4cb Adds support to printing .dwp DWARF5.
DebugFission.
On FreeBSD is still problematic option handling.
2015-01-21 15:08:30 -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
037d4d0c79 Upate version string. Add va_end() appropriate places.
Move one local variable declaration for c90 conformance.
dwarfdump/common.c
dwarfdump/dwarfdump.c
dwarfdump/esb.c
dwarfdump/tag_common.c

libdwarf/dwarf_init_finish.c
libdwarf/dwarf_util.c
2015-01-12 13:39:58 -08:00
David Anderson
186e8df60c The early returns from _dwarf_setup() lacked a free
of the local malloc space, called 'sections'.
Fixed.
libdwarf/dwarf_init_finish.c
2015-01-11 16:10:12 -08:00
David Anderson
934529a0b7 Update NEWS for libdwarf and dwarfdump.
Added the new -ku -kuf -kD -kG -O file=<path>
options to dwarfdump.1
2015-01-08 17:34:04 -08:00
David Anderson
48ce8f38a1 Now the dwarfdump/ChangeLog and libdwarf/ChangeLog
list the actual changes made in the process of creating
the new checks and reports in dwarfdump.
2015-01-08 14:12:50 -08:00
David Anderson
71cd071eb2 Now the new dwarfdump checking options work. 2015-01-08 13:09:21 -08:00
David Anderson
c0fbefa12c Merge commit '7e527974f54e0f7d8207ebebaf44ad84dad513d5' into ce2 2015-01-06 14:35:09 -08:00
David Anderson
795295a95f libdwarf: fixed indents and removed trailing whitespace. 2015-01-06 13:52:34 -08:00
David Anderson
9a2dfcfe02 Rearrange the code so we do not touch arguments
till we have need for them.
dwarf_alloc.c

Somehow a cast was omitted from return from _dwarf_get_alloc().
Added in the call, removing a warning message.
dwarf_frame.c

In case of elf read error, was using stale Dwarf_Error pointer.
Fixed.
dwarf_init_finish.c
2015-01-06 07:16:21 -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
f25e4274d5 libdwarf:
* libdwarf2p.1.mm: Somehow dwarf_transform_to_disk_form()
       was not documented. Now it is.
     * libdwarf2p.1.pdf: Regenerated, version 1.38.
2015-01-03 13:06:37 -08:00
David Anderson
199a913e2f libdwarf minor enhancements.
dwarf_allo.c: Comment the allocation table base
       more carefully.
dwarf_base_types.h: Making DW_DLA defines more
       readable, more consistent with other instances.
libdwarf.h.in: Adding producer error codes.
       The producer library has some places error values
       are misidentified. Main effect: documentation.
dwarf_error.c:  Add the strings for the new error codes.
2015-01-03 12:53:23 -08:00
David Anderson
2e645452db Update the ChangeLog for the start of 2015. 2015-01-01 11:35:18 -08:00
David Anderson
3ff5a4a024 Updated dwarfdump version strings.
Improved error checking in libdwarf.
2014-12-31 16:45:14 -08:00
David Anderson
c02096a5d8 These files no longer reference dwarfdump2.
BLD
BLDLIBDWARF
BLDTESTDIR
CREATINGARELEASE
Makefile.in
README
UPDATEDWARFDUMPVERSION.sh
configure (regenerated)
configure.in
dwarfdump2/NEWS

This adds improved error reporting in case
of major libdwarf error.
dwarfgen/createirepfrombinary.cc

These are not normally used, but they
enable simple tests of the malloc-fail case.
dwarfgen/TESTmallocfail
dwarfgen/fakemalloc.c

These implement and document new handling
of malloc-space-exhausted special case
for Dwarf_Error.  Using a global.
This has no effect on any client code,
it just enables sensible reports (from libdwarf)
in case the malloc arena exhausted.
libdwarf/dwarf_alloc.c
libdwarf/dwarf_error.c
libdwarf/dwarf_error.h
libdwarf/libdwarf.h.in

Document malloc-fail special case
error handling.
libdwarf/libdwarf2.1.mm

Regenerated: v 2.23 libdwarf/libdwarf2.1.pdf
2014-12-28 10:03:42 -08:00
David Anderson
a7f7586018 Somehow was not matching the
output of dwarfdump/print_gdbindex.c.
dwarfdump2/print_gdbindex.cc

Adds dwarfgen: to messages. adds try-catch to better deal
with out-of-malloc-space.
dwarfgen/dwarfgen.cc

Adds a few instances of setting error code correctly.
libdwarf/dwarf_elf_access.c

Found a place where NULL not tested for.
Now it is, so out-of-malloc-space won't
generate instant coredump, but will
return NULL.

libdwarf/dwarf_tsearchhash.c
tsearch/dwarf_tsearchhash.c
tsearch/dwarf_tsearchred.c
2014-12-10 09:32:13 -08:00
Carlos Alberto Enciso
f2afe2cb8a Merge branch 'master' into carlos_enciso
# By David Anderson
# Via David Anderson
* master:
  Removing accidental C99-isms. libdwarf/dwarf_query.c libdwarf/dwarf_tsearchhash.c libdwarf/dwarf_util.c tsearch/dwarf_tsearchhash.c

Conflicts:
	libdwarf/dwarf_util.c
2014-09-11 08:29:34 +01:00
David Anderson
0e99ce4e8e Removing accidental C99-isms.
libdwarf/dwarf_query.c
libdwarf/dwarf_tsearchhash.c
libdwarf/dwarf_util.c
tsearch/dwarf_tsearchhash.c
2014-09-10 09:52:22 -07:00