Comment 14 for bug 189241

Revision history for this message
poy (poy) wrote :

i have taken backtrace-mingw out as it depends on the bfd library, which is part of binutils. the following e-mail details several reasons why using bfd is not a good idea: <http://cygwin.com/ml/cygwin/2011-06/msg00149.html>

to summarize:
- there's a license issue: if one links to it, one has to provide its sources.
- it isn't supposed to be used by regular apps; it's just for binutils itself.
- trying to build it is a pain, requires various files from all over the binutils repo and just isn't practical.

so, with bfd out of the way, i have tried to look for other DWARF parsers.

google-breakpad has one but too dependent on their code: it focuses on generating information for their minidump format.

libdwarf <http://reality.sgiweb.org/davea/dwarf.html> is the only other alternative i could find. it is very well documented (PDF files!). a problem is that libdwarf was initially only designed to parse the DWARF info contained in ELF programs (the binary format used on Linux); Windows uses a different format, PE/COFF. libdwarf however provides abstract methods that one can use to make it swallow a non-ELF format.

implemented in rev 2564.
this hasn't been easy as this is apparently the first public non-ELF use of libdwarf; but it has been very interesting. :)