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 
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.

It would be extremly useful to have a 'Backtrace' like building function in 
g++ (as there is in GLIBC) which does work with any platform g++ runs on. I 
thought I could use the '_Unwind_Stack' function for this. Is there maybe an 
other way to retreive file and line information out of the mentioned 
structure pointer??

Thx,
Gerrit

Am Samstag, 26. Juni 2004 04:32 schrieb Jim Wilson:
> Gerrit Bruchhäuser wrote:
> > how can I retreive a backtrace which includes function-name, file and
> > line information on Tr64-OSF-Alpha (glibc is not supported on this
> > platform).
>
> Extract the pc from the context structure, and use system() to call the
> addr2line program from binutils.  This assumes the program was compiled
> with debug info.


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