summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-28 19:52:27 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-28 19:52:27 +0000
commit1774763d780a39d0233820f41aa03e244d0b4033 (patch)
treec9a2afea8c3e3d2ed63f6bfa76d8c96c5534d972 /libstdc++-v3
parent6bf97f82d398475683e5bea8ae14906c30550cba (diff)
downloadgcc-1774763d780a39d0233820f41aa03e244d0b4033.tar.gz
2005-06-28 Paul Brook <paul@codesourcery.com>
gcc/ * Makefile.in: Set and use UNWIND_H. Install as unwind.h. * c-decl.c (finish_decl): Call default_init_unwind_resume_libfunc. * except.c (add_ehspec_entry): Generate arm eabi filter lists. (assign_filter_values): Ditto. (output_ttype): New function. (output_function_exception_table): Use output_ttype. Generate arm eabi filter lists. (default_init_unwind_resume_libfunc): New function. * except.h (default_init_unwind_resume_libfunc): Add prototype. * optabs.c (init_optabs): Don't set unwind_resume_libfunc. * opts.c (decode_options): Use targetm.unwind_tables_default. * target-def.h (TARGET_ASM_TTYPE): Provide and use definition. (TARGET_ARM_EABI_UNWINDER, TARGET_UNWIND_TABLES_DEFAULT): Ditto. * target.h (struct gcc_target): Add asm.ttype, unwind_tables_default and arm_eabi_unwinder. * unwind-c.c: Support Arm EABI unwinder. * unwind.h: Rename ... * unwind-generic.h: ... To this. * doc/tm.texi (TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER): Document. (TARGET_UNWID_TABLES_DEFAULT): Document. * config/arm/arm-protos.h (arm_output_fn_unwind): Add prototype. * config/arm/arm.c (arm_unwind_emit, arm_output_ttype): New functions. (TARGET_UNWIND_EMIT, TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER): Define. (thumb_pushpop, thumb_output_function_prologue): Output unwinding directives. (arm_unwind_emit_stm, arm_unwind_emit_set): New functions. * config/arm/arm.h (MUST_USE_SJLJ_EXCEPTIONS): Only define when !TARGET_UNWIND_INFO. (ARM_OUTPUT_FN_UNWIND, ARM_EABI_UNWIND_TABLES): Define. * config/arm/bpabi.h (TARGET_UNWIND_INFO): Define. * config/arm/elf.h (ASM_DECLARE_FUNCTION_NAME, ASM_DECLARE_FUNCTION_SIZE): Use ARM_OUTPUT_FN_UNWIND. * config/arm/lib1funcs.asm: Include libunwind.S. * config/arm/libgcc-bpabi.ver: Add unwinding routines. * config/arm/libunwind.S: New file. * config/arm/pr-support.c: New file. * config/arm/t-bpabi (LIB1ASMFUNCS): Add _unwind. (UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set. * config/arm/t-symbian (UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set. * config/arm/unwind-arm.c: New file. * config/arm/unwind-arm.h: New file. * config/i386/t-netware (USER_H): Remove unwind.h. * config/ia64/ia64.h (TARGET_UNWIND_TABLES_DEFAULT): Define. gcc/cp/ * Make-lang.in (cp/except.o): Depend on $(TARGET_H) * except.c: Include target.h. (init_exception_processing): Initialize unwind_resume_libfunc. * doc/tm.texi: Document TARGET_ASM_TTYPE gcc/ada/ * misc.c (gnat_init_gcc_eh): Call default_init_unwind_resume_libfunc. gcc/java/ * decl.c (java_init_decl_processing): Call default_init_unwind_resume_libfunc. gcc/objc/ * objc-act.c (objc_init_exceptions): Call default_init_unwind_resume_libfunc. libstdc++/ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Check for __cxa_end_cleanup. * libsupc++/Makefile.am (sources): Add eh_call.c and eh_arm.c. * libsupc++/eh_arm.cc: New file. * libsupc++/eh_call.cc: New file. * libsupc++/eh_catch.cc (__cxa_get_exception_ptr): Use __gxx_caught_object. (__cxa_begin_catch): Ditto. Use __is_gxx_exception_class. Call _Unwind_Complete when using the ARM EABI. (__cxa_end_catch): Use __is_gxx_exception_class. * libsupc++/eh_personality.cc: Define NO_SIZE_OF_ENCODED_VALUE when using the ARM EABI. (save_caught_exception, restore_caught_exception): New functions. (_throw_typet): New typedef. (get_ttype_entry, get_adjusted_ptr, check_exception_spec): Add ARM EABI implementations. (PERSONALITY_FUNCTION): Use new functions. Addd support for ARM EABI unwinding libary. (__cxa_unexpected): Disable when using the ARM EABI. * libsupc++/eh_throw.cc (__cxa_throw): Use __GXX_INIT_EXCEPTION_CLASS. (__cxa_rethrow): Use __is_gxx_exception_class. Call _Unwind_RaiseException when using the ARM EABI. * libsupc++/unwind-cxx.h (struct __cxa_exception): Add fields for ARM EABI semantics. (struct __cxa_eh_globals): Ditto. (__cxa_call_terminate): Add prototype. (__cxa_type_match, __cxa_begin_cleanup, __cxa_end_cleanup): Add prototypes. (__get_exception_header_from_obj, __get_exception_header_from_ue): Move earlier in file. (__is_gxx_exception_class, __GXX_INIT_EXCEPTION_CLASS, __gxx_caught_object): New functions. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libmath/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefie.in: Regenerate. * testsuite/makefile.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101385 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog44
-rw-r--r--libstdc++-v3/Makefile.in24
-rw-r--r--libstdc++-v3/acinclude.m42
-rw-r--r--libstdc++-v3/aclocal.m4310
-rwxr-xr-xlibstdc++-v3/configure2
-rw-r--r--libstdc++-v3/include/Makefile.in4
-rw-r--r--libstdc++-v3/libmath/Makefile.in4
-rw-r--r--libstdc++-v3/libsupc++/Makefile.am2
-rw-r--r--libstdc++-v3/libsupc++/Makefile.in42
-rw-r--r--libstdc++-v3/libsupc++/eh_catch.cc14
-rw-r--r--libstdc++-v3/libsupc++/eh_personality.cc293
-rw-r--r--libstdc++-v3/libsupc++/eh_throw.cc6
-rw-r--r--libstdc++-v3/libsupc++/unwind-cxx.h97
-rw-r--r--libstdc++-v3/po/Makefile.in4
-rw-r--r--libstdc++-v3/src/Makefile.in4
-rw-r--r--libstdc++-v3/testsuite/Makefile.in4
16 files changed, 550 insertions, 306 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 45b0fc5a5c7..c46431fbdd3 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,47 @@
+2005-06-28 Paul Brook <paul@codesourcery.com>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Check for
+ __cxa_end_cleanup.
+ * libsupc++/Makefile.am (sources): Add eh_call.c and eh_arm.c.
+ * libsupc++/eh_arm.cc: New file.
+ * libsupc++/eh_call.cc: New file.
+ * libsupc++/eh_catch.cc (__cxa_get_exception_ptr): Use
+ __gxx_caught_object.
+ (__cxa_begin_catch): Ditto. Use __is_gxx_exception_class. Call
+ _Unwind_Complete when using the ARM EABI.
+ (__cxa_end_catch): Use __is_gxx_exception_class.
+ * libsupc++/eh_personality.cc: Define NO_SIZE_OF_ENCODED_VALUE when
+ using the ARM EABI.
+ (save_caught_exception, restore_caught_exception): New functions.
+ (_throw_typet): New typedef.
+ (get_ttype_entry, get_adjusted_ptr, check_exception_spec): Add ARM
+ EABI implementations.
+ (PERSONALITY_FUNCTION): Use new functions. Addd support for ARM EABI
+ unwinding libary.
+ (__cxa_unexpected): Disable when using the ARM EABI.
+ * libsupc++/eh_throw.cc (__cxa_throw): Use __GXX_INIT_EXCEPTION_CLASS.
+ (__cxa_rethrow): Use __is_gxx_exception_class. Call
+ _Unwind_RaiseException when using the ARM EABI.
+ * libsupc++/unwind-cxx.h (struct __cxa_exception): Add fields for ARM
+ EABI semantics.
+ (struct __cxa_eh_globals): Ditto.
+ (__cxa_call_terminate): Add prototype.
+ (__cxa_type_match, __cxa_begin_cleanup, __cxa_end_cleanup): Add
+ prototypes.
+ (__get_exception_header_from_obj, __get_exception_header_from_ue):
+ Move earlier in file.
+ (__is_gxx_exception_class, __GXX_INIT_EXCEPTION_CLASS,
+ __gxx_caught_object): New functions.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+ * include/Makefile.in: Regenerate.
+ * libmath/Makefile.in: Regenerate.
+ * libsupc++/Makefile.in: Regenerate.
+ * po/Makefile.in: Regenerate.
+ * src/Makefie.in: Regenerate.
+ * testsuite/makefile.in: Regenerate.
+
2005-06-27 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/22102
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index 5350407138b..f2da8e9acf7 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -408,7 +408,13 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @set fnord $$MAKEFLAGS; amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -420,7 +426,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -428,7 +434,13 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $$MAKEFLAGS; amf=$$2; \
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -449,7 +461,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index ee1b9f3e89a..d3156f2b2c4 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1626,6 +1626,8 @@ EOF
enable_sjlj_exceptions=yes
elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
enable_sjlj_exceptions=no
+ elif grep __cxa_end_cleanup conftest.s >/dev/null 2>&1 ; then
+ enable_sjlj_exceptions=no
fi
fi
CXXFLAGS="$old_CXXFLAGS"
diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4
index 9c72982dce1..79d81ccfab2 100644
--- a/libstdc++-v3/aclocal.m4
+++ b/libstdc++-v3/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,23 +11,11 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# -*- Autoconf -*-
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-# Generated from amversion.in; do not edit by hand.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
@@ -40,26 +28,15 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.3])])
-
-# AM_AUX_DIR_EXPAND
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+ [AM_AUTOMAKE_VERSION([1.9.5])])
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
@@ -106,26 +83,16 @@ AC_PREREQ([2.50])dnl
am_aux_dir=`cd $ac_aux_dir && pwd`
])
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# AM_CONDITIONAL -*- Autoconf -*-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# serial 6
+# serial 7
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
@@ -149,30 +116,19 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Do all the work for Automake. -*- Autoconf -*-
-
-# This macro actually does too much some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
+# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# serial 12
-# serial 11
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
@@ -300,28 +256,17 @@ AC_DEFUN([AM_PROG_INSTALL_SH],
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# Add --enable-maintainer-mode option to configure.
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
+# serial 4
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
@@ -340,27 +285,16 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-# -*- Autoconf -*-
-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# serial 3
+# serial 4
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -386,27 +320,16 @@ else
fi
])
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
+#
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
@@ -460,25 +383,14 @@ else
fi
AC_SUBST([mkdir_p])])
-# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 4
+# serial 5
# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
# ---------------------------------------------------
@@ -529,26 +441,15 @@ multi_basedir="$multi_basedir"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
CC="$CC"])])dnl
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# Helper functions for option handling. -*- Autoconf -*-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# serial 2
+# serial 3
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -573,28 +474,16 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-#
-# Check to make sure that the build environment is sane.
-#
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# serial 3
+# serial 4
# AM_SANITY_CHECK
# ---------------
@@ -637,25 +526,14 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
-# AM_PROG_INSTALL_STRIP
-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+# AM_PROG_INSTALL_STRIP
+# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
@@ -678,25 +556,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 1
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index fd377997956..b679737757c 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -5079,6 +5079,8 @@ EOF
enable_sjlj_exceptions=yes
elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
enable_sjlj_exceptions=no
+ elif grep __cxa_end_cleanup conftest.s >/dev/null 2>&1 ; then
+ enable_sjlj_exceptions=no
fi
fi
CXXFLAGS="$old_CXXFLAGS"
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index cbda94c713f..f075d3e16c0 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/libstdc++-v3/libmath/Makefile.in b/libstdc++-v3/libmath/Makefile.in
index f3aaf3eae7f..3f0cf27e997 100644
--- a/libstdc++-v3/libmath/Makefile.in
+++ b/libstdc++-v3/libmath/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am
index a55ef6626a2..c67c294fca0 100644
--- a/libstdc++-v3/libsupc++/Makefile.am
+++ b/libstdc++-v3/libsupc++/Makefile.am
@@ -45,7 +45,9 @@ sources = \
del_opv.cc \
del_opvnt.cc \
eh_alloc.cc \
+ eh_arm.cc \
eh_aux_runtime.cc \
+ eh_call.cc \
eh_catch.cc \
eh_exception.cc \
eh_globals.cc \
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
index 9e11edd2229..4c0650ec91d 100644
--- a/libstdc++-v3/libsupc++/Makefile.in
+++ b/libstdc++-v3/libsupc++/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -65,29 +65,31 @@ toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
libsupc___la_LIBADD =
am__libsupc___la_SOURCES_DIST = del_op.cc del_opnt.cc del_opv.cc \
- del_opvnt.cc eh_alloc.cc eh_aux_runtime.cc eh_catch.cc \
- eh_exception.cc eh_globals.cc eh_personality.cc \
- eh_term_handler.cc eh_terminate.cc eh_throw.cc eh_type.cc \
- eh_unex_handler.cc guard.cc new_handler.cc new_op.cc \
- new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc \
- vec.cc vterminate.cc cp-demangle.c
+ del_opvnt.cc eh_alloc.cc eh_arm.cc eh_aux_runtime.cc \
+ eh_call.cc eh_catch.cc eh_exception.cc eh_globals.cc \
+ eh_personality.cc eh_term_handler.cc eh_terminate.cc \
+ eh_throw.cc eh_type.cc eh_unex_handler.cc guard.cc \
+ new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc \
+ pure.cc tinfo.cc tinfo2.cc vec.cc vterminate.cc cp-demangle.c
am__objects_1 = del_op.lo del_opnt.lo del_opv.lo del_opvnt.lo \
- eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo \
- eh_globals.lo eh_personality.lo eh_term_handler.lo \
- eh_terminate.lo eh_throw.lo eh_type.lo eh_unex_handler.lo \
- guard.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo \
- new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo vterminate.lo
+ eh_alloc.lo eh_arm.lo eh_aux_runtime.lo eh_call.lo eh_catch.lo \
+ eh_exception.lo eh_globals.lo eh_personality.lo \
+ eh_term_handler.lo eh_terminate.lo eh_throw.lo eh_type.lo \
+ eh_unex_handler.lo guard.lo new_handler.lo new_op.lo \
+ new_opnt.lo new_opv.lo new_opvnt.lo pure.lo tinfo.lo tinfo2.lo \
+ vec.lo vterminate.lo
@GLIBCXX_HOSTED_TRUE@am__objects_2 = cp-demangle.lo
am_libsupc___la_OBJECTS = $(am__objects_1) $(am__objects_2)
libsupc___la_OBJECTS = $(am_libsupc___la_OBJECTS)
libsupc__convenience_la_LIBADD =
am__libsupc__convenience_la_SOURCES_DIST = del_op.cc del_opnt.cc \
- del_opv.cc del_opvnt.cc eh_alloc.cc eh_aux_runtime.cc \
- eh_catch.cc eh_exception.cc eh_globals.cc eh_personality.cc \
- eh_term_handler.cc eh_terminate.cc eh_throw.cc eh_type.cc \
- eh_unex_handler.cc guard.cc new_handler.cc new_op.cc \
- new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc \
- vec.cc vterminate.cc cp-demangle.c
+ del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
+ eh_aux_runtime.cc eh_call.cc eh_catch.cc eh_exception.cc \
+ eh_globals.cc eh_personality.cc eh_term_handler.cc \
+ eh_terminate.cc eh_throw.cc eh_type.cc eh_unex_handler.cc \
+ guard.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc \
+ new_opvnt.cc pure.cc tinfo.cc tinfo2.cc vec.cc vterminate.cc \
+ cp-demangle.c
am_libsupc__convenience_la_OBJECTS = $(am__objects_1) $(am__objects_2)
libsupc__convenience_la_OBJECTS = \
$(am_libsupc__convenience_la_OBJECTS)
@@ -309,7 +311,9 @@ sources = \
del_opv.cc \
del_opvnt.cc \
eh_alloc.cc \
+ eh_arm.cc \
eh_aux_runtime.cc \
+ eh_call.cc \
eh_catch.cc \
eh_exception.cc \
eh_globals.cc \
diff --git a/libstdc++-v3/libsupc++/eh_catch.cc b/libstdc++-v3/libsupc++/eh_catch.cc
index ba4b7d75f48..47b45963805 100644
--- a/libstdc++-v3/libsupc++/eh_catch.cc
+++ b/libstdc++-v3/libsupc++/eh_catch.cc
@@ -38,9 +38,8 @@ __cxxabiv1::__cxa_get_exception_ptr(void *exc_obj_in) throw()
{
_Unwind_Exception *exceptionObject
= reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
- __cxa_exception *header = __get_exception_header_from_ue (exceptionObject);
- return header->adjustedPtr;
+ return __gxx_caught_object(exceptionObject);
}
extern "C" void *
@@ -51,12 +50,13 @@ __cxxabiv1::__cxa_begin_catch (void *exc_obj_in) throw()
__cxa_eh_globals *globals = __cxa_get_globals ();
__cxa_exception *prev = globals->caughtExceptions;
__cxa_exception *header = __get_exception_header_from_ue (exceptionObject);
+ void* objectp;
// Foreign exceptions can't be stacked here. If the exception stack is
// empty, then fine. Otherwise we really have no choice but to terminate.
// Note that this use of "header" is a lie. It's fine so long as we only
// examine header->unwindHeader though.
- if (header->unwindHeader.exception_class != __gxx_exception_class)
+ if (!__is_gxx_exception_class(header->unwindHeader.exception_class))
{
if (prev != 0)
std::terminate ();
@@ -85,7 +85,11 @@ __cxxabiv1::__cxa_begin_catch (void *exc_obj_in) throw()
globals->caughtExceptions = header;
}
- return header->adjustedPtr;
+ objectp = __gxx_caught_object(exceptionObject);
+#ifdef __ARM_EABI_UNWINDER__
+ _Unwind_Complete(exceptionObject);
+#endif
+ return objectp;
}
@@ -102,7 +106,7 @@ __cxxabiv1::__cxa_end_catch ()
// A foreign exception couldn't have been stacked (see above),
// so by definition processing must be complete.
- if (header->unwindHeader.exception_class != __gxx_exception_class)
+ if (!__is_gxx_exception_class(header->unwindHeader.exception_class))
{
globals->caughtExceptions = 0;
_Unwind_DeleteException (&header->unwindHeader);
diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc
index 4d5ae57b8d2..ecade83399f 100644
--- a/libstdc++-v3/libsupc++/eh_personality.cc
+++ b/libstdc++-v3/libsupc++/eh_personality.cc
@@ -35,6 +35,10 @@
using namespace __cxxabiv1;
+#ifdef __ARM_EABI_UNWINDER__
+#define NO_SIZE_OF_ENCODED_VALUE
+#endif
+
#include "unwind-pe.h"
@@ -84,6 +88,117 @@ parse_lsda_header (_Unwind_Context *context, const unsigned char *p,
return p;
}
+#ifdef __ARM_EABI_UNWINDER__
+
+// Return an element from a type table.
+
+static const std::type_info*
+get_ttype_entry(lsda_header_info* info, _Unwind_Word i)
+{
+ _Unwind_Ptr ptr;
+
+ ptr = (_Unwind_Ptr) (info->TType - (i * 4));
+ ptr = _Unwind_decode_target2(ptr);
+
+ return reinterpret_cast<const std::type_info *>(ptr);
+}
+
+// The ABI provides a routine for matching exception object types.
+typedef _Unwind_Control_Block _throw_typet;
+#define get_adjusted_ptr(catch_type, throw_type, thrown_ptr_p) \
+ (__cxa_type_match (throw_type, catch_type, false, thrown_ptr_p) \
+ != ctm_failed)
+
+// Return true if THROW_TYPE matches one if the filter types.
+
+static bool
+check_exception_spec(lsda_header_info* info, _throw_typet* throw_type,
+ void* thrown_ptr, _Unwind_Sword filter_value)
+{
+ const _Unwind_Word* e = ((const _Unwind_Word*) info->TType)
+ - filter_value - 1;
+
+ while (1)
+ {
+ const std::type_info* catch_type;
+ _Unwind_Word tmp;
+
+ tmp = *e;
+
+ // Zero signals the end of the list. If we've not found
+ // a match by now, then we've failed the specification.
+ if (tmp == 0)
+ return false;
+
+ tmp = _Unwind_decode_target2((_Unwind_Word) e);
+
+ // Match a ttype entry.
+ catch_type = reinterpret_cast<const std::type_info*>(tmp);
+
+ // ??? There is currently no way to ask the RTTI code about the
+ // relationship between two types without reference to a specific
+ // object. There should be; then we wouldn't need to mess with
+ // thrown_ptr here.
+ if (get_adjusted_ptr(catch_type, throw_type, &thrown_ptr))
+ return true;
+
+ // Advance to the next entry.
+ e++;
+ }
+}
+
+
+// Save stage1 handler information in the exception object
+
+static inline void
+save_caught_exception(struct _Unwind_Exception* ue_header,
+ struct _Unwind_Context* context,
+ void* thrown_ptr,
+ int handler_switch_value,
+ const unsigned char* language_specific_data,
+ _Unwind_Ptr landing_pad,
+ const unsigned char* action_record
+ __attribute__((__unused__)))
+{
+ ue_header->barrier_cache.sp = _Unwind_GetGR(context, 13);
+ ue_header->barrier_cache.bitpattern[0] = (_uw) thrown_ptr;
+ ue_header->barrier_cache.bitpattern[1]
+ = (_uw) handler_switch_value;
+ ue_header->barrier_cache.bitpattern[2]
+ = (_uw) language_specific_data;
+ ue_header->barrier_cache.bitpattern[3] = (_uw) landing_pad;
+}
+
+
+// Restore the catch handler data saved during phase1.
+
+static inline void
+restore_caught_exception(struct _Unwind_Exception* ue_header,
+ int& handler_switch_value,
+ const unsigned char*& language_specific_data,
+ _Unwind_Ptr& landing_pad)
+{
+ handler_switch_value = (int) ue_header->barrier_cache.bitpattern[1];
+ language_specific_data =
+ (const unsigned char*) ue_header->barrier_cache.bitpattern[2];
+ landing_pad = (_Unwind_Ptr) ue_header->barrier_cache.bitpattern[3];
+}
+
+#define CONTINUE_UNWINDING \
+ do \
+ { \
+ if (__gnu_unwind_frame(ue_header, context) != _URC_OK) \
+ return _URC_FAILURE; \
+ return _URC_CONTINUE_UNWIND; \
+ } \
+ while (0)
+
+#else
+typedef const std::type_info _throw_typet;
+
+
+// Return an element from a type table.
+
static const std::type_info *
get_ttype_entry (lsda_header_info *info, _Unwind_Word i)
{
@@ -127,8 +242,8 @@ get_adjusted_ptr (const std::type_info *catch_type,
// Return true if THROW_TYPE matches one if the filter types.
static bool
-check_exception_spec (lsda_header_info *info, const std::type_info *throw_type,
- void *thrown_ptr, _Unwind_Sword filter_value)
+check_exception_spec(lsda_header_info* info, _throw_typet* throw_type,
+ void* thrown_ptr, _Unwind_Sword filter_value)
{
const unsigned char *e = info->TType - filter_value - 1;
@@ -156,6 +271,50 @@ check_exception_spec (lsda_header_info *info, const std::type_info *throw_type,
}
}
+
+// Save stage1 handler information in the exception object
+
+static inline void
+save_caught_exception(struct _Unwind_Exception* ue_header,
+ struct _Unwind_Context* context
+ __attribute__((__unused__)),
+ void* thrown_ptr,
+ int handler_switch_value,
+ const unsigned char* language_specific_data,
+ _Unwind_Ptr landing_pad __attribute__((__unused__)),
+ const unsigned char* action_record)
+{
+ __cxa_exception* xh = __get_exception_header_from_ue(ue_header);
+
+ xh->handlerSwitchValue = handler_switch_value;
+ xh->actionRecord = action_record;
+ xh->languageSpecificData = language_specific_data;
+ xh->adjustedPtr = thrown_ptr;
+
+ // ??? Completely unknown what this field is supposed to be for.
+ // ??? Need to cache TType encoding base for call_unexpected.
+ xh->catchTemp = landing_pad;
+}
+
+
+// Restore the catch handler information saved during phase1.
+
+static inline void
+restore_caught_exception(struct _Unwind_Exception* ue_header,
+ int& handler_switch_value,
+ const unsigned char*& language_specific_data,
+ _Unwind_Ptr& landing_pad)
+{
+ __cxa_exception* xh = __get_exception_header_from_ue(ue_header);
+ handler_switch_value = xh->handlerSwitchValue;
+ language_specific_data = xh->languageSpecificData;
+ landing_pad = (_Unwind_Ptr) xh->catchTemp;
+}
+
+#define CONTINUE_UNWINDING return _URC_CONTINUE_UNWIND
+
+#endif // !__ARM_EABI_UNWINDER__
+
// Return true if the filter spec is empty, ie throw().
static bool
@@ -178,14 +337,18 @@ empty_exception_spec (lsda_header_info *info, _Unwind_Sword filter_value)
#endif
extern "C" _Unwind_Reason_Code
+#ifdef __ARM_EABI_UNWINDER__
+PERSONALITY_FUNCTION (_Unwind_State state,
+ struct _Unwind_Exception* ue_header,
+ struct _Unwind_Context* context)
+#else
PERSONALITY_FUNCTION (int version,
_Unwind_Action actions,
_Unwind_Exception_Class exception_class,
struct _Unwind_Exception *ue_header,
struct _Unwind_Context *context)
+#endif
{
- __cxa_exception *xh = __get_exception_header_from_ue (ue_header);
-
enum found_handler_type
{
found_nothing,
@@ -200,19 +363,58 @@ PERSONALITY_FUNCTION (int version,
const unsigned char *p;
_Unwind_Ptr landing_pad, ip;
int handler_switch_value;
- void *thrown_ptr = xh + 1;
+ void* thrown_ptr = ue_header + 1;
+ bool foreign_exception;
+
+#ifdef __ARM_EABI_UNWINDER__
+ _Unwind_Action actions;
+
+ switch (state)
+ {
+ case _US_VIRTUAL_UNWIND_FRAME:
+ actions = _UA_SEARCH_PHASE;
+ break;
+
+ case _US_UNWIND_FRAME_STARTING:
+ actions = _UA_CLEANUP_PHASE;
+ if (ue_header->barrier_cache.sp == _Unwind_GetGR(context, 13))
+ actions |= _UA_HANDLER_FRAME;
+ break;
+
+ case _US_UNWIND_FRAME_RESUME:
+ CONTINUE_UNWINDING;
+ break;
+
+ default:
+ abort();
+ }
+
+ // We don't know which runtime we're working with, so can't check this.
+ // However the ABI routines hide this from us, and we don't actually need
+ // to know.
+ foreign_exception = false;
+
+ // The dwarf unwinder assumes the context structure holds things like the
+ // function and LSDA pointers. The ARM implementation caches these in
+ // the exception header (UCB). To avoid rewriting everything we make the
+ // virtual IP register point at the UCB.
+ ip = (_Unwind_Ptr) ue_header;
+ _Unwind_SetGR(context, 12, ip);
+#else
+ __cxa_exception* xh = __get_exception_header_from_ue(ue_header);
// Interface version check.
if (version != 1)
return _URC_FATAL_PHASE1_ERROR;
+ foreign_exception = !__is_gxx_exception_class(exception_class);
+#endif
// Shortcut for phase 2 found handler for domestic exception.
if (actions == (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME)
- && exception_class == __gxx_exception_class)
+ && !foreign_exception)
{
- handler_switch_value = xh->handlerSwitchValue;
- language_specific_data = xh->languageSpecificData;
- landing_pad = (_Unwind_Ptr) xh->catchTemp;
+ restore_caught_exception(ue_header, handler_switch_value,
+ language_specific_data, landing_pad);
found_type = (landing_pad == 0 ? found_terminate : found_handler);
goto install_context;
}
@@ -222,11 +424,11 @@ PERSONALITY_FUNCTION (int version,
// If no LSDA, then there are no handlers or cleanups.
if (! language_specific_data)
- return _URC_CONTINUE_UNWIND;
+ CONTINUE_UNWINDING;
// Parse the LSDA header.
p = parse_lsda_header (context, language_specific_data, &info);
- info.ttype_base = base_of_encoded_value (info.ttype_encoding, context);
+ info.ttype_base = 0;
ip = _Unwind_GetIP (context) - 1;
landing_pad = 0;
action_record = 0;
@@ -312,7 +514,8 @@ PERSONALITY_FUNCTION (int version,
// Otherwise we have a catch handler or exception specification.
_Unwind_Sword ar_filter, ar_disp;
- const std::type_info *throw_type, *catch_type;
+ const std::type_info* catch_type;
+ _throw_typet* throw_type;
bool saw_cleanup = false;
bool saw_handler = false;
@@ -320,11 +523,15 @@ PERSONALITY_FUNCTION (int version,
// exception class, there's no exception type.
// ??? What to do about GNU Java and GNU Ada exceptions.
+#ifdef __ARM_EABI_UNWINDER__
+ throw_type = ue_header;
+#else
if ((actions & _UA_FORCE_UNWIND)
- || exception_class != __gxx_exception_class)
+ || foreign_exception)
throw_type = 0;
else
throw_type = xh->exceptionType;
+#endif
while (1)
{
@@ -387,34 +594,31 @@ PERSONALITY_FUNCTION (int version,
do_something:
if (found_type == found_nothing)
- return _URC_CONTINUE_UNWIND;
+ CONTINUE_UNWINDING;
if (actions & _UA_SEARCH_PHASE)
{
if (found_type == found_cleanup)
- return _URC_CONTINUE_UNWIND;
+ CONTINUE_UNWINDING;
// For domestic exceptions, we cache data from phase 1 for phase 2.
- if (exception_class == __gxx_exception_class)
+ if (!foreign_exception)
{
- xh->handlerSwitchValue = handler_switch_value;
- xh->actionRecord = action_record;
- xh->languageSpecificData = language_specific_data;
- xh->adjustedPtr = thrown_ptr;
-
- // ??? Completely unknown what this field is supposed to be for.
- // ??? Need to cache TType encoding base for call_unexpected.
- xh->catchTemp = landing_pad;
+ save_caught_exception(ue_header, context, thrown_ptr,
+ handler_switch_value, language_specific_data,
+ landing_pad, action_record);
}
return _URC_HANDLER_FOUND;
}
install_context:
+
+#ifndef __ARM_EABI_UNWINDER__
// We can't use any of the cxa routines with foreign exceptions,
// because they all expect ue_header to be a struct __cxa_exception.
// So in that case, call terminate or unexpected directly.
if ((actions & _UA_FORCE_UNWIND)
- || exception_class != __gxx_exception_class)
+ || foreign_exception)
{
if (found_type == found_terminate)
std::terminate ();
@@ -427,32 +631,60 @@ PERSONALITY_FUNCTION (int version,
}
}
else
+#endif
{
if (found_type == found_terminate)
- {
- __cxa_begin_catch (&xh->unwindHeader);
- __terminate (xh->terminateHandler);
- }
+ __cxa_call_terminate(ue_header);
// Cache the TType base value for __cxa_call_unexpected, as we won't
// have an _Unwind_Context then.
if (handler_switch_value < 0)
{
parse_lsda_header (context, language_specific_data, &info);
+
+#ifdef __ARM_EABI_UNWINDER__
+ const _Unwind_Word* e;
+ _Unwind_Word n;
+
+ e = ((const _Unwind_Word*) info.TType) - handler_switch_value - 1;
+ // Count the number of rtti objects.
+ n = 0;
+ while (e[n] != 0)
+ n++;
+
+ // Count.
+ ue_header->barrier_cache.bitpattern[1] = n;
+ // Base (obsolete)
+ ue_header->barrier_cache.bitpattern[2] = 0;
+ // Stride.
+ ue_header->barrier_cache.bitpattern[3] = 4;
+ // List head.
+ ue_header->barrier_cache.bitpattern[4] = (_Unwind_Word) e;
+#else
xh->catchTemp = base_of_encoded_value (info.ttype_encoding, context);
+#endif
}
}
/* For targets with pointers smaller than the word size, we must extend the
pointer, and this extension is target dependent. */
_Unwind_SetGR (context, __builtin_eh_return_data_regno (0),
- __builtin_extend_pointer (&xh->unwindHeader));
+ __builtin_extend_pointer (ue_header));
_Unwind_SetGR (context, __builtin_eh_return_data_regno (1),
handler_switch_value);
_Unwind_SetIP (context, landing_pad);
+#ifdef __ARM_EABI_UNWINDER__
+ if (found_type == found_cleanup)
+ __cxa_begin_cleanup(ue_header);
+#endif
return _URC_INSTALL_CONTEXT;
}
+/* The ARM EABI implementation of __cxa_call_unexpected is in a different
+ file so that the personality routine san be used standalone. The generic
+ routine sahred datastructures with the PR so it is most convenient to
+ implement it here. */
+#ifndef __ARM_EABI_UNWINDER__
extern "C" void
__cxa_call_unexpected (void *exc_obj_in)
{
@@ -513,3 +745,4 @@ __cxa_call_unexpected (void *exc_obj_in)
__terminate (xh_terminate_handler);
}
}
+#endif
diff --git a/libstdc++-v3/libsupc++/eh_throw.cc b/libstdc++-v3/libsupc++/eh_throw.cc
index 0807c5e1df7..eebd56c2316 100644
--- a/libstdc++-v3/libsupc++/eh_throw.cc
+++ b/libstdc++-v3/libsupc++/eh_throw.cc
@@ -63,7 +63,7 @@ __cxxabiv1::__cxa_throw (void *obj, std::type_info *tinfo,
header->exceptionDestructor = dest;
header->unexpectedHandler = __unexpected_handler;
header->terminateHandler = __terminate_handler;
- header->unwindHeader.exception_class = __gxx_exception_class;
+ __GXX_INIT_EXCEPTION_CLASS(header->unwindHeader.exception_class);
header->unwindHeader.exception_cleanup = __gxx_exception_cleanup;
#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
@@ -89,7 +89,7 @@ __cxxabiv1::__cxa_rethrow ()
if (header)
{
// Tell __cxa_end_catch this is a rethrow.
- if (header->unwindHeader.exception_class != __gxx_exception_class)
+ if (!__is_gxx_exception_class(header->unwindHeader.exception_class))
globals->caughtExceptions = 0;
else
header->handlerCount = -header->handlerCount;
@@ -97,7 +97,7 @@ __cxxabiv1::__cxa_rethrow ()
#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
_Unwind_SjLj_Resume_or_Rethrow (&header->unwindHeader);
#else
-#ifdef _LIBUNWIND_STD_ABI
+#if defined(_LIBUNWIND_STD_ABI) || defined (__ARM_EABI_UNWINDER__)
_Unwind_RaiseException (&header->unwindHeader);
#else
_Unwind_Resume_or_Rethrow (&header->unwindHeader);
diff --git a/libstdc++-v3/libsupc++/unwind-cxx.h b/libstdc++-v3/libsupc++/unwind-cxx.h
index e79dd83628e..a2c2f4886cc 100644
--- a/libstdc++-v3/libsupc++/unwind-cxx.h
+++ b/libstdc++-v3/libsupc++/unwind-cxx.h
@@ -67,6 +67,13 @@ struct __cxa_exception
// value is a signal that this object has been rethrown.
int handlerCount;
+#ifdef __ARM_EABI_UNWINDER__
+ // Stack of exceptions in cleanups.
+ __cxa_exception* nextPropagatingException;
+
+ // The nuber of active cleanup handlers for this exception.
+ int propagationCount;
+#else
// Cache parsed handler data from the personality routine Phase 1
// for Phase 2 and __cxa_call_unexpected.
int handlerSwitchValue;
@@ -74,6 +81,7 @@ struct __cxa_exception
const unsigned char *languageSpecificData;
_Unwind_Ptr catchTemp;
void *adjustedPtr;
+#endif
// The generic exception header. Must be last.
_Unwind_Exception unwindHeader;
@@ -84,6 +92,9 @@ struct __cxa_eh_globals
{
__cxa_exception *caughtExceptions;
unsigned int uncaughtExceptions;
+#ifdef __ARM_EABI_UNWINDER__
+ __cxa_exception* propagatingExceptions;
+#endif
};
@@ -122,6 +133,20 @@ extern "C" void __cxa_bad_typeid ();
// throws, and if bad_exception needs to be thrown. Called from the
// compiler.
extern "C" void __cxa_call_unexpected (void *) __attribute__((noreturn));
+extern "C" void __cxa_call_terminate (void*) __attribute__((noreturn));
+
+#ifdef __ARM_EABI_UNWINDER__
+// Arm EABI specified routines.
+typedef enum {
+ ctm_failed = 0,
+ ctm_succeeded = 1,
+ ctm_succeeded_with_ptr_to_base = 2
+} __cxa_type_match_result;
+extern "C" bool __cxa_type_match(_Unwind_Exception*, const std::type_info*,
+ bool, void**);
+extern "C" void __cxa_begin_cleanup (_Unwind_Exception*);
+extern "C" void __cxa_end_cleanup (void);
+#endif
// Invokes given handler, dying appropriately if the user handler was
// so inconsiderate as to return.
@@ -134,6 +159,54 @@ extern std::unexpected_handler __unexpected_handler;
// These are explicitly GNU C++ specific.
+// Acquire the C++ exception header from the C++ object.
+static inline __cxa_exception *
+__get_exception_header_from_obj (void *ptr)
+{
+ return reinterpret_cast<__cxa_exception *>(ptr) - 1;
+}
+
+// Acquire the C++ exception header from the generic exception header.
+static inline __cxa_exception *
+__get_exception_header_from_ue (_Unwind_Exception *exc)
+{
+ return reinterpret_cast<__cxa_exception *>(exc + 1) - 1;
+}
+
+#ifdef __ARM_EABI_UNWINDER__
+static inline bool
+__is_gxx_exception_class(_Unwind_Exception_Class c)
+{
+ // TODO: Take advantage of the fact that c will always be word aligned.
+ return c[0] == 'G'
+ && c[1] == 'N'
+ && c[2] == 'U'
+ && c[3] == 'C'
+ && c[4] == 'C'
+ && c[5] == '+'
+ && c[6] == '+'
+ && c[7] == '\0';
+}
+
+static inline void
+__GXX_INIT_EXCEPTION_CLASS(_Unwind_Exception_Class c)
+{
+ c[0] = 'G';
+ c[1] = 'N';
+ c[2] = 'U';
+ c[3] = 'C';
+ c[4] = 'C';
+ c[5] = '+';
+ c[6] = '+';
+ c[7] = '\0';
+}
+
+static inline void*
+__gxx_caught_object(_Unwind_Exception* eo)
+{
+ return (void*)eo->barrier_cache.bitpattern[0];
+}
+#else // !__ARM_EABI_UNWINDER__
// This is the exception class we report -- "GNUCC++\0".
const _Unwind_Exception_Class __gxx_exception_class
= ((((((((_Unwind_Exception_Class) 'G'
@@ -145,6 +218,14 @@ const _Unwind_Exception_Class __gxx_exception_class
<< 8 | (_Unwind_Exception_Class) '+')
<< 8 | (_Unwind_Exception_Class) '\0');
+static inline bool
+__is_gxx_exception_class(_Unwind_Exception_Class c)
+{
+ return c == __gxx_exception_class;
+}
+
+#define __GXX_INIT_EXCEPTION_CLASS(c) c = __gxx_exception_class
+
// GNU C++ personality routine, Version 0.
extern "C" _Unwind_Reason_Code __gxx_personality_v0
(int, _Unwind_Action, _Unwind_Exception_Class,
@@ -155,19 +236,13 @@ extern "C" _Unwind_Reason_Code __gxx_personality_sj0
(int, _Unwind_Action, _Unwind_Exception_Class,
struct _Unwind_Exception *, struct _Unwind_Context *);
-// Acquire the C++ exception header from the C++ object.
-static inline __cxa_exception *
-__get_exception_header_from_obj (void *ptr)
+static inline void*
+__gxx_caught_object(_Unwind_Exception* eo)
{
- return reinterpret_cast<__cxa_exception *>(ptr) - 1;
-}
-
-// Acquire the C++ exception header from the generic exception header.
-static inline __cxa_exception *
-__get_exception_header_from_ue (_Unwind_Exception *exc)
-{
- return reinterpret_cast<__cxa_exception *>(exc + 1) - 1;
+ __cxa_exception* header = __get_exception_header_from_ue (eo);
+ return header->adjustedPtr;
}
+#endif // !__ARM_EABI_UNWINDER__
} /* namespace __cxxabiv1 */
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index 9f4bacab3e7..804a9cd8c81 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 076115b2e4c..3a0670c8015 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index 91e1874ebab..242dc2e30a0 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.