HOME Software Lotus Cars DWARF Kindle Solar
graphic with lotus elise and lotus elan

DWARF Page

Introduction

libdwarf and dwarfdump are Free Software.

Please consider making a donation to support the libdwarf/dwarfdump project.

If someone can put me in contact with the original author (Crablicious) of the libdwarf-addr2line github project somehow I would appreciate it. Thanks.

The distribution consists of C and C++ source code that you compile with your C/C++ compiler (documentation is included).

The DWARF Debugging Information Format is of interest to programmers working on compilers and debuggers (and anyone interested in reading or writing DWARF information). It was developed by a committee (known as the PLSIG at the time) starting around 1991. Starting around 1991 SGI got involved with the committee and then developed the libdwarf and dwarfdump tools for SGI-internal use and as part of SGI IRIX developer tools. From around 1993 dwarfdump and libdwarf were shipped (as an executable and archive respectively, not source) with every release of the SGI MIPS/IRIX C compiler. In 1994 (I think the correct year) SGI agreed (at my request) to open-source libdwarf (and in 1999 to open-source dwarfdump) so anyone could use them.

BIG-ENDIAN system support has been provided by the IBM linuxone project starting in 2019. We now can test on a big-endian s390 system in a Linux VM. Thank you IBM. As of 06 October 2019 libdwarf dwarfdump and readelfobj/readobjpe/readobjmacho pass -all- tests on an IBM big endian machine, one is happy to report. Please advise of anything not working correctly!

In May 2019 we made the first release (20190505) with the option of building libdwarf and dwarfdump without any libelf. In November we implemented comprehensive testing across a variety of OSs and machines.

In September 2021 we fixed every problem Coverity Scan could find, and we continue to have zero defects.

License terms are mostly GPL (version 2) or LGPL (version 2.1). A few files use the FreeBSD (2-clause BSD) terms. The details are discussed in the license page.

DWARF specifications and the dwarf email forums are at http://www.dwarfstd.org. You can sign up for an email discussion list there.

Email about libdwarf and dwarfdump may be sent to libdwarf -at- linuxmail -dot- org (replace -at- and -dot- with the normal single characters to form the email address). [top]

Critical Vulnerabilities

Beginning May 4, 2014 a number of critical vulnerabilities in libdwarf and dwarfdump were reported as a result of fuzzing. Critical because these lead to serious difficulties where the application calling libdwarf could crash (segfault, etc), leading to a Denial of Service.

Then, starting in January 2023 a whole new set of tests for vulnerabilities, using direct calls to the API, were created. The fuzzer-library functions (the test source with the API calls being tested) are in the libdwarf-code/fuzz directory.

All the known vulnerabilities have been fixed.

For a list of the known vulnerabilities see https://www.prevanders.net/dwarfbug.html

https://www.prevanders.net/dwarfbug.xml is an xml version of the same data.

[top]

How Do We Ensure Libdwarf Works Consistently

picture of passing badge

Coverity Scan Build Status    Coverity Scan uses synthetic execution to look for defects.

CI status all builds   ci builds on Linux, Freebsd, MacOS, and Windows msys2 using configure, cmake, and meson.

Regression testing runs about twenty thousand checks comparing the last good dwarfdump versus the latest version. With all dwarfdump options exercised to touch as many code paths in libdwarf as possible. And involving numerous corrupted objects to check error code paths.

The regression tests are run in 32-bit and 64-bit environments (machines or virtual machines). Most environments are little-endian but one environment is 64-bit big-endian.

Running scripts/buildandreleasetest.sh demonstrates that a build and a test release libdwarf-<version>.xz and then build out of the a test release works and a second release build of libdwarf-<version>.xz from the first such contains the same files as the initial libdwarf-<version>.xz The script verifies cmake (with some cmake options tested) and meson work out of the test release too.

After relevant pushes to github we run a github workflow as an independent verification things build. The status of each test is shown above.

Coverity Scan is run before every release (and sometimes more frequently) to ensure there are no faults found by its synthetic execution of the source code.

An open source tool named github.com/nimble-code/Cobra does source scanning and finds instances of C coding that is not following best-practices. For example, it finds macro arguments are not inside parentheses at the use inside the macro. It detects many different things, reporting where best-practices were overlooked. Sometimes its pattern-matching mentions things that are not real issues, so one has to apply judgement. But it's quite useful. The best-practices lead to greater code consistency and readability (and sometimes reveal a bug).

[top]

New with Semantic Versioning

Change Release ID Format: Semantic Versioning

Up through mid-2021 releases were identified by an ISO date such as 20210528. This makes the release date clear but gives no clue what the differences are between releases.

Transitioning from ISO date to semantic versioning is be done in a way that will be generally understood, a way consistent with standard practice.

Semantic versioning, a more standard release id, is a triple of numbers like x.y.z meaning major.minor.micro (some projects add suffixes). See Software Versioning. Also see the formal definition in semver.org

If api is changed or removed, ++major, minor = micro = 0
If api is added ++minor, micro = 0
If bug is fixed ++micro

This form makes clear the changes.

Since mid-2021 libdwarf verioning has been exclusively Semantic Versioning.

Once libdwarf has a stable API the version will change from 0.n.m to 2.n.m because with date versioning gcc generated shared objects as 1.0.0 so those wishing to have multiple versions present want 1.x.x reserved.

Package Config (.pc) file

It's now common for libraries to provide a .pc file which provides useful information for library builders and library users. See the pkg-config command and Pkg-config on wikipedia.

Restructure Source Tree -done

During the conversion to Semantic Versioning in 2021 the source tree was converted to the mostly-standard source structure shown here.

  libdwarf-code/
    src/
      lib/   (libdwarf, libdwarfp)
      bin/   (dwarfdump, dwarfexample, ...)
    bugxml/  (library vulnerability data)
    doc/     (documentation)
    fuzz/    (oss-fuzz test functions)
    scripts/ (build and release tests)
    test/    (libdwarf/dwarfdump sanity tests)
    tools/   (maintainer tool)

Meson build system -done

The Meson build system is python-like, is much much faster than configure or cmake, and is easier to work with once one is past an initial learning curve.

Eliminate Old Producer Interfaces -done

The original functional interfaces to create DWARF data, the producer interfaces required casting to determine success/failure. The old ugly requires-casting interfaces have been removed.

Eliminate Old Consumer(reader) Interfaces -done

Many consumer interfaces appear in multiple versions. For example, dwarf_next_cu_header(), dwarf_next_cu_header_b() dwarf_next_cu_header_c(), and dwarf_next_cu_header_d(). In all cases the one with highest letter (_d in this example) will be kept and the earlier ones were deleted as the earlier ones do not handle all of DWARF<n> for some <n>.

In nearly every case the differences are very small: The addition of an argument to handle a DWARF Standard change was the motivation for all of them, and in many cases simply passing 0 for the new argument works like the older versions (though that is not recommended practice since it won't deal with some recent DWARF5 fully).

Eliminate Old configure options -done

The following are no longer used or needed: HAVE_OLD_FRAME_CFA_COL and HAVE_SGIDEFS_H HAVE_ELF_OPEN HAVE_GLOBAL_ALLOC_SUMS HAVE_NONSTANDARD_PRINTF_64_FORMAT HAVE_SGI_IRIX_OFFSETS HAVE_STRICT_DWARF2_32BIT_OFFSET HAVE_DWARF2_99_EXTENSION In addition HAVE_STDLIB_H HAVE_STDDEF_H HAVE_STRING_H are no longer needed, those are standard headers beginning with C89/C90 so are assumed present.

[top]

Tsearch searching resource

Because tsearch() itself is not universally available (and even when tsearch() is available tdestroy() is sometimes not available) I implemented some tree algorithms using the standard tsearch interface definitions.

For more information see the tsearch page

See https://github.com/davea42/tsearch-code

The basic four tsearch standard interface declarations are quite old, traditional, incompletely documented, hard to use, and not at all what anyone would design as an interface today. But these four functions are declared in the Posix/SingleUnixSpecification standard so we support them.

The algorithms implemented are binary tree, binary tree with Eppinger delete, balanced binary tree, red black tree, and a hashing (non-tree) version). The function interfaces implemented include tsearch(), tdelete(), tdestroy(), tfind(), and twalk().

To avoid conflicts with standard library versions all the function names are prefixed with dwarf_. Libdwarf and dwarfdump use the new tsearch.

[top]

Object tools resource

[top]

Four object tools are included. Three print object section header information. They all read object files and report information about the sections and content.

For more information see the readelfobj page

See https://github.com/davea42/readelfobj-code for the README and to download a release.

readelfobj prints Elf object headers. It has options to print details on more than just section headers.

readobjmacho prints MachO object headers relevant to DWARF information.

readobjpe prints PE (Windows) object headers. relevant to DWARF information.

object_detector decides if a given object is Elf, MachO, or PE and returns information saying which format it is or reports the format is unknown.

[top]

libdwarf codingstyle checker

The indent-checking tool dicheck is useful in case you make source changes and want to preserve proper libdwarf indentation. See more details on the github page for the tool. Clone a copy of the source code with
"git clone https://github.com/davea42/libdwarf-dicheck"
which creates and populates a directory named "libdwarf-dicheck".

[top]

Building libdwarf

Note about distribution contents

All libdwarf distributions contain C source plus the DWARF2 specification plus libdwarf specifications. Implementors often extend DWARF by adding new attributes and other things. Those that we are aware of are defined in dwarf.h which is provided here for reference. If you have corrections or additions, please let me know! The file is in every distribution of libdwarf.

Anonymous Git Access

[top]

libdwarf/dwarfdump source

Beginning 14 May 2021 libdwarf source code is available via anonymous access from github with the project history that was on Sourceforge. Sourceforge no longer contains libdwarf source.

"git clone https://github.com/davea42/libdwarf-code"
initializes a git repository in the local directory it will create named "code" and populates it with the most up to date libdwarf source. See the README and README.md for the new June 2021 build instructions.

Since github has programmable APIs you may wish to switch to accessing the project from github.
Since 19 March 2011 libdwarf source code has been available via anonymous access with git from SourceForge.net. As of June 2021 those wishing to see the latest should use github.com as the source because sourceforge.net is not up to date with the libdwarf source. The git source code is the reference source: it may have features or fixes not in a tar.xz release, but if so the features or fixes are not needed by most people. Top-of-trunk code in the git repository has been fully tested. See the github clone command above.

Here is a complete build example using github. Note that these instructions are not up to date with top of trunk. To save space here, we are not building optional programs and not doing any checking for failure at any step. In some environments configure options may be necessary, but none are shown in this example. Later sections here on building show some additional configure options.

# github example
git clone https://github.com/davea42/libdwarf-code
# See a README in the distribution for further instructions.

Object File Tools

Some small object tools are available in source via anonymous access. See the readelfobj page for details.

The libdwarf/dwarfdump regression tests (which you really don't need or want) are available via
"git clone https://github.com/davea42/libdwarf-regressiontests"
which creates and populates a directory named "regressiontests". The "regressiontests" directory should appear in the same directory as the "code" source code directory as the regression test scripts reach around to the source at certain points. As of 09 November 2020 the regression tests can be run in a temporary directory with something like

mkdir /tmp/dwtests
cd /tmp/dwtests
/path-to/regressiontests/configure
make

Building and Testing libdwarf

[top]

Building libdwarf

The libdwarf build process involves a simple traditional approach (at least for personal use, people generating binary releases or a corporate library will have their own internal requirements to consider). In the base directory of the source distribution (either expanded from a tar.gz or from git) do the following:

./configure
make

If all goes well, this will build libdwarf and dwarfdump.

It's common to do the build in a separate directory. As an example of building all the executables using a separate directory, do something like:

# Assuming the source top-level is in /path/to/libdwarf-20180809
mkdir /tmp/bld
cd /tmp/bld
/path/to/libdwarf-20180809/configure --enable-dwarfexample --enable-dwarfgen
make

which will build libdwarf, dwarfdump, dwarfgen, and dwarfexample in a minute or two. You don't need dwarfgen or dwarfexample. If libdwarf and dwarfdump complete their build you have most of the functionality you need. dwarfdump (written in C) lets you dump out, in readable form, the DWARF2, DWARF3, DWARF4, and some DWARF5 data from an object file. (the DWARF5 standard was released on dwarfstd.org in February 2017).

There are some prerequisites you must have installed on your build machine:

C compiler (Conformant with the 1989 or later C standard.
  Support for the 'long long' datatype is required.)
C++ compiler (only needed to build dwarfgen)
libelf is optional (however it is required to build dwarfgen)
zlib (if your compiler uses compressed sections) 
See the top-level README in the source for
specific references for libelf and zlib.

Contact the libdwarf email address before attempting to contribute any code.

On Windows Use of one of the POSIX-like environments like mingw or cygwin or the like will ease your way. You may find cmake very useful on Windows.

[top]

Testing libdwarf

The regression test build process involves rather more work, and few will want to bother with it. There is no tar.gz available, you have to use git. In the base directory of the regressiontests distribution do the following (if the base of the libdwarf source tree is at ../code this should work, but if not see the regressiontests/README.txt file):

Rather than keeping known-good output in the regression-tests, we keep a dwarfdump.O (O for Old) to compare its output against the new dwarfdump. We do it this way as the test output is much too large to save.

To run the dwarfextract test successfully, bfd.h needs to be installed in a standard place, so install binutils-dev (or the equivalent for your release) to get bfd.h. We do not link to the bfd library.

In the regressiontests directory do the following.

./configure
make

In the code directory there is a test script that does all the tests including building releases, using cmake and more as well as running the regression tests.

sh scripts/run-all-tests.sh >& /tmp/results
# The following is a passing run.
grep FAIL /tmp/results
# XFAIL: 0
# FAIL:  0
# XFAIL: 0
# FAIL:  0
# XFAIL: 0
# FAIL:  0
# XFAIL: 0
# FAIL:  0
# XFAIL: 0
# FAIL:  0
# XFAIL: 0
# FAIL:  0
# XFAIL: 0
# FAIL:  0
FAIL 0
FAIL 0
FAIL 0
FAIL 0 in run-all-tests.sh

grep FAIL /tmp/results should show all zeros (there should be about 18 lines)

On a modern 3GHz-cpu Linux environment running directly on the host the tests should run in about 35 minutes and the final message should say PASS. Running in a KVM Virtual Machine the tests run in 45 minutes or more. Unless all the components in the libdwarf source build correctly the tests cannot pass.

Unless you are running Ubuntu GNU/Linux or FreeBSD 12 on a i386- or X86_64-compatible cpu you may have more work to do to run the tests, partly because the tests depend on having a known-good version of dwarfdump in the distribution.

If the Ubuntu or FreeBSD dwarfdump executables in the distribution won't run in your test environment you could build dwarfdump.O to run tests:

Releases

[top]

As of release 0.3.1 releases are also available for download from the github libdwarf page

filename, download-link Bytes Reason for release
libdwarf-0.11.0.tar.xz 2727148

Date: 2024-08-15 Added function dwarf_get_ranges_baseaddress() to the api to allow dwarfdump and other library callers to easily derive the (cooked) address from the raw data in the DWARF2, DWARF3, DWARF4 .debug_ranges section. An example of use is in doc/checkexamples.c (see examplev).

Made various small improvements in code clarity and consistency.

md5sum: 3dab70d5f953acde7fcdd76230f210e0

sha512sum (remove spaces following colon): 050cb111c1ed94980357011a623190b6 26b68425639ee1ab39ab09a31d0cc55e 557ef35739ce1295cf0e1b51848fbcbb 3633fe1f6466784db6d8eb008a93c355

libdwarf-0.10.1.tar.xz 2710928

Date: 2024-07-01 Release 0.10.0 is defective, do not use it. A new doc/CMakeLists.txt file was left out and there were problems with the Version: in libdwarf.pc created by cmake or configure.

md5sum: dbbcc719f052d1c4a8af4c1bce809886

sha512sum (remove spaces following colon): 790317bd81290fa297d19cc6086594f1 3ea3be8b34d9e3c3494387498f8039d6 c7f20fd3628a73ed4442868666600c78 fe9cddad4e459e5dfffb14cc0cc4d588

libdwarf-0.10.0.tar.xz withdrawn

Date: 2024-06-24 Corrected the handling of DWARF5 .debug_rnglists and .debug_loclists. Has a mistake in generating libdwarf.pc and that leads to user build failures (when using pkg-config to find the correct shared libdwarf).

md5sum:

sha512sum (remove spaces following colon):

libdwarf-0.9.2.tar.xz 2692848

Date: 2024-04-02 Fixed four vulnerabilities that could crash the library (segmentation violation etc) reading specific corruptions to DWARF. DW202402-001, DW202402-002,DW202402-003, and DW202403-001. Now the library returns an error code for those. Corrected a dwarf.h misspelling of DW_CFA_hi_user.

md5sum: 1d71df0f67a2a87fc81032634ddee2ea

sha512sum (remove spaces following colon): 761ae16a14b250944c45ce91d2a7c2aa 61010613fad1e174fcdf0fcfa2718b5a 35814f3eb92d90144a6ac4785c6ffaae 853bc3239b8774a21dbec1f4c5a7cf53

libdwarf-0.9.1.tar.xz 2677488

Date: 2024-01-27 Altered the type of the return value of dwarf_die_abbrev_code() and dwarf_get_section_count() from int to Dwarf_Unsigned for consistency (should always have been this way). Problems reading Mach-o (Apple) relocatable object files are fixed. All three build systems have a option to turn off use of decompression libraries, see README.md and READMEcmake.md. All type warnings from MSVC are fixed.

md5sum: 744022c8b3c4ff693fbdc3247654400d

sha512sum (remove spaces following colon): ec66f0dbc72df3dd689a2d38ebae029e 081e0ec3008dd510372e0c2c387f0092 c2f9fe8d9928ded87b9c2ec30f1c3dc6 3bfaca7cc4a14e1c8c557d3c3b37d227

libdwarf-0.9.0.tar.xz 2718492

Date: 2023-12-08 Added support for reading Apple MacOS universal binaries. Added callers access to certain fields from object files (for all three supported object formats), and added the --print-machine-arch option to dwarfdump to show the fields. Three functions were added to the API, see the Changes section of the latest documentation or in libdwarf.pdf in the release. No functions were deleted or had their meaning changed. Vulnerabilities found by fuzzing were fixed. See the dwarfbug page for vulnerability details.

md5sum: 4b36d4b3031f8937b7c408d2eed221ed

sha512sum (remove spaces following colon): 282d90dfc9da704eb64a4ba1141f2ae6 60feeb14bbf1a72377386698e3124928 b44a6914d8e88e6141ab08835ce723ad 090a853ad57dbcb439dbba57255fb589

libdwarf-0.8.0.tar.xz 2653240

Date: 2023-09-20 The release fixes many vulnerabilities from corrupt DWARF and/or corrupt Elf. Two new functions are added for DWARF Frame access to get the correct sign of an argument (the pre-existing functions remain in place and working avoiding any need for recompilation or relinking of user code). See the dwarfbug page for vulnerability details.

md5sum: 5fcb91c6be7d99bc5a60c1347e19d0ab

sha512sum (remove spaces following colon): 82aa00b6fd5e8935fdc4b7d55379667f b9c514e75763109ea18a7cf7d9c1077e e0eb30d7482fa7d3621df44853bea0d1 5fde6cb846723bfb47752869e9687145

libdwarf-0.7.0.tar.xz 2506816

Date: 2023-05-20 The release fixes more than 50 vulnerabilities from corrupt DWARF and/or corrupt Elf. See the dwarfbug page for the details. The library now supports Elf with very large numbers of sections (which introduces an incompatibilty for the very few users calling dwarf_object_init_b() and dwarf_object_finish()). This release deletes an unnecessary and unuseable pair of functions reading the .debug_names section. Additional detail on the changes is in the Recent Changes section of libdwarf.pdf and the latest html version.

md5sum: e4310665e6fb5c6389f2df3ca71aad22

sha512sum (remove spaces following colon): 0fe027e517551d138c15695ffdebe2df bb0e89184fc0cc93bed5c342cd1cd901 dc23f6b2aa8643ec8e62808cbdc0d943 89fe44438c694d19c45c6a7367e8f7af

libdwarf-0.6.0.tar.xz 2437352

Date: 2023-02-20 Fixes for Denial Of Service (possible libdwarf crash): The dealloc required for dwarf_offset_list() was incorrect, possibly leading to a crash. The function prototype for dwarf_dietype_offset() changed so it can work correctly on DWARF4 objects. A memory leak from dwarf_load_loclists() has been fixed. The function dwarf_get_pubtypes() changed, Dwarf_Type no longer exists, correcting a library design mistake made in 1993. And the set of functions using Dwarf_Type are gone, use Dwarf_Global instead. An object with DW_FORM_strx3 (DWARF5) could result in the library either crashing or returning an inappropriate error. DW_FORM_strx3 is now handled properly.

md5sum: f076a486baaa19ccf0063a8cefd242df

sha512sum (remove spaces following colon): 839ba5e4162630ad804d76bd2aa86f35 780a178dcda110106a5ee4fb27807fdf 45f12e8bbb399ff53721121d0169a733 35898f94218a1853116bb106dd455950

libdwarf-0.5.0.tar.xz 2477032

Date: 2022-11-22 The handling of the .debug_abbrev data in libdwarf is now more cpu-efficient (measurably faster) so access to DIEs and attribute lists is faster. Corrects CU and TU indexes in the .debug_names section to be zero based as it is required to be. dwarf_get_globals() now returns a list of Dwarf_Global names and DIE offsets whether such are defined in the .debug_names or .debug_pubnames section or both. A new function, dwarf_global_tag_number(), returns the DW_TAG of any Dwarf_Global that was derived from the .debug_names section. Three new functions enable printing of the .debug_addr table. dwarf_debug_addr_table(), dwarf_debug_addr_by_index(), and dwarf_dealloc_debug_addr_table().

md5sum: a1f0fdb716386f32ebe67430a99aaf77

sha512sum (remove spaces following colon): 53ef7062deacaac2c8a7c829699ee53c 88c7865437a54b70b2807da3f24cee13 083b5bdd16bcc7ba6e194a271c23860e 75cf92c2cc61ec94a7da837f4ee794e2

libdwarf-0.4.2.tar.xz 2419592

Date: 2022-09-13 Fixed libdwarf crashes in certain fuzzed object files. Fixed all known instances of leaks in dwardump and libdwarf, so neither valgrind nor -fsanitize can find leaks, even when malloc is failing due to running out of memory. dwarfdump no longer prints anything to stderr, all output goes to stdout (libdwarf never prints anything).

md5sum: c61686e6b1b801df7ec830edc365cdfd

sha512sum (remove spaces following colon): 6d2a3ebf0104362dd9cecec272935684 f977db119810eea0eec88c9f56a042f2 60a4f6ed3bbabde8592fe16f98cbd81b 4ab2878005140e05c8f475df6380d1c2

libdwarf-0.4.1.tar.xz 2410800

Date: 2022-06-25. Two places where a carefully corrupted object file could result in libdwarf crashing a caller due to referencing memory outside the intended read area have been fixed (DW202205-001 and DW202206-001). One related to DW_FORM_ref_sig8, the other to the .debug_pubnames section. The library now accepts DW_AT_entry_pc in a CU DIE as a base address when DW_AT_low_pc is missing (an extension used by a current compiler). Added function dwarf_suppress_debuglink_crc() to allow callers to turn off doing a CRC calculation reading GNU debuglink data (saves time for library users accessing near-identical builds).

md5sum: b9dd9cc1378181728c096f186a654ba2

sha512sum (remove spaces following colon): 793fe487de80fe6878f022b90f49ec33 4a0d7db071ff22a11902db5e3457cc7f 3f853945a9ac74de2c40f7f388277f21 c5b2e62745bca92d2bb55c51e9577693

libdwarf-0.4.0.tar.xz 2380228

Date: 2022-04-12. Made changes to 6 interfaces to make three dealloc functions be named with a pattern consistent with the rest of libdwarf, a function reverted to a pre-DWARF5 version for correctness, and changes to the .debug_names API functions to enable full access to the section. See details in the Recent Changes section of libdwarf.pdf. dwarfdump now prints all the information in .debug_names with --print-debug-names.

md5sum: 46ffe13978494488f1f70bdc46610718

sha512sum (remove spaces following colon): 30e5c6c1fc95aa28a014007a45199160 e1d9ba870b196d6f98e6dd21a349e9bb 31bba1bd6817f8ef9a89303bed056218 2a7d46fcbb36aedded76c2f1e0052e1e

libdwarf-0.3.4.tar.xz 2345036

Date: 2022-02-23. Fixed a bug in test scripts so 'make check -j8' will work properly. Fixed a bug where reading a PE (Windows) object could fail for certain section virtual size values. Added initializers to two uninitialized local variables in dwarfdump source so a compiler warning will not kill a --enable-wall build. Replaced the libdwarf.pdf content, it is now generated by doxygen and latex and has a proper table of contents and index. Added support for the meson build system. Added dwarfexample/showsectiongroups.c so one can see libdwarf's interpretation of section groups; making it simple to use libdwarf when section groups are important (relevant for Split Dwarf and COMDAT sections).

md5sum: 6e06a645c5a04fd3c03a31f95914e546

sha512sum (remove spaces following colon): 6957e6c696428b7e59c57e48279528ff 602c49ab9833e56a4722f173240eb137 3ddd20f5c9dae7c25cc64e6c2131d3b7 b5abcf3c12614b88858bdc353a441359

libdwarf-0.3.3.tar.xz 1950556

Date: 2022-01-26. Removed assignment offset = offset as a compiler detected the pointless assign and issued a warning, stopping a -Werror (warnings treated as errors) build of dwarfdump.

md5sum: 09fd01dc8f5500c05cdf2f2d2fad1334

sha512sum (remove spaces following colon): e79266e28b2468ec89edfe70f27f574e fe784bd4ce663907f539cbe99d021c07 7ec7dcc4b31e9008e1eb418847fa47e8 0bb4d436b907fdad148a4e4da0c3346d

libdwarf-0.3.2.tar.xz 1983884

Date: 2021-12-25. No API change. Fixed one bug handing certain extended LEB numbers when the producer added padding inside the value (allowing padding is not defined in the standard but is not forbidden either). Moved and renamed many filesso the source directories look much better and cleaner.

md5sum: 4ea5ef08ee6067ea7f7f33c66ebc5b0f

sha512sum (remove spaces following colon): 4898f3b4dc40a9e5bfd91160506dd4a7 5b5a6e6d3c8eb0c8bc64f90c69eacf7a c9ffc8cdad5ef73df7db9eeef408aafe 599f43087e98e06281c2419741930f69

libdwarf-0.3.1.tar.xz 1989760

Date: 2021-11-24. libdwarf-0.3.1 has improvements in detecting corrupted Elf and MachO object files. The release adds a new function dwarf_get_frame_instruction_a() that enables access to new LLVM frame extension instructions involved in Heterogeneous Debugging (the new instructions have one more operand than any other frame instructions). The existing dwarf_get_frame_instruction() works on all frames and unless one is doing Heterogeneous Debugging one should continue using dwarf_get_frame_instruction(). dwarf_get_frame_instruction() was new in libdwarf-0.3.0 and is the first libdwarf function to enable extracting frame (CIE/FDE) instructions in detail without fiddling with the bit-structure in DWARF frame instructions.

md5sum: 0c862e8bd1df80df6683ec889d8be68d

sha512sum (remove spaces following colon): dd82174bcb36c32be564be747898ef09 aaaa5ecc84d211bac725edf9ba55008b 3942452d6684da79a320289986b45e16 4bbeefb5a07658daf473b143dfe40f2b

libdwarf-0.3.0.tar.xz 1962920

Date: 2021-10-30. Release 0.3.0 passes coverity scan with no errors/warnings. All known problems with functional interfaces have been fixed, no further changes are planned. All useless public structures in libdwarf.h have been removed, and no further changes to public structs will be made. In other words, aside from adding new interfaces where such are missing, this libdwarf.h and libdwarf are now stable. The doc/libdwarf.pdf documentation now documents all available library functions and only those functions.

md5sum: 09f1c330fe4c1cdf08a644b7ded6f79

sha512sum (remove spaces following colon): 775c5e8089d13ad1602f24fad51502fb 40d9e2ae281f523def7d066c876228e1 a71d6d04b7d89df1d65e664b56beddaf 992939d8606fed743a5b5264e6bf7f53

libdwarf-0.2.0.tar.xz 1961916

Date: 2021-09-20. Release 0.2.0 passes coverity scan with no errors/warnings. The release changes some libdwarf initialization functions to a form suitable for DWARF2-DWARF5 (by removing pointless arguments). All obsolete function interfaces have been removed (they all have modern replacements with similar spelling). Aside from a single function, dwarf_expand_frame_instructions() (which only works for DWARF2 and will be replaced), all functions are usable for all DWARF2-DWARF5. See libdwarfreadme.html for details

md5sum: 60bc26c2c72cd349f102a6004fe45065

sha512sum (remove spaces following colon): 30d4076f3bc699449de44ac73637ebcb 386fa548dbf7cc429628e54e6aa09bb6 9b10faa5c1d635249b2133354850f7e0 c78f9b55e4c4cbfea4fe04081fa9e9b7

libdwarf-0.1.1.tar.xz 1929280

Date: 2021-08-07. Now with pkg-config files generated. All the obsolete functions have been removed. The DWARF5 .debug_names section is not yet fully supported. Tested against the full regressiontests. DO NOT use the function dwarf_skip_leb128, which appears in this release libdwarf.h for the first time and is dropped from 0.1.2. It is not documented. Making it public was not a good idea.

md5sum: db8b91e3dd87cf91560069959932076e

sha512sum (remove spaces following colon): eb2502d847fd5ee15928651dcc1ef30d ab04b7e65d7e772dd245da74bb071ce5 25cfdf97d1af5dbceb50c1a12cccda5c 762f461d03a16c55557ab5e94e79e8ab

libdwarf-0.1.0.tar.xz 2078520

Date: 2021-05-31 This is a first release with a new source and build directory structure, and the first tarball with a semantic-version identity and no other changes from 20210528. Soon there will be major revisions. Here the main documentation is renamed libdwarf.pdf, libdwarf no longer uses libelf, and dwarfdump no longer reads archive (<name>.a) files. The Elf object-file printing features have been removed from dwarfdump (the -E and -o options). Interested parties might like to give this a try. Fully tested against the full regressiontests.

md5sum: c6ff9739abc361c5a3ff6b208f6fc7d7

sha512sum (remove spaces following colon): 9e8149a8548e31a08acade31be796899 94fd7e635c9be8ace7a6c47b1f8e7b77 b2e3c9cf452a39a013442562b49fc1fc 04b9535fec5f9fa90df3e7fcb43fe27f

libdwarf-20210528.tar.gz 2869691

This release corrects libdwarf's handling of DWARF5 line table header DW_LNCT entries. Dwarfdump now prints DW_OP_bra and DW_OP_skip correctly and correctly validates the target of these operators.

md5sum: 61fc47c4fab6730e0262c75a8432c17f

sha512sum (remove spaces following colon): e0f9c88554053ee6c1b1333960891189 e7820c4a4ddc302b7e63754a4cdcfc2a cb1b4b6083a722d1204a75e994fff340 1ecc251b8c3b24090f8cb4046d90f870

libdwarf-20210305.tar.gz 2872089

This release adds summary information on attribute/form-class uses and attribute/forms use to the existing option -ku summary on tags and attributes. Dwarfdump verifies many attribute references are usable and prints a little from the target DIE, including with DW_FORM_ref_sig8 references. Now dwarf.h shows many more extensions (added by compiler developers) to the TAGs and ATtributes defines. Alongside releases is a pdf, libdwarf2.1xl.pdf (xl.pdf as it is extra-large), that is the same as the latest libdwarf2.1.pdf but with the table-of-contents at the front, not the back, of the pdf. Created an experiment, it is around 15MB so seemed too large to place it in the release or to do multiple versions. Later updates will just replace it on prevanders.net.

md5sum: ee2466daa26659c7763efd185d1f8402

sha512sum (remove spaces following colon): 6fa05cf88125a95ebe38673d62e94470 1fdd28ba5c50f7695037acbc386f29b4 1d6551d9d08283b7d24fba02f3c0d6c8 f5d424ee75989b6aef54f8dc2340d0f5

libdwarf-20201201.tar.gz 2838730

Added checks for corrupted DWARF. Improved printing with --print-debug-gnu. Printing of DWARF Expression operators is much easier to read now. The regression tests can now be run in a temporary directory, keeping the test source directory clean.

md5sum: b8cf2f53bbe34891d77933ed39a43484

sha512sum (remove spaces following colon): 246a08b1983e3d765a0516068066ea1c 9ddb3d04d6c25dae73ae251542c9c1f2 8c340ecc50cb2adda7ffea7773d7d615 b7826f85b56e6859ba889301d72e8a85

libdwarf-20201020.tar.gz 2810313

Corrected the printing of DWARF5 line tables, rnglists, and loclists. Now follows GNU debuglink rules to find the object file with debug in it (when that applies). A new dwarf_init_path_dl() function gives callers needing every feature of GNU debuglink flexibility the required new arguments. Added checks to catch corrupted Elf and PE objects as soon as possible. See the introduction in dwarfdump.1 for a short overview of GNU debuglink, DWARF5 split-dwarf, and MacOS dSYM.

md5sum: 7008bd7f88c6e1988ecf562758c5a0d6

sha512sum (remove spaces following colon): 5c1078440c4afc255ce9597e1fca9661 5b9b41c88fe33c18a1fdc140ec1dee83 5bd926473535fcacb2f8d3c8fd63349c 24e89e71a2d1a2319408a970f7bfa320

libdwarf-20200825.tar.gz 2761374

Fixed errors in handling split-dwarf so we get more complete information when dwarfdump/libdwarf see both the dwp and the executable. Added some well-known GNU TAG/ATTRIBUTE to the extensions list so dwarfdump will not complain with -ka.

md5sum: 793c65af6eb1876c9cefd72241ad6757

sha512sum (remove spaces following colon): ef7578d5a07d45ded0e5e641ac69b917 ace33bd94efcad7d87b5d1960d7e4883 9095b480b086c84326fc2f15a9e9cfb6 ea7a51d8fffe2f63f50b4b8bd5fdbd39

libdwarf-20200719.tar.gz 2754563

Added some tag-tag and tag-attribute relationships for DWARF5 and some common extensions to their relationship lists so the -k options do not report these as issues to check. Now libdwarf reads and dwarfdump can print the DWARF5 .debug_sup section. And similarly for .debug_gnu_pubnames, .debug_gnu_pubtypes. A bug in dwarfdump that could lead to a small one-time memory leakage is now fixed fixed.

md5sum: e478a0ab5626d553828c95d09dbdaade

sha512sum (remove spaces following colon): d474482a7391ca660fa08c2f52ef1c29 61b7c2e7e5b92bf733a9996b7f610ec2 27ff6ea00401f0b4fcd897552fc3b0b0 54e706a36aaffe10841a383391e013a0

libdwarf-20200703.tar.gz 2725934

Adds support for DWARF5 rnglists and loclists. See the documentation for dwarf_set_de_alloc_flag(0) in libdwarf2.1.pdf, this offers improved libdwarf performance (but requires diligence).

md5sum: 8ea0947fe42012eb03c2bfd10c8f0308

sha512sum (remove spaces following colon): bf0ea33b166d1a5723f67022282eeb2f 374425e8bf3887cde843bcec8d47036f c5c2d713311e09f43ea93b79616a4743 a0394bcd3820f871243a37c0982358c3

libdwarf-20200114.tar.gz 2574626

The documentation of dwarf_init_path() has been clarified. A couple of memory leaks in handling rare errors have been fixed. The dwarfexample directory has a new example relating to the gnu debuglink features in gcc that allow one to find where any separate object files containing DWARF are located.

md5sum: fa710b5e4662330cbbf55a565e5c497b

sha512sum (remove spaces following colon): b8ed28f0a7e0f537331cdcb1c9a4faf2 5103a70dc9e0f6985a836c4b84bd762e 3631586105abc7a2632e2d35048217d7 9097dccafbb328f56752cb85990e222a

libdwarf-20191104.tar.gz 2584210

The code and regression tests now work properly in more environments. Including Ubuntu Linux little-endian, big-endian Linux machines (s390), MacOS Catalina, and FreeBSD, and MinGW. 32bit and 64bit systems. No libraries other than libc are needed to build libdwarf or dwarfdump (certain object files use libz compression for DWARF sections and reading those does require one have libz linked in).

md5sum: f5927304b32525f93bccefe2828e802d

sha512sum (remove spaces following colon): 21cac4dc003ebb941a4aeb02454dfff4 afddfbfca1bec7f595a25b8659110d76 cdbb2ccb1c1c2290d94d62ed1c34e71d 5fa469389752c4599f1a76a445a16b4a

libdwarf-20191002.tar.gz 2511625

Numerous small improvements have been made. Clarifying code, ensuring 'make check' really shows dwarfdump and libdwarf work, and ensuring that 'make check' works under mingw (win32) are the main points.

md5sum: b083886b71615a0d36e1b21eade05ec4

sha512sum (remove spaces following colon): 0d8b89a91d10badb40137a2c49e897e6 d6beac7176fe877bd52b147a1f3307d9 d0866398b0992c1ce50f8599b9ddce04 fb82e8eeba6bbf6e80b581f96946a938

libdwarf-20190529.tar.gz 2404715

The build now works for more environments. The cmake support is now simpler and more complete. We now test in big-endian as well as little-endian systems (dwarfgen does not work properly in a big-endian system yet).

md5sum: 2601496ae97698a7cc9162059341ca7f

sha512sum (remove spaces following colon): 495f194e5be0537b351b359d8529ab7f 89fc93bedd8950526c9d0a7bbf4df112 730b27339434d3ae8fac516db6bbce59 ea5aca2236ee16c21213de0d9b0840ad

libdwarf-20190505.tar.gz 2396531

It is now straightforward to build a libdwarf and dwarfdump that do not rely on libelf yet will read and process Elf object files. The build with configure is simplified as much unneeded code has been removed. For example all uses and configuration of __UINT32_t and other related integer types have been removed. The cmake build is simplified with configure-isms removed and now works better with MinGW, MSVC, and systems with struct _Elf (example: FreeBSD). Code calling the libelf-only interfaces dwarf_elf_init() and dwarf_elf_init_b() will, when the called libdwarf was built without libelf, get an immediate error return.

md5sum: f6b55c3036742922210f97950da9778f

sha512sum (remove spaces following colon): 0bd22bc62c72819198917a7fd2585905 2913e38bd2b09a73ccaa8e57c9ed072b 8f14763c5b34b6dcb91e9f904535ced1 122cfd9d5e036d07508c478b30522726

libdwarf-20190110.tar.gz 2257691

The problem with libdwarf-20190104 is fixed.

md5sum: dea1e39a1ab91addf3074a42971ae419

sha512sum (remove spaces following colon): 417f17e73cd1ef66c3b049892d893883 95255ebe65808da803084bd929360aec 350c38877ec438a797b5920d2bb363dd 76f938a653da15de13f145a27f6bc567

libdwarf-20190104.tar.gz 2257377

Do not use! dwarfdump and libdwarf now read and dump DWARF information from Elf, Mach-o and PE object files. January 9: a serious new bug was discovered today. If an object file fails a particular check in libdwarf then libdwarf will crash the caller. Reading valid object files will not crash the caller. Git commit fa5a44c378b0e5a5ba67d8871ac3b325f71f15a9 and later (pushed to Sourceforge) have this fixed.

md5sum: 1e9d439bc0f28d7df10e3696a82dfff6

sha512sum (remove spaces following colon): 6f6891df47cd76aa8ee5cbbad91c43de2c6a9b6cee2 7c8f5f64dc9df3e37c577718f8056e7a71fba6215c7 751ccb834935f52532032eb16bae2c26b3a3450677

libdwarf-20190102.tar.gz withdrawn

Do not use this. It's deleted. See 20190104 (above) instead. A new function (dwarf_init_path()) did not have adequate regression testing and Coverity static analysis identified six or so problems in that code.

md5sum:

sha512sum (remove spaces following colon):

libdwarf-20181024.tar.gz 2192118

Dwarfdump now has meaningful long-option-names available for all its options. dwarfdump --help-extended shows the list of all options. Thanks to Carlos Alberto Enciso for conceiving and creating the long options. Now libdwarf/dwarfdump can read/print DWARF from mach-o dSYM objects as well as Elf object. Thanks to Eeri Kask for providing help, the impetus to make it happen, and test objects. A libdwarf init call (dwarf_init_path()) is now available. dwarf_object_detector_path() (and dwarf_object_detector_fd()) inform callers information on what an object file actually is (elf, mach-o, or PE). (post release discovery: "dwarfdump -h" does not work usefully. Oops. Use the long-option --help-extended instead.)

md5sum: b5f8de647dcecfb218ec04174d44fd2f

sha512sum (remove spaces following colon): 134f8639c4a2ddf012ab196551bcc9afc65c729b36 299ebf807de94561fe878473ea58443d33daaa96f0 08b28dd169ab29f65616e9f1e44a6e7921cfde6e3f19

libdwarf-20180809.tar.gz 2061108

The new configure seem to be working properly now. For example, 'make check', 'make install' and 'make dist' do the right things whether run in-source-tree or from a build directory. In addition, dwarfdump prints information on section compression (for sections that are compressed) and always prints the actual section name from the object file.

md5sum: ff90e044b3074797d0e9d5b4e485abb5

sha512sum (remove spaces following colon): 3c1a97e5b0bae0f18d02402c7b67b1e7 4aacd26b68b738afe5be8e446bdbdd9b 1189658779b8c65cddba40dbd7848d40 510c03eec258708956209b2d76f5dd66

libdwarf-20180724.tar.gz 2029211

News 2018-07-31. While usable there are issues here: make install does not install the dwarfdump.1 man page . make install installs more into /usr/local/share/libdwarf than was really intended. libdwarf.so shows as version 1.5.0 which was not intended. Replacement coming soon. But if the issues don't matter to you it's fine to use. Replaces 20180723. This release has the new configure. The configure options are mostly identical to previous releases. See the README in the top-level. Profound thanks to Vincent Torri for writing the new configure (any mistakes here are undoubtedly mine, though). Thanks to Hannes Domani for applying Coverity to libdwarf which identified over twenty previously-unknown bugs quite precisely (all fixed now). Thanks to Tom Hughes who noticed an omission in the alpha-non-release July 6. It is quite possible that something important to you is broken. Get in touch as soon as possible if you think something is wrong.

md5sum: 0889ce6d2c144f20d928ee3f86616c3a

sha512sum (remove spaces following colon): 8eaa9f6ef147a1f59035a4ced24912b4 d1adecf6338a8ae7a061ab396519011c 2c98bc3d58534fefa2bac2a68d3f1871 999f75a3a820c6a58ca7b34dccf9a9c1

libdwarf-20180723.tar.gz withdrawn

Withdrawn. The tar.gz file is missing libdwarf.h.in so attempts to build on FreeBSD (and possibly other platforms) will not succeed.

alpha-libdwarf-20180706.tar.gz 1976106

NOT A NORMAL RELEASE: this is a test release that will be added to Sourceforge on or after July 17, 2018. It uses a completely rewritten configure setup that uses automake and libtool yet one uses configure almost identically to releases of the past; the point is easier source maintenance and additional automation. It passes the usual tests on both Ubuntu 16.04 and FreeBSD 11.1 with 32bit and 64bit pointer environments. See the top-level README. This source is not on Sourceforge, it is only available in this .tar.gz Try it out. Let us know of any difficulties. Make install fails to install dwarf.h and libdwarf.h . The tar.gz here does not have the one-line fix. Email to: libdwarf =at= linuxmail =dot= org

md5sum: f1a8319e8b482597bd0c2f25fd5aabea

sha512sum (remove spaces following colon): 3db4f472906bcb108493b0c85085d635 dde1df59a285989f6720554243ae8ec7 1510c9fadd1c59abf43c6211cf446f62 fb78f2276193adb1a8230d6c1ab6e971

libdwarf-20180527.tar.gz 1861570

libdwarf: Improved error checking and made cross compiling possible. Possibly all DWARF5 is supported. dwarfdump: Brought configure closer to current standards, enabled cross compiling. Now supports --longoptionnames. Refactored option/flag handling for easier maintenance. Now can print the .debug_str_offsets section with option --print-str-offsets. Thanks to David Blaikie,Carlos Alberto Enciso, Helmut Grohne,Eeri Kask,Pedro Navarro, Vincent Torri,Fabian Wolff, and Keith Walker for their test cases,assistance, and advice.

md5sum: c35a5b2d7d07e1addfb951c23f5e91f7

sha512sum (remove spaces following colon): f8f285373d03498e0bcf607d61cc0fb1 7b555ca48bbeda7c133a9c620e34b727 973aceecfa5402b53189211e3a0f15db e49951c2cf3e63e43775fbc8e9fbfa5d

libdwarf-20180129.tar.gz 1823832

Fixes libdwarf/dwarfdump vulnerabilities related to detecting corrupt DWARF and includes other small improvements. Thanks to Agostino Sarubbo, David Binderman, Eeri Kask, James Lowden, and Dvir Yitzchaki for their help.

md5sum: c5e90fad4640f0d713ae8b986031f959

sha512sum (remove spaces following colon): 02f8024bb9959c91a1fe322459f7587a589d096595 6d643921a173e6f9e0a184db7aef66f0fd2548d669 5be7f9ee368f1cc8940cea4ddda01ff99d28bbf1fe58

libdwarf-20170709.tar.gz 1809834

Fixes a libdwarf vulnerability. Thanks to Team OWL337 for finding the vulnerability and to Fabian Wolff for emailing an alert. Has updates to documentation on DWARF5 consumer interfaces.

md5sum: 68a3c9aa7d01a433924a74bda588b378

sha512sum (remove spaces following colon): afff6716ef1af5d8aae2b887f36b9a6547fb576770 bc6f630b82725ed1e59cbd387779aa729bbd1a5ae0 26a25ac76aacf64b038cd898b2419a8676f9aa8c59f1

libdwarf-20170416.tar.gz 1777385

Begins to support the DWARF5 .debug_names section and other DWARF5 changes. (not tested, no test cases yet available). Now supports DWARF5 split dwarf sensibly. The few new function interfaces can be ignored by those not needing split dwarf support. The tools can now be built with cmake (the default build is still with configure), thank you Dvir Yitzchaki. Carlos Alberto-Enciso, Emre Kultursay, Marcel Bohme, Van-Thuan Pham, and Alexandr Terekhov all noted bugs or vulnerabilities and these are all fixed.

md5sum: 6a53d2b55d3ee2da396d4d0711e5c251

sha512sum (remove spaces following colon): 85be7ec806029200648514b965e23e163a54cbdc6f2 feba0d4cc96180bab441f85d22640c7a96d6350b8f8 749b7bcbe2f0f1af0865f9a427f2acce5135c4e630

libdwarf-20161124.tar.gz 1732155

Fixes some newly discovered vulnerabilities (most due to corrupted DWARF). Thanks to Puzzor (Shi Ji) and Agostino Sarubbo for finding and reporting these and for providing short test cases.

md5sum: 35526477c0bb572d9e3dab54b7ae5cc0

sha512sum (remove spaces following colon): 38e480bce5ae8273fd585ec1d8ba94dc3e865a0ef3fcfcf3 8b5d92fa1ce41f8b8c95a7cf8a6e69e7c6f638a3cc56ebbf b37b6317047309725fa17e7929096799

libdwarf-20161021.tar.gz 1728742

Fixes one place where erroneous dwarf not caught, Updates version strings, adds a bit more DWARF5 support, and converts the few Python scripts from python2 to python3.

md5sum: a9006f2110d886d9b084a3ab4c75e66c

sha512sum (remove spaces following colon): 733523fd5c58f878d65949c1812b2f46b40c4cc3177bc 780c703ec71f83675d4b84e81bc1bcca42adf69b5e122 562e4ce8e9a8743af29cc6fafe78ed9f8213fd

libdwarf-20161001.tar.gz 1725257

Fixes serious bugs in release 20160929 and all earlier releases relating to encoding/decoding leb numbers. It is unlikely anyone will see any difference in output, but values showing a difference can be constructed. libdwarf/dwarf_leb.c has new test code and a few of the tests there demonstrated problems. gcc -fsanitize=undefined found problems as well.

md5sum: f9f23ebc20f82dabcd5c61507092fcac

sha512sum (remove spaces following colon): 2c522ae0b6e2afffd09e2e79562987fd819b197c9b ce4900b6a4fd176b5ff229e88c6b755cfbae7831e7 160ddeb3bfe2afbf39d756d7e75ec31ace0668554048

libdwarf-20160929.tar.gz Withdrawn. See 20161001.

Fixes three serious bugs in release 20160923. Two of them old bugs, one new in 20160923. The bugs were exposed by occasional inconsistent behavior in one or two regression tests.

libdwarf-20160923.tar.gz 1721186

DO NOT USE: use libdwarf-20161001 instead. Think of this as withdrawn. Many improvements in the code catching corrupt dwarf. Quite a number of places with out-of-bound read/write of memory fixed. Trivial but annoying memory leaks in dwarfdump fixed. Thanks to Puzzor, STARLAB, Salvatore Bonaccorso, Agostino Sarubbo, Vul, James Grumbach, and others for reporting memory corruption and other issues.

md5sum: 4818ffb3f682e6ade023458a4f43e760

sha512sum (remove spaces following colon): 941c16dd487e152e34f83a8d1f5eb2992fb8c9fb7a 6309c7c33825267c95614c2a07ef24b205de287344 9b16df1749f9e9a0b9d1c85b64a635180ade073aeb66

libdwarf-20160613.tar.gz 1622221

Incorporates code detecting malformed DWARF and malformed Elf object files. Dwarfdump and libdwarf performance reading frame data improved significantly, though the improvements don't apply to all frame data interface functions. The configure/make system now builds libdwarf shared objects (when asked to) with a proper soname. Thanks to Sture Carlson, Hannes Domani, etienneberg, Steve Kaufman, Yue Liu, and Fabian Wolff for their help/comments on libdwarf. Major thanks to Carlos Alberto Enciso for his collaboration.

md5sum: 2e0f0ef6546b2155f53e2a4ed65bc44a

sha512sum (remove spaces following colon): 430978587e284f4c63e54790a7cbbfdf13c7a4154b 9e130dc788869b6c6584981c5af46b7b363d3b181e aaafd5190bcb17e5383f8600cb1d2627c423a7042dc2

libdwarf-20160507.tar.gz 1606305

Incorporates many additional checks so that corrupt dwarf will not crash an executable calling libdwarf. Thanks to Yue Liu for providing a number of small and corrupted objects.

md5sum: ae32d6f9ece5daf05e2d4b14822ea811

sha512sum (remove spaces following colon): 8a4d3721390d4d79fbf8d01fb27995ac9871f1d3e 19d85aa25c108ee4cc45968a5331e2b477f559168 c4597513235fb508bfe4ee1664c6dfbede3a47d48490b5

libdwarf-20160115.tar.gz 1538930

Now reads and prints DWARF5/4 macro data (The new .debug_macro section). Added some checks of abbreviation codes. Thanks to Emre Kultursay, Tom Kittel, Gernot Klingler, and Kubo Takehiro for suggestions and test cases. See the top-level README for hints on building the package outside of the source tree and building and using the shared-library version of libdwarf.

md5sum: 6d51b55210ebb349d23dde89cfd41089

sha512sum (remove spaces following colon): 594519460d3cd3f60f7e97931ce3e3d775393e03068a 2c932d72ba95d8cdb2c53b622671c5af8a798712937b 62dbf9594e2da8945553a0021a275cf677f4d90a

libdwarf-20151114.tar.gz 1457586

Support for reading Split Dwarf object files provided. New location and location-list interfaces added for Split Dwarf and DWARF5. Uses new functions to pass location list data to callers, not publicly defined structures, as functions make any future changes to location information easier to support. Existing DWARF 2,3,4 location information interfaces retained for compatibility so existing calling code is not affected..

md5sum: 99809436d7494607bd3c296d8b17ebc0

sha512sum (remove spaces following colon): 22c6a233cf156f3e7a8ad65c6b0f3c6b0de5a7ddc0f 1c71c9b2dc7efa59a4ee1c9714e981bb26d40a0c212 7501a3e853a7605af10be96bdcb0486723d4a1443c

libdwarf-20150915.tar.gz 1382772

Corrected accidental C99-isms, added missing return statements, and improved checking. Thanks to Carlos Alberto Enciso for these enhancements. I suggest using the git source base, it has some small fixes beyond this release related to new code for the .debug_addr and the .debug_str_offsets sections (DWARF5) and for reading gcc experimental two-level line tables.. Thanks to Emre Kultursay for encouraging me to add some needed DWARF5 features and for reporting bugs so the git source base gets corrected quickly.

md5sum: 08d243ea44e39ceb15f72c1066857cc1

sha512sum (remove spaces following colon): a567e653fdad598d911e2ed7e219945adbf0f00ef 8e81806e993916aacfc8075657ec3ca925e1efa85 c7860a0d9515cae2b04677dfb25ac416fb4cc47933441a

libdwarf-20150913.tar.gz withdrawn

Strings are checked thoroughly to ensure they do not run off the end of their section without a termination and cause chaos in libdwarf. Now with DWARF5 (and DWARF4) Debug Fission support, so one can nearly transparently (see dwarf_set_tied_dbg()) extract addresses denoted DW_FORM_addrx in a package file from the executable with the .debug_addr section. Withdrawn as 20150915 has this and more.

md5sum:

sha512sum (remove spaces following colon):

libdwarf-20150507.tar.gz 1365912

Now with DWARF5 (and DWARF4) Package File reader support. Package Files are a way to keep DWARF debug information in a separate object file. DWARF5 is not a released standard, so the new features must be considered tentative.

md5sum: 25e25c1659a2e74f6c145b8a668da89e

sha512sum (remove spaces following colon): 3495f6c17b5ade3a9f38e4d92b63f318e1f69d8841 95e6eafecb99c49e9366ed5c0fbdabd15f6d3b79c9 426565a5960364bb1ac1d1cb185363318872cdf83520

libdwarf-20150310.tar.gz 1346271

Improved range checking. Fixed bugs in dwgetopt(). Added omitted tags and attributes lists in dwarfdump to make error checking more accurate. Where pc checks make no sense in a line table (meaning on DW_TAG_type_unit and children) such dwarfdump checks are now omitted.

md5sum: 5707b4b15c33211ef1312e2c47fda713

sha512sum (remove spaces following colon): 983c0bb5d70f59e95b8b9de9cda74d714795526220 ac944b6e058554b1f1e831063ae5524d6a2de557e1 fe829ccbf17b1ab71195fa5589504ead3d94396ab0a4

libdwarf-20150115.tar.gz 1327921

The omission of an include of stdarg.h in the 20150112 release meant that standard-conforming compilers could get an error compiling dwarfdump due to va_list not being defined, though Ubuntu and FreeBSD compiles did not see such an error. Now dwarfdump does the include. The dwarfdump2 source has been removed as of this tar.gz file. Dwarfdump2 is no longer needed.

md5sum: 3d17bef568e24b4bc5913c0a60cbb342

sha512sum (remove spaces following colon): abcc465f3fcc369143cb34976ad2874b5a9d2a6b4f732be2 b83b0e7620799747778947aed0c10872a5fad73443cfa986 48bdc50a3b17c98292a6439b54d60222

libdwarf-20150112.tar.gz 1517394

New checking options added to dwarfdump. Dwarfdump2 no longer updated or compiled. Improvements in internal checking to handle badly formed Elf and Dwarf files. Better recovery from malloc failure.

md5sum: be8bcf2236058a0223be656cf748de1a

sha512sum (remove spaces following colon): 23fe3dec516a90c2cedb851971f2fd902e056bf4471a32 a2237881354d71af866fcdbc9d3ff55d4e83b75fdafd9f 7790bf90165506e9285259c67f342c4eccba

libdwarf-20140519.tar.gz 1448784

Source incompatibility for users of producer code: dwarf_producer_init() now has a new interface and a sensible way to select the output ABI/ISA for relocation numbers. Part of preparation to emit DWARF3,4,5. The reader code now handles DebugFission, called Split Dwarf objects in the draft DWARF5 standard.

md5sum: 4f7331cb8fe7acb6fe1ca4e45d13d55e

sha512sum (remove spaces following colon): ccf8180b69cdb47902564dda1fca52d15c10239ce6bb8c c9f5af5a67d37f888811572e314414372bfbc2b640c1fff 7cf87542f782f8390f733d884a24d9a16fb

libdwarf-20140413.tar.gz 1440545

Libdwarf now follows the DWARF2 standard properly in reading DW_FORM_ref_addr. The original DWARF2 standard is on dwarfstd.org so it's gone from the libdwarf source.

md5sum: 6cfa1c4f165ad312de9d213159073e05

sha512sum (remove spaces following colon): 7ecd27b40418fd98bb24ee59b9779efe30dca26384b4a36f5 a1b0a99805f4d8ff281b2e3d4470fb8e8da28045c34bf6b53 fdf85e9dfc5fa76c0eac8462ae8467

libdwarf-20140208.tar.gz 1718546

Fixed a bug in dwarfdump[2] Makefile.in so parallel make works reliably. Removed remaining trailing-whitespace. Moved tsearch testcases over to the libdwarf regressiontests repository as the tests seemed too large to keep in the source.

md5sum: 4dc74e08a82fa1d3cab6ca6b9610761e

sha512sum (remove spaces following colon): d8ba3eeaf36d98a1ee26397208fff1658a2b7a41c 25d3742a81617c74d6359aeff08bb6221f99b9937 9030575578e11cd66be1d906a5832a6edd362229ce2e7e

libdwarf-20140131.tar.gz 5633991

Radically simplifies libdwarf allocation code. Adds GNU-specific DW_FORM codes so recent gcc objects can be read usefully. Adds tsearch implementations (see the tsearch directory). Removes trailing whitespace (it appeared all over). Adds new functions to libdwarf for new DWARF reference types. The tsearch test cases have bloated this source release, but in future those test cases won't be in the tar file (instead they are in the libdwarf regressiontests repository on Sourceforge).

md5sum: ad758cf1715fc170ff248efc085feebe

sha512sum (remove spaces following colon): d41ebe4e7b76ad91f93b17e33da878fb0a35d7a35 32d641108b217bf93bcd9f10c1d52f0dd5f2ece08 3152d8dafe637ae343633f894122cbb77825b7a3350ed2

libdwarf-20130729.tar.gz 1533828

Added AARCH64 relocation support. Fixed some simple compiler warnings.

md5sum: 4cc5e48693f7b93b7aa0261e63c0e21d

sha512sum (remove spaces following colon): f9d25cfd6c6b15bebf6cd63c7014ecf4123798fce637c 0da103008758d6a9d5705c3797216a8d1ab3e210c4235 f199ab19d7ed0bf6c3582f49eacba1629c5cc0

libdwarf-20130207.tar.gz 1534527

Now with a simplified build (see README) and with checks for most compiler errors in producing DW_AT_sibling attributes. Verified on Ubuntu 12.10 and FreeBSD 9.1.

md5sum: 64b42692e947d5180e162e46c689dfbf

sha512sum (remove spaces following colon): 1cb272f80745a789d592d57e6a64b1b4ec6e1b646653 da2f19c2e2d803b8e90b52f5c69597360bf1703b1c25 7844c53c3f43a80cd9f45a2adb314ad2511c19e9

libdwarf-20130126.tar.gz 1488410

A mistake in handling DW_OP_GNU_const_type could lead to a libdwarf coredump at times, and even when it appeared to work the value printed was wrong. Thanks to Tom Hughes and Andrew Bernat for pointing out the DW_OP_GNU_const_type problem. This release has libdwarf interfaces compatible with releases before 20130125. Compared to 20130125 this restores the libdwarf.h interface Dwarf_Loc structure and changes the way the lr_number2 member is used for the new location expression operator DW_OP_GNU_const_type.

md5sum: ded74a5e90edb5a12aac3c29d260c5db

sha512sum (remove spaces following colon): c9911ce0b9725400ec1a70e809e185b122095c534f05687 ea0be16a0e9bfe3b8128e353834c43b5fe80e1b149b11 f113fcce53c57bad0a12b3b091dd0e31d043

Older information -

For information on previous releases, see the older release list

Comments on Testing

[top]

Every release of libdwarf/dwarfdump is tested with many options and option-combinations. There is no real reason libdwarf/dwarfdump users should need to redo this testing work. However, if you do wish to try running the regression tests, you will find them in git in Sourceforge via anonymous access "git clone https://github.com/davea42/libdwarf-regressiontests" See the file README.txt in the base directory of the tests for an overview of the test process. We do not provide a tar file of the regression tests. The regression tests are updated with every libdwarf release.

Additional tests (simple object files or shared-objects or executables) are accepted here should you wish to submit such, but the goal is to add tests that represent previously-untested aspects of DWARF/libdwarf, not to duplicate existing tests. Smallish object files are preferred. No source need be provided. The submitter has to be sure, and state, that releasing the objects here is appropriate.

Nothing in libdwarf looks at very many sections of an Elf file: the other section contents can be zeroed out without affecting the object use for testing libdwarf (see the directory named 'zero' in the testing distribution for a convenient byte-zeroing helper application in C++ source). Sections like .text and .data (and closely related sections) are of no value for testing libdwarf. It may be that otherwise-proprietary objects can be released for use in this test suite once the instruction and data sections are zeroed out.

[top]

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.