aboutsummaryrefslogtreecommitdiff
path: root/gcc/targhooks.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2010-09-28 13:44:58 -0700
committerRichard Henderson <rth@gcc.gnu.org>2010-09-28 13:44:58 -0700
commitf0a0390e691ece0d859b7d87c6e6617d227cb8dd (patch)
treeabc0f2fe4784df2eb251f4c04a0493fec3eac91d /gcc/targhooks.c
parentc165dca7efdb3f4bdae82c01b409a6b9cf4dbd65 (diff)
downloadgcc-f0a0390e691ece0d859b7d87c6e6617d227cb8dd.zip
gcc-f0a0390e691ece0d859b7d87c6e6617d227cb8dd.tar.gz
gcc-f0a0390e691ece0d859b7d87c6e6617d227cb8dd.tar.bz2
Hookize TARGET_UNWIND_INFO et al.
From-SVN: r164701
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r--gcc/targhooks.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index dd22bea..82e59a8 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1233,4 +1233,73 @@ default_class_likely_spilled_p (reg_class_t rclass)
#endif
}
+/* Determine the debugging unwind mechanism for the target. */
+
+enum unwind_info_type
+default_debug_unwind_info (void)
+{
+ /* If the target wants to force the use of dwarf2 unwind info, let it. */
+ /* ??? Change all users to the hook, then poison this. */
+#ifdef DWARF2_FRAME_INFO
+ if (DWARF2_FRAME_INFO)
+ return UI_DWARF2;
+#endif
+
+ /* Otherwise, only turn it on if dwarf2 debugging is enabled. */
+#ifdef DWARF2_DEBUGGING_INFO
+ if (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
+ return UI_DWARF2;
+#endif
+
+ return UI_NONE;
+}
+
+/* Determine the exception handling mechanism for the target. */
+
+enum unwind_info_type
+default_except_unwind_info (void)
+{
+ /* ??? Change the one user to the hook, then poison this. */
+#ifdef MUST_USE_SJLJ_EXCEPTIONS
+ if (MUST_USE_SJLJ_EXCEPTIONS)
+ return UI_SJLJ;
+#endif
+
+ /* Obey the configure switch to turn on sjlj exceptions. */
+#ifdef CONFIG_SJLJ_EXCEPTIONS
+ if (CONFIG_SJLJ_EXCEPTIONS)
+ return UI_SJLJ;
+#endif
+
+ /* ??? Change all users to the hook, then poison this. */
+#ifdef DWARF2_UNWIND_INFO
+ if (DWARF2_UNWIND_INFO)
+ return UI_DWARF2;
+#endif
+
+ return UI_SJLJ;
+}
+
+/* To be used by targets that force dwarf2 unwind enabled. */
+
+enum unwind_info_type
+dwarf2_except_unwind_info (void)
+{
+ /* Obey the configure switch to turn on sjlj exceptions. */
+#ifdef CONFIG_SJLJ_EXCEPTIONS
+ if (CONFIG_SJLJ_EXCEPTIONS)
+ return UI_SJLJ;
+#endif
+
+ return UI_DWARF2;
+}
+
+/* To be used by targets that force sjlj unwind enabled. */
+
+enum unwind_info_type
+sjlj_except_unwind_info (void)
+{
+ return UI_SJLJ;
+}
+
#include "gt-targhooks.h"