Commit Graph

38 Commits

Author SHA1 Message Date
Carlos Alberto Enciso
720e94b7db Use the _WIN32 macro to identify a WINDOWS specific code.
The macro is automatically defined by the VS C/C++ compiler.
2016-04-21 09:47:04 +01:00
David Anderson
6f09d84ae6 Was missing return *this a bunch of places.
dwarfgen/irepform.h
2016-01-14 14:19:26 -08:00
David Anderson
7f5065f3b1 Last year ChangeLog is now ChangeLog2015 2016-01-14 14:17:37 -08:00
David Anderson
37d0ff1235 Now we allow --enabled-shared and --disable-nonshared
at the top level and all lower levels.

README
configure
configure.in
dwarfdump/Makefile.in
dwarfdump/configure
dwarfdump/configure.in
dwarfexample/configure
dwarfexample/configure.in
dwarfgen/configure
dwarfgen/configure.in
libdwarf/ChangeLog
2015-12-31 13:51:31 -08:00
David Anderson
940b561d3a Updated dwarfdump version string.
Updated all the configure scripts to support zlib and
reading compressed .zdebug_ DWARF sections.

All works fine without zlib (though reading .zdebug sections
not possible without zlib).

A few lines of code and some internal-to-libdwarf structs
change slightly for .zedebug support.  There is  no
change to public interfaces.
2015-11-26 08:27:17 -08:00
David Anderson
398c18eb13 Now allows build separate from source.
NEWS
README
configure
configure.in

Now allows build separate from source.
dwarfdump/ChangeLog
dwarfdump/Makefile.in
dwarfexample/Makefile.in

Now uses configure and allows
build separate from source.
dwarfexample/configure
dwarfexample/configure.in
dwarfgen/Makefile.in

Now allows build separate from source.
libdwarf/Makefile.in
libdwarf/configure
libdwarf/configure.in
2015-11-15 10:14:01 -08:00
David Anderson
07bf8033af Merge branch 'carlos_enciso' into carlos15
Conflicts:
	dwarfdump/ChangeLog
	dwarfdump/common.c
	dwarfdump/print_die.c
	dwarfexample/ChangeLog
	dwarfgen/ChangeLog
	libdwarf/ChangeLog
	libdwarf/dwarf_form.c
	libdwarf/dwarf_xu_index.c
	libdwarf/dwgetopt.h
2015-09-15 09:56:07 -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
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
4b76cb178d dwarfgen/ fakemalloc.in and TESTmallocfail: Added commentary
about the origin of this test (intended to stress libdwarf
in the face of malloc failure).
2015-01-09 11:53:35 -08:00
David Anderson
0a944165de dwarfgen.cc: fixed indents and removed trailing whitespace. 2015-01-06 14:00:16 -08:00
David Anderson
2e645452db Update the ChangeLog for the start of 2015. 2015-01-01 11:35:18 -08:00
David Anderson
355d578171 Renamed fakemalloc.c as fakemalloc.in 2014-12-28 10:11:12 -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
David Anderson
c6a2ce4cc1 This is an incompatible source change to the
dwarf_producer_init() function.

The new interface is more extensible and allows for production
of DWARF versions post version 2 (such later versions are not
actually supported yet).  Uses of the producer interface have
to change their calls to dwarf_producer_init*() to match the
new interface.

Callers to the consumer (reader) interface are not
affected.

dwarfgen/dwarfgen.cc
libdwarf/dwarf.h
libdwarf/dwarf_error.c
libdwarf/libdwarf.h.in
libdwarf/libdwarf2p.1.mm
libdwarf/libdwarf2p.1.pdf
libdwarf/pro_forms.c
libdwarf/pro_init.c
libdwarf/pro_opaque.h
libdwarf/pro_reloc.c
libdwarf/pro_reloc_stream.c
libdwarf/pro_reloc_symbolic.c
libdwarf/pro_section.c
libdwarf/pro_util.h
2014-05-09 10:55:11 -07:00
David Anderson
f399a7c515 Last change to dwarfgen.cc introduced trailing whitespace,
now  that whitespace removed.
2014-02-08 12:57:35 -08:00
David Anderson
5851b1c68e Adds commentary about the use of the sect_name_index
in the callback function (used for each new
debug section libdwarf is asked to create).

dwarfgen/dwarfgen.cc
libdwarf/libdwarf2p.1.mm  Version 1.35
libdwarf/libdwarf2p.1.pdf (regenerated)
2014-02-08 12:43:39 -08:00
David Anderson
affafa89fb Removed trailing (and useless) whitespace from all the lines
containing it.  Many many files had such.
2014-01-29 15:02:07 -08:00
David Anderson
348e4ddf96 gennames: deleted include of elf.h, it was not needed because
gelf.h is included. Five dwarfgen files.
2014-01-10 08:42:40 -08:00
David Anderson
3f82477dae Added dwarf_add_AT_reference_b() and dwarf_fixup_AT_reference_die()
and dwarf_add_AT_with_ref_sig8() to libdwarf producer function list.
Documented the new functions in libdwarf2p.1.mm.
If we already have a DW_AT_sibling attribute we take care not
to add a second one.

dwarfgen now supports some 'class reference' forms (local references
and sig8 references, not yet global references).
Fixed dealloc for dwarf_get_pubtypes to avoid duplicate free.
2013-11-01 05:28:10 -07:00
David Anderson
f60347456e libdwarf: adding support to write .debug_pubtypes
and adding an error code now used by the producer.
dwarfdump: adding support to print .debug_pubtypes
dwarfgen: adding support to read and write .debug_pubnames
and .debug_pubtypes.
2013-10-17 14:37:01 -07:00
David Anderson
beaa109d72 The dwarfgen copyright changed to BSD3 form.
libdwarf and dwarfdump copyrights are unchanged.
2013-10-14 16:36:37 -07:00
David Anderson
dac673f305 A missing 'const' in the declaration of *Callback_Func*
in libdwarf.h.in (and libdwarf.h) provoked compiler warnings.
Now the const is added to that char*name argument type
to avoid the compiler warning in the build of libdwarf.

Users of the producer code may find they need to change
a definition/declaration of their code to avoid a
compilaton failure.  Most users do not use that
procuder code in libdwarf and will not be affected.
2013-10-14 12:33:29 -07:00
David Anderson
d522c98f03 dwarfdump[2]: commentary and indenting fixes (very few).
dwarfexample: Adds a --check option to show in detail
     when the DW_AT_high_pc is a constant vs offset,
     at least for subprograms.
dwarfgen: Now handles class constant (writes to output)
     and fixes missing handling of DW_FORM_data4/8 in
     global references.
     Adds -h option telling dwarfgen to alter a high pc
     from address class to const class (and adjusts
     the value appropriately).  So we can create
     testcases without having a too-recent compiler.
libdwarf: Fix an error no one should ever see (programmer
     failed to run a simple test!) so it returns DW_DLV_ERROR
     in case it happens.
     Add dwarf_highpc_b() function to consumer code.
     dwarf_add_AT_any_value_sleb() and  dwarf_add_AT_any_value_uleb()
     to producer code.
     Update libdwarf2.1.mm and libdwarf2p.1.mm to reflect the
     new functions.
2013-08-14 08:15:02 -07:00
David Anderson
d88ca0746c libdwarf: the functions dwarf_whatform and dwarf_whatform_direct
are really misnamed. Now libdwarf2.1.mm exposes the real meaning
and libdwarf2.1.mm (in commentary) does too.
dwarfgen has fixes so it builds 64bit.
Omissions in dwarfgen which were not processing FORMs right
are corrected.
2013-02-01 08:27:47 -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
David Anderson
48124e0d00 dwarfdump[2] and libdwarf ChangeLog files
now reflect all the recent changes.
2012-11-17 12:43:10 -08:00
David Anderson
e3d4ba658f dwarfgen/createirepfrombinary.cc
Fixed a horrible typo that should never have
been committed.
2012-11-14 13:04:11 -08:00
David Anderson
6259f9b02d If intptr_t type exists, use it for the reinterpret casts.
Regenerate configure.
2012-04-10 09:44:47 -07:00
David Anderson
1f55bd6d5f ChangeLog now documents the 20111214 changes. 2011-12-14 13:18:44 -08:00
David Anderson
1af3142cda Adds creation of a .debug_line section from dwarfgen. 2011-12-13 09:53:49 -08:00
David Anderson
2dde85eb87 2011-12-13 DavidAnderson <davea42@earthlink.net>
* dwarf.h: Added some GNU extensions.
     * libdwarf.h: Added dwarf_lineoff_b() as
       dwarf_lineoff() wrongly returns a signed column number.
       Added dwarf_add_lineentry_b() as preparation for creating
       DWARF3/4 output.
     * dwarf_line.h: Added new struct fields to accomodate
       DWARF3/4 isa and discriminator fields.
     * dwarf_line.c: Now deals with the VLIW line calculations
       in DWARF4.  Adds support for computing the discriminator
       and isa fields.  Adds dwarf_lineoff_b() (and dwarf_lineoff
       is now deprecated).  Adds dwarf_prologue_end_etc() which
       returns some DWARF3/4 line fields.
     * dwarf_print_lines.c: Adds handling of DWARF3/4
       line operations and fields and prints the details.
     * libdwarf2.1.mm: Documents the new functions in dwarf_line.c
       Version set to 2.02.
     * libdwarf2.1.pdf: Regenerated.
     * libdwarf2p.1.mm: Documents the new function
       dwaf_add_line_entry_b().
       Version set to 1.32.
     * libdwarf2p.1.pdf: Regenerated.
     * pro_incl.h:  Add parentheses so the WRITE_UNALIGNED macro
       works correctly in all circumtances.
     * pro_opaque.h: Add DEBUG_RANGES and dEBUG_TYPES to the list
       of sections we could generate.  Define struct Dwarf_P_Line_Inits_s
       to hold initialization values for line table data so we can later
       make the choices at runtime rather than compile time.
       The new struct is a field of the Dwarf_P_Debug struct.
     * pro_line.h: Added some DWARF3/4 support and preparations
       for emitting DWARF3/4.
     * pro_line.c: Define dwarf_add_line_entry_b() for DWARF3/4
       line fields, and _dwarf_init_default_line_header_vals()
       to provide a default set of values, the defaults match
       what was previously done.
       Add support for the new DWARF3/4 line table fields.
     * pro_section.c:  Add the beginnings of support for creating
       new DWARF3/4 sections and the new standard opcodes.
       Move the field-writing code to small functions making
       the line table writing smaller and easier to read.
       Added the beginnings of allowing writing DWARF3/4
       line table fields. Some if() missing {} were
       modified by adding {} to avoid future problems.
2011-12-13 09:38:09 -08:00
David Anderson
98307d518c libdwarf now implements a new dwarf_producer_init_c() interface
and its callback function.   It is documented in libdwarf/libdwarf2p.1.mm.
Date stamps are updated in both dwarfdumps even though there was no
reader code change.
2011-06-12 17:20:07 -07:00
David Anderson
c0e16a28d8 Fixes the intentation in dwarfgen to match the 4-character
indent that is the libdwarf/dwarfdump standard.
Updates the dwarfgen copyright year.
2011-04-23 10:32:03 -07:00
David Anderson
052474a336 These are small changes for DWARF4 and for Makefile cleanup
lines in 'clean' and 'distclean' .  And to match the newest
line formats (uri format) for file names from the line section.
2011-03-19 12:00:52 -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