Function, file and line information out of '_Unwind_Context' ptr

Gerrit Bruchhäuser gbruchhaeuser@orga-systems.com
Mon Jun 28 14:32:00 GMT 2004


google pointed me to some '_Unwind_...' related functions at:
    
http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/libgcc-sman.html
    http://www.jaj.com/space/phil/gccdoxy/struct___unwind___context.html

But how do I get the mentioned 'PC' pointer out of the structure?


Arnaud Charlet wrote:

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



More information about the Gcc mailing list