Question on Dwarf2 unwind info and optimized code
Jim Wilson
wilson@specifix.com
Tue Oct 25 00:52:00 GMT 2005
Christophe LYON wrote:
> I have been look at the Dwarf2 frame info generated by GCC, and how it
> works.
> From what I can see, only the register saves are recorded, and not the
> restores. Why?
The frame info is primarily used for C++ EH stack unwinding. Since you
can't throw a C++ exception in an epilogue, epilogue frame info isn't
needed for this, and was never implemented for most targets. Which is a
shame.
There is a PR for this, PR 18749, for the x86-64 target. The lack of
epilogue unwind info shows up if you run the libunwind testsuite.
Otherwise, it is really hard to find an example where the missing unwind
info is a problem.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com
More information about the Gcc
mailing list