[RFC] C++ vs forced unwinding

Ulrich Weigand Ulrich.Weigand@de.ibm.com
Wed Apr 2 17:15:00 GMT 2003

Richard Henderson wrote:

>Does it help to know that ia64 and x86_64 *always* include
>unwind tables, and so it will continue to "just work" there?  ;-)

Same on s390(x) ...

>Really, I think it's about time to revisit re-enabling unwind
>tables by default in C.  The overhead when using current
>binutils and glibc has dropped to just about zero.

Plus you get the advantage that you don't need to maintain
a stack backchain (frame pointer links etc.) at run time
any more, while still being able to get backtraces.

There's just two things that really should be fixed:

- gcc's __builtin_return_address / __builtin_frame_address should be
  using unwind tables instead of hardcoded assumptions about just how
  a frame link is stored

- glibc's backtrace () likewise

(The latter looks easy; not sure about the former ...)

Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com

More information about the Gcc-patches mailing list