| HOME | Software | Palm | DWARF | Lotus Cars | RPM Building |
![]() |
||
David A's DWARF Page |
he DWARF Debugging Information Format is of interest to
programmers working on compilers and debuggers.
It was developed by a committee starting around 1991.
Starting around 1991 SGI developed the libdwarf and dwarfdump
tools for internal use and as part of SGI IRIX developer tools.
Since that time dwarfdump and libdwarf
have been 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.
License terms are GPL/LGPL. The details are discussed in the license page
DWARF specifications and the dwarf email forums are at http://www.dwarfstd.org. Sign up for the email discussion list there.
Email about libdwarf and dwarfdump (as well as requests to be notified by email of new releases of libdwarf/dwarfdump) should go to libdwarf-list -at- earthlink -dot- net (replace -at- and -dot- with the normal single characters to form the email address). (This new email began service in June 2008.)A comparison of DWARF3 with DWARF2 updated December 1, 2005, titled "DWARF3: Better than DWARF2" (pdf, 81736 bytes) might be of interest if you are interested in how DWARF3 differs from DWARF2. The source code is available here written in lyx ( using lyx as an experiment in evaluating the lyx document preparation system).
All distributions contain C source plus the DWARF2 specification plus libdwarf specifications. Documentation on MIPS/SGI extensions to DWARF2 is in the distribution (see the file mips_extensions.txt).
Compilation will fail if libelf.h is missing (it's missing from RedHat 9.0, for example, though libelf.a/.so is present). In that case find a libelf distribution to get libelf.h.
Beginning in 2007 libelf.h may be distributed with a use of off64_t as a data type. In 32bit Linux with some distributions either _GNU_SOURCE or __USE_LARGEFILE64 must be defined before including either sys/types.h or libelf.h: a plain include of libelf.h will not compile. The configure scripts and some coding in libdwarf/dwarfdump headers attempt to deal with this as of December 2007 so that older and newer libelf.h will work transparently (allowing libdwarf/dwarfump to build). As a result of the 2007 libelf.h off64_t type you may see a warning from configure when plain libelf.h does not compile: ignore that configure warning.
| filename, download-link | Bytes | Reason for release |
|---|---|---|
| libdwarf-20080615.tar.gz | 1092542 |
Removed __SGI_FAST_LIBELF code, no one could use it anyway. Fixed an off-by-one in dwarfdump which could reference off the end of an array in a specfic circumstance and verify string table index refers to inside the table when printing relocations. Corrected return code from libdwarf when there is no dwarf information. Thanks to Carlos Alberto Enciso for noticing the bugs. Fixed indentation and removed some tabs in favor of spaces (in a few files). |
| libdwarf-20080613.tar.gz | --- |
Withdrawn. A typo meant the main directory extracted from the tarball had the wrong name (it had 2006 in the name, not 2008). See libdwarf-20080615.tar.gz for the corrected tarfile. |
| libdwarf-20080409.tar.gz | 1091778 |
A giant a.out exposed an inflexible (slow) handling of abbreviations in libdwarf as well as showing that one (internal) field was too small to accommodate over 64K abbreviations in one compilation unit. The relevant hash table adapts now and the field is 'large enough'. Added -H and -n options to dwarfdump. Added a dwarfdump -ka new check for correctness. |
| libdwarf-20080228.tar.gz | 1086598 |
This changes the libdwarf-internal implementation of reading libelf so that the reader is not directly tied to libelf or even elf. Meaning a libdwarf can be built that reads other object file types or that uses some library other than libelf to do the reading (subject only to simple constraints, see libdwarf.h). Thanks to Josh Fuhs for designing and implementing the object-file-reader revisions. |
| libdwarf-20080208.tar.gz | 1079230 |
Due to a typo, calling _dwarf_fde_section_offset() (a interface which is still supported) would lead to an infinite loop in libdwarf-20071209 and libdwarf-20080125. The libdwarf producer forms code now allows more of the newer attributes (so is more complete). Alloca is no longer used anywhere (it was really only used one place). The libdwarf producer code controlling the offset-size is more sensible: standard DWARF (32 bit offsets) is the default, use configure --enable-dwarf-format-sgi-irix to get IRIX 64bit offsets. See the libdwarf README and libdwarf2p.1.pdf for details. Thanks to Carlos Alberto Enciso and Melanie Zumwalde for noticing some of these errors. |
| libdwarf-20080125.tar.gz | 1074859 |
In the producer library code dwarf_die_link() is now O(1) where it was O(N) before. Thanks to Daniel Gollub for finding this performance improvement. dwarf_die_link() now back-links siblings (in its internal lists) correctly. The back link bug had no (known) effect on dwarf generated by libdwarf. |
| libdwarf-20071209.tar.gz | 1073568 |
Renamed 4 functions so they are now exported by libdwarf as dwarf_*. dwarf_fde_section_offset(), dwarf_cie_section_offset(), dwarf_print_lines(), and dwarf_ld_sort_lines() are the new names. The old _dwarf_* names are still supported in libdwarf.h but anyone building a shared library could choose to export only dwarf_* names and dwarfdump will now compile and link successfully with that shared library. The changes in libdwarf-20071208.tar.gz are incorporated in this release. |
| libdwarf-20071208.tar.gz | withdrawn |
Added acceptance of .eh_frame S augmentation. Updated config.guess config.sub to latest (2006-11-15). Added configure tests and some code in dwarf_incl.h and globals.h to define _GNU_SOURCE so that it will all compile with recent libelf.h use of off64_t (yet still compile with earlier libelf.h). Regenerated configure. Withdrawn in favor of the December 9 version above. Two nearly identical releases a single day apart seemed silly. |
| libdwarf-20071016.tar.gz | 1069958 |
Two fixes. dwarf_siblingof() could try to access a byte past the end of an Elf section leading to a coredump. The dwarf macro reading code could (in the DWARF_SIMPLE_MALLOC case only) allocate and free memory inconsistently leading to malloc arena corruption. Thanks to Cristi Vlasceanu for providing a tiny testcase showing the problems. |
| libdwarf-20071015.tar.gz | 1069600 |
The special build macro DWARF_SIMPLE_MALLOC was incorrectly implemented (now fixed): it could lead builds employing that macro to coredump in libdwarf. Now (just before exit) dwarfdump free()s some space it previously left mallocd. |
| libdwarf-20070904.tar.gz | 1068927 |
Updated FSF address everywhere. Added qualifier for DWARF4 DW_AT_high_pc where applicable in dwarfdump output. Deleted 2 files which were never used. Added documentation of new producer functions in libdwarf. |
| libdwarf-20070703.tar.gz | 1064669 |
Adding new libdwarf function dwarf_get_loclist_entry() to extract CFA val_expression bytes usefully. dwarfdump now uses that info to print those expression bytes with -v. Corrected incorrect output new in 20070702. |
| libdwarf-20070702.tar.gz | withdrawn |
Withdrawn: see newer release.
Adding -R option to dwarfdump: a 'generic' register set
for frames which prints registers as r |
| libdwarf-20070701.tar.gz | 1060269 |
DW_CFA_val_expression was handled wrong in libdwarf leading eventually to an invalid register number reading a GNU .eh_frame section (dwarfdump reported an error). Once again thanks to Cristian Vlasceanu for noticing libdwarf was broken and for providing a test case. |
| libdwarf-20070525.tar.gz | 1059960 |
Now the documentation is in pdf form (instead of postscript) as most people expect documents to be pdf. Corrected libdwarf and dwarfdump bugs that prevented dumping GNU eh_frame built with gcc 4.1.2. Thanks to Cristian Vlasceanu for noticing libdwarf was broken and for providing a test case. |
| libdwarf-20070508.tar.gz | 934034 |
Incorporates Sun Microsystems additions including cleanups of the producer code so it no longer leaks memory and the -G option to dwarfdump. Thanks to Chris Quenelle for his help. Minor cleanups to the producer library document and the copyright documents (no change in terms is intended). |
| libdwarf-20070412.tar.gz | 907541 |
Lists Sun Microsystems extensions (dwarf.h), so dwarfdump on Sun executables shows readable output. Thanks to Chris Quenelle for his help. The old sgi-specific -mm-to-ps document build now uses groff instead (regenerated documents with groff). Increased the static size of the dwarfdump die-stack (dwarfdump now exits with an error if the stack overflows). |
| libdwarf-20070223.tar.gz | 902453 |
Some formatting was a bit off because of macros without terminating semicolons. Changed all the libdwarf/dwarf_util.h macros so now all uses require terminating semicolons and re-indented libdwarf. Fixed an output bug in dwarfdump frame output (was missing a newline in some cases). |
| libdwarf-20070220.tar.gz | 902042 |
dwarf_get_macro_details() was leaking memory and had thread-unfriendly static data. libdwarf/README has words about thread safety now. The dwarf_frame printing code was off-by-one so it printed some bytes wrong in val-expressions. |
| libdwarf-20070209.tar.gz | 886341 |
dwarf_srclines() was leaking memory. |
| libdwarf-20061206.tar.gz | 886388 |
dwarf_frame.c _dwarf_exec_frame_instr() was still using fixed register table sizes. Now uses run-time sizing. Thanks to Peter Lloyd for noticing a <= where a < was wanted in that routine. |
| libdwarf-20061108.tar.gz | 885908 |
Previously, producer code would coredump if dwarf_add_expr_gen() called with DW_OP_deref_size, DW_OP_xderef_size, or DW_OP_pick as the operator. |
| libdwarf-20060925.tar.gz | 893251 |
An unusual sequence of dwarf_next_cu_header() calls could result in dwarf_offdie() returning the wrong die. The problem is not visible in dwarfdump output as dwarfdump does not use a call sequence that could show the problem. |
| libdwarf-20060614.tar.gz | 892429 |
dwarfdump: Minor cleanup of gnu eh_frame augmentation data output. libdwarf: Correct the handling of DW_EH_PE_pcrel flag in code dealing with gnu eh_frame z augmentation (errors were noticed in .eh_frame output by libdwarf/dwarfdump for x86_64). The 'clean' rule of the Makefile now removes libdwarf.so if libdwarf.so is present in the build directory. |
| libdwarf-20060612.tar.gz | 878865 |
dwarfdump: When (as for DW_FORM_data1) the form does not indicate signedness and dwarfdump does not keep track of enough context to determine signedness and the value is such the signedness is unclear, print the value as unsigned followed by signed. An example is "182(as signed = -74)". |
| libdwarf-20060421.tar.gz | 877722 |
libdwarf: fixed bad initialization in dwarf_get_fde_info_for_all_regs(). Thanks to Cristi Vlasceanu for noticing it was broken. |
| libdwarf-20060419.tar.gz | 877465 |
dwarfdump: added fclose() on configuration file. dwarfdump and libdwarf: all .c files now formatted with GNU indent default formatting. |
| libdwarf-20060418.tar.gz | 878784 |
dwarfdump (and libdwarf frame reader) are now configurable
at run time to print frame data appropriately.
So -f and -F will print register names appropriate for the ABI,
and handle large or small register sets sensibly.
(A single dwarfdump executable can print any number
of different ABIs frame data
appropriately without recompiling libdwarf or dwarfdump -- and you can
add your favorite ABI/instruction set into a configuration file.)
See -x abi= |
| libdwarf-20060327.tar.gz | 844193 |
Initializes file_entry_count in dwarf_line.c now. |
| libdwarf-20060324.tar.gz | 844113 |
Corrects line table problems handling gcc3/gcc4 output. Refactored line-table-header reading into a single routine. Fixed typo that made access to .eh_frame impossible. 844110 byte version of this file was missing dwarf.h fixes (nothing substantive, just moving things for human readers). 844149 byte version is correct but rcs version strings not all updated. 844113 byte version is the 'final' version. file_entry_count in dwarf_line.c is uninitialized (BUG!). Initialize it to 0 for correct operation. Thanks to Mikael Vidstedt for noticing. WITHDRAWN. |
| libdwarf-20060317.tar.gz | 841545 |
Now handles gcc's DWARF3 and eh_frame sensibly. Parts are untested as I have no test cases for various DWARF3 constructs. |
| libdwarf-20060308.tar.gz | 834474 |
The crucial dwarf_child() code could dereference a byte off the end of a CU. Fixed. Refactored .debug_frame code for clarity, performance, elimination of duplicate code, and preparing to handle GNU eh_frame (support for latest eh_frame not yet present). Moved some sgi/irix only functions to separate source files so most apps will get fewer bytes of libdwarf linked in. If you have 834453 byte version, it is broken, delete it: revised to 834474 byte version. |
| libdwarf-20060224.tar.gz | 827906 |
Added dwarf_line_srcfileno() function and documented it. |
| libdwarf-20051201.tar.gz | 826422 |
Corrected validity-checking tables and made creation of internal tables more robust for dwarfdump -k. |
| libdwarf-20051128.tar.gz | 824714 |
Corrected dwarf.h (per public review document). Added DWARF3 tags, attrs to validity-checking tables in dwarfdump (-k? options). WITHDRAWN. Bugs in -k output. |
| libdwarf-20051108.tar.gz | 822758 |
Removed non-standard malloc.h includes (stdlib.h suffices). Corrected a couple dwarf3 omissions in dwarf.h. |
| libdwarf-20051024.tar.gz | 822665 |
Added in the new DWARF3 codes specified in the DWARF3 public review document just published on the free standards website. |
| libdwarf-20051003.tar.gz | 821184 |
Fixed an incompatibility: the July/August versions did not support exactly the same dealloc code as earlier versions for SGI-only dwarf sections like .debug_weaks. Full compatibility is restored, and the new more-complete-dealloc interfaces from July are kept. |
| libdwarf-20050801.tar.gz | 820895 |
dwarfdump could coredump due to fixed length buffer overrun for location list printing. Buffer now expands as needed. And dwarfdump sprintf calls changed to snprintf for further safety. |
| libdwarf-20050722.tar.gz | 819084 |
New deallocation routines for dwarf_srclines() and all the pubnames-like sections. New (optional at library-compile) full checking of dealloc calls. New support for .debug_pubtypes section (DWARF 3 section). All deallocation code verified, so all libdwarf memory leaks plugged (but client code must change to get full dealloc properly). dwarf_formstring() documentation was wrong: no dealloc required or allowed (documentation fixed). |
| libdwarf-20050714.tar.gz | 807304 |
[This release not recommended. Certain memory leaks have been fixed. Use 20050722 instead] |
| libdwarf-20050503.tar.gz | 801031 |
Moved common code into subroutine (for .debug_pubnames and like sections). Added checks for new gcc z* .eh_frame augmentation strings (which we don't yet handle, but do recognize now). Added -F flag for .eh_frame (making its handling a disinct flag (from -f)). |
| libdwarf-20050318.tar.gz | 794541 |
Corrected handling of .eh_frame and .debug_macro. Radically changed the formatting of .debug_macro to make it more complete. Still lacking support for dwarf3 frame operations. |
| libdwarf-20050216.tar.gz | 792579 |
Beginning of support for dwarf3 reading. Added #elif in pro_incl.h so another platform builds out-of-the-box, even missing elf.h. (The library remains firmly Elf specific though. In this specific added allowance libelf.h fills in the types.) |
| libdwarf-20041122.tar.gz | 792298 |
Updated configury for debian/mips. |
| libdwarf20041027.tar.gz | 791001 |
Updated dwarf.h, adding #define for HP and GNU attributes/tags. |
| libdwarf20041026.tar.gz | 790070 |
Regenerate configure config.h.in (using autoconf 2.58). Update config.guess config.sub. |
| libdwarf20041011.tar.gz | 785822 |
Sets ru_offset (libdwarf) now when it was overlooked before. Avoids recursion in favor of iteration (dwarfdump) on siblings. |
| libdwarf20040507.tar.gz | 785289 |
dwarfdump -k a would coredump dwarfdump: getopt arg list was wrong. |
| libdwarf20040315.tar.gz | 785268 |
For DW_CFA_def_cfa_register, the dwarf reader was setting more than just the register: was zeroing offset. Now it just sets the register value. |
| libdwarf20040203.tar.gz | 785224 |
If compiled with Dwarf_Word 64 bits, upper bits of values from two 'optimization' macros were erroneous. Revised the macros to call already existing routines. |
| libdwarf20040115.tar.gz | 785181 |
Changed from bzero() to memset() calls for portability. Removed #include of bstring.h, no longer needed. Added check for alloca.h in configure. Temporarily unavailble. |
| libdwarf20040102.tar.gz | 784278 |
Updated configure scripts and added README hints. Recent RedHat and Debian don't ship with libelf.h giving folks trouble. And anyway the configure stuff was really old/obsolete. |
| libdwarf20031230.tar.gz | 733009 |
Corrected typo in comment, fixed botch in .eh_frame section recognition. |
| libdwarf20031006.tar.gz | 732757 |
Applied indent(1) to recently changed files. |
| libdwarf20031002.tar.gz | 733758 |
Adds support for the .debug_loc section. DW_FORM_indirect support fixed. Allows padding at the end of .debug_pubnames .debug_aranges and the like (the data has a 'terminator' and the header has a length, and if the length allows a bit of padding after the terminator that's ok). |
| libdwarf2003Apr06.tar.gz | 717884 |
Now delays loading sections till really required. Supporting the DWARF2 Debugging Information Format produced by a variety of compilers, with some limited support for some aspects of DWARF3. |
| libdwarf2002Nov22.tar.gz | 722257 | Adds support for printing macro sections. Corrects spellings of a couple TAGs. Adds UPC (Universal Parallel C) user-space defines. The awk scripts in dwarfdump now allow multiple TAG names with the same value to be handled: the first such encountered is taken as the name dwarfdump uses. For example, DW_TAG_template_type_parameter and DW_TAG_template_type_param were both used in the DWARF2 spec, and now dwarf.h allows both spellings by having two #defines with the same value (DWARF3 specifies that DW_TAG_template_type_parameter is the correct spelling). |
| libdwarf2002Oct23.tar.gz | 721083 | Bug fixes (to consumer and producer libraries) plus making dwarf_get_str() in the library work sensibly (revision of the functional interface). |
| libdwarf2002April28.tar.gz | 717884 | Many bug fixes... |
| libdwarf2001Aug29.tar.gz | 721452 | Early release with dwarfdump. |
| libdwarf2000Jun12.tar.gz | 713543 | Early release with dwarfdump. |
| libdwarf2001Jun07.tar.gz | 716508 | Early release with dwarfdump. |
| libdwarf2001May23.tar.gz | 716027 | Early release with dwarfdump. |
| libdwarf2000Jul25.tar.gz | 712694 | The source changed from original SGI release terms to LGPL terms (standard GPL/LGPL but naming SGI as copyright holder) in April 2000, so this is the first public release (that I know of/have a copy of) with the new terms. |
| libdwarf1999Dec14.tar.gz | 712252 | Early release with dwarfdump. |
| 1999 | ? | First libdwarf with configure script, late June 1999. |
| 1999 | ? | First release including dwarfdump sometime after March 1999. |
| 1994 | ? | Initial release of libdwarf (no dwarfdump, no configure script), likely was in June 1994. The original copyright terms were unique to SGI and required certain acknowledgements in documentation by organizations shipping libdwarf. |
For a few obsolete releases of libdwarf see ftp://ftp.sgi.com/sgi/dev/davea. Copies of the libdwarf releases on ftp.sgi.com are available in the list above.