aboutsummaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorMarcin Koziej <creep@desk.pl>2005-08-14 04:01:52 +0200
committerAndrew Pinski <pinskia@gcc.gnu.org>2005-08-13 19:01:52 -0700
commitee1658f34360cd994f12c0bc525b714b2efe7bb8 (patch)
tree3986954b339cf4c36b639fae792976b61051eda5 /libobjc
parent65045c09038446c48783fe7e30134d72c131a0b1 (diff)
downloadgcc-ee1658f34360cd994f12c0bc525b714b2efe7bb8.zip
gcc-ee1658f34360cd994f12c0bc525b714b2efe7bb8.tar.gz
gcc-ee1658f34360cd994f12c0bc525b714b2efe7bb8.tar.bz2
re PR libobjc/22492 ([PATCH] Abort after @finally: libobjc passing exception value instead of exception.)
libobjc/ChangeLog: 2005-08-13 Marcin Koziej <creep@desk.pl> Andrew Pinski <pinskia@physics.uc.edu> PR libobjc/22492 * exception.c (PERSONALITY_FUNCTION): Fix the PC with finally. testsuite/ChangeLog: 2005-08-13 Marcin Koziej <creep@desk.pl> Andrew Pinski <pinskia@physics.uc.edu> PR libobjc/22492 * execute/exceptions/finally-1.m: New test. Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu> From-SVN: r103073
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/ChangeLog6
-rw-r--r--libobjc/exception.c12
2 files changed, 16 insertions, 2 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index ecd5685..9f623b8 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-13 Marcin Koziej <creep@desk.pl>
+ Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR libobjc/22492
+ * exception.c (PERSONALITY_FUNCTION): Fix the PC with finally.
+
2005-08-13 Andrew Pinski <pinskia@physics.uc.edu>
* Makefile.in (extra_ldflags_libobjc): New.
diff --git a/libobjc/exception.c b/libobjc/exception.c
index cfce70c..e34f34b4 100644
--- a/libobjc/exception.c
+++ b/libobjc/exception.c
@@ -165,7 +165,8 @@ PERSONALITY_FUNCTION (int version,
const unsigned char *p;
_Unwind_Ptr landing_pad, ip;
int handler_switch_value;
- int saw_cleanup, saw_handler;
+ int saw_cleanup = 0, saw_handler;
+ void *return_object;
/* Interface version check. */
if (version != 1)
@@ -334,8 +335,15 @@ PERSONALITY_FUNCTION (int version,
}
install_context:
+ if (saw_cleanup == 0)
+ {
+ return_object = xh->value;
+ if (!(actions & _UA_SEARCH_PHASE))
+ _Unwind_DeleteException(&xh->base);
+ }
+
_Unwind_SetGR (context, __builtin_eh_return_data_regno (0),
- __builtin_extend_pointer (xh->value));
+ __builtin_extend_pointer (saw_cleanup ? xh : return_object));
_Unwind_SetGR (context, __builtin_eh_return_data_regno (1),
handler_switch_value);
_Unwind_SetIP (context, landing_pad);