-fno-unwind-tables -fno-asynchronous-unwind-tables versus debugging
waltdnes@waltdnes.org
waltdnes@waltdnes.org
Fri Oct 7 19:43:00 GMT 2016
On Fri, Oct 07, 2016 at 07:42:36AM -0700, Ian Lance Taylor wrote
> For typical use those options will not affect debugging.
>
> Using those options will in some cases make it harder for the debugger
> to give you a good backtrace when a signal occurs.
>
> (And of course using those options means that C++ exceptions will not
> work correctly, and if you are using glibc the pthread_cancel function
> may not work correctly.)
This begs the question... what happens if CFLAGS and CXXFLAGS differ?
* CFLAGS has "-fno-unwind-tables -fno-asynchronous-unwind-tables"
* CXXFLAGS has "-funwind-tables -fasynchronous-unwind-tables"
Will this solve the problems you mentioned, by allowing GCC to do its
thing, but still shrinking C code?
Another possible option... I believe it's possible for modules to
over-ride the flags from the environment. Would it be possible for just
the modules that need exception-handling and/or pthread_cancel to ignore
these flags, and set them locally?
--
Walter Dnes <waltdnes@waltdnes.org>
More information about the Gcc-help
mailing list