Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC master/7.12.1] Don't propagate C++ exceptions across readline using SjLj on SjLj-based exception unwinding
Date: Tue, 20 Dec 2016 14:33:00 -0000	[thread overview]
Message-ID: <20161220143308.GC18061@E107787-LIN> (raw)
In-Reply-To: <fdfc0c0a-97c2-4f79-0914-b07adb6afe16@redhat.com>

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 (齐尧)


  reply	other threads:[~2016-12-20 14:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 14:42 Yao Qi
2016-12-20 11:50 ` Pedro Alves
2016-12-20 14:33   ` Yao Qi [this message]
2016-12-20 16:25     ` Pedro Alves
2016-12-20 19:43       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161220143308.GC18061@E107787-LIN \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox