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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux