On Wed, Aug 29, 2012 at 1:07 AM, Paweł Sikora <pl...@agmk.net> wrote: > On Wednesday 29 of August 2012 00:22:55 Ian Lance Taylor wrote: >> I've spent the last couple of days working on a stack backtrace library. >> >> It uses the GCC unwind interface to collect a stack trace, and parses >> DWARF debug info to get file/line/function information. (Of course it's >> silly to write yet another DWARF reader, but I didn't find an existing >> reader that seemed wholly suitable.) > > isn't the libdwarf a good enough for reading? > > http://reality.sgiweb.org/davea/dwarf.html
libdwarf is GPLv2, so it wouldn't work for libgo, which was one of my goals. Also, while I could certainly have missed something, libdwarf seems to be designed to read through DWARF information, or to generate it. It doesn't seem to be designed to efficiently map PC addresses to file/line information, which means reading just a subset of the information, e.g., to pick up the name of an inlined function. Ian