This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC stack backtraces


On Wed, Aug 29, 2012 at 1:07 AM, PaweÅ Sikora <pluto@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]