This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fno-unwind-tables -fno-asynchronous-unwind-tables versus debugging


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]