This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Function, file and line information out of '_Unwind_Context' ptr
On Tue, 2004-06-29 at 00:30, Gerrit BruchhÃuser wrote:
> What did you mean with LSB?? I never heard of it before. Did you mean
> one of:
> http://www.linuxbase.org/
This one. The Linux Standard Base. The docs there have lots of links
to other docs that you might find helpful, like object file standards,
ABI standards, etc.
> Now I am able to create backtraces in case '-O0 -g3' is given to g++.
> Well, this is almost all I wanted to do. Just the function names are
> missing but I think I am able to figure this out someway. I want to
> integrate 'addr2line' into my program anyways.
The addr2line man page says to use -f to get function names.
> Is there any buildin to retreive an indication on whether the unwinding
> may work (-O0 and -g are given)?
No. It will always work for EH, which is the reason why it exists. But
whether it will give you an accurate backtrace depends on what
optimizations have been enabled, and since this isn't the primary use of
it, we haven't really cared how accurate this is.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com