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: Function, file and line information out of '_Unwind_Context' ptr


> 'addr2line' is not available on OSF-Alpha and invoking system call takes a lot

addr2line is part of binutils, and is supported under Tru64.

> of time. Say it would be also possible to call system on gdb (and my pid) to 
> retreive a backtrace with file an d line information but this is too slow for 
> memory leak detection tools.

The way all such tools work is as follows:
- record the non symbolic traceback (i.e. list of PC) at run time, which is
  not too costly
- compute the corresponding symbolic traceback off line, which is the costly
  part

The second part can be achieved using bfd directly, or indirectly via
gdb, addr2line or similar tools.

Arno


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