This is the mail archive of the
mailing list for the GCC project.
Re: GCC stack backtraces
On Wed, Aug 29, 2012 at 1:07 AM, PaweÅ Sikora <firstname.lastname@example.org> 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?
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.