This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC master/7.12.1] Don't propagate C++ exceptions across readline using SjLj on SjLj-based exception unwinding
On 16-12-20 11:49:58, Pedro Alves wrote:
> >
> > I dig into libcc/unwind-sjlj.c and gcc/except.c, but I still
> > don't find much clue. This patch fixes this issue by not propagating
> > the exception via setjmp/longjmp if __USING_SJLJ_EXCEPTIONS__.
>
> I think I have a working approach that isn't specific to sjlj
> exceptions, which I'd prefer. I.e., use "noexcept", to make
> the compiler understand that the function doesn't throw, and hence
> doesn't need to issue _Unwind_SjLj_Register / _Unwind_SjLj_Unregister
> calls. That seems to do the trick. I tried both -O0 and -O2 (with
> GCC trunk). Does this work for you too?
Yes, it is better. I wanted to let gcc not to generate
_Unwind_SjLj_Unregister calls, but I failed to find "noexcept" does
the trick.
The patch works for me.
--
Yao (齐尧)