This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch ARM] Fix PR target/56846
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: ramrad01 at arm dot com
- Cc: Tony Wang <tony dot wang at arm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, dan at debian dot org, aph-gcc at littlepinkcloud dot com, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 9 Sep 2014 10:16:03 +0100
- Subject: Re: [Patch ARM] Fix PR target/56846
- Authentication-results: sourceware.org; auth=none
- References: <000901cfc04f$ee99a5f0$cbccf1d0$ at arm dot com> <CAJA7tRb1ciGbWEo48LW3yGcOCJR_NqOuHvrCacREjcp734P7Vg at mail dot gmail dot com>
On 09/09/14 09:33 +0100, Ramana Radhakrishnan wrote:
I'd like another review here however it looks sane to me. You need to
CC libstdc++@gcc.gnu.org for libstdc++ patches. Your email doesn't say
how you tested this patch. Can you make sure you've run this through a
bootstrap and regression test on GNU/Linux and a cross regression test
on arm-none-eabi with no regressions ?
Thanks for forwarding this, Ramana.
I don't know the EABI unwinder code so if Ramana is OK with it and no
other ARM maintainers have any comments then the patch is OK with me
too, with a couple of small tweaks ...
gcc/libstdc++-v3/ChangeLog:
2014-8-25 Tony Wang <tony.wang@arm.com>
PR target/56846
* libsupc++/eh_personality.cc: Return with CONTINUE_UNWINDING
when meet with the unwind state pattern: _US_VIRTUAL_UNWIND_FRAME |
_US_FORCE_UNWIND
The changelog should say which function is being changed:
* libsupc++/eh_personality.cc (__gxx_personality_v0): ...
Or maybe:
* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): ...
Instead of "when meet with the unwind state pattern" please say "when the state
pattern contains"
diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc
index f315a83..c2b30e9 100644
--- a/libstdc++-v3/libsupc++/eh_personality.cc
+++ b/libstdc++-v3/libsupc++/eh_personality.cc
@@ -378,6 +378,11 @@ PERSONALITY_FUNCTION (int version,
switch (state & _US_ACTION_MASK)
{
case _US_VIRTUAL_UNWIND_FRAME:
+ // If the unwind state pattern is _US_VIRTUAL_UNWIND_FRAME |
+ // _US_FORCE_UNWIND, we don't need to search for any handler
+ // as it is not a real exception. Just unwind the stack.
I think this comment would be easier to read if the expression with the two
constants was all on one line:
// If the unwind state pattern is
// _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
// then we don't need to search for any handler as it is not a real
// exception. Just unwind the stack.
+ if (state & _US_FORCE_UNWIND)
+ CONTINUE_UNWINDING;
actions = _UA_SEARCH_PHASE;
break;