aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/tm.texi
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/doc/tm.texi
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/doc/tm.texi')
-rw-r--r--gcc/doc/tm.texi60
1 files changed, 42 insertions, 18 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 3737314..bbda85a 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -8747,7 +8747,8 @@ If the target implements @code{TARGET_ASM_UNWIND_EMIT}, this hook may be used to
@deftypefn {Target Hook} void TARGET_ASM_UNWIND_EMIT (FILE *@var{stream}, rtx @var{insn})
This target hook emits assembly directives required to unwind the
-given instruction. This is only used when TARGET_UNWIND_INFO is set.
+given instruction. This is only used when @code{TARGET_EXCEPT_UNWIND_INFO}
+returns @code{UI_TARGET}.
@end deftypefn
@deftypevr {Target Hook} bool TARGET_ASM_UNWIND_EMIT_BEFORE_INSN
@@ -8798,23 +8799,32 @@ that it does not contain any extraneous set bits in it.
Define this macro to 0 if your target supports DWARF 2 frame unwind
information, but it does not yet work with exception handling.
Otherwise, if your target supports this information (if it defines
-@samp{INCOMING_RETURN_ADDR_RTX} and either @samp{UNALIGNED_INT_ASM_OP}
-or @samp{OBJECT_FORMAT_ELF}), GCC will provide a default definition of 1.
+@code{INCOMING_RETURN_ADDR_RTX} and either @code{UNALIGNED_INT_ASM_OP}
+or @code{OBJECT_FORMAT_ELF}), GCC will provide a default definition of 1.
+@end defmac
-If @code{TARGET_UNWIND_INFO} is defined, the target specific unwinder
-will be used in all cases. Defining this macro will enable the generation
-of DWARF 2 frame debugging information.
+@deftypefn {Target Hook} {enum unwind_info_type} TARGET_EXCEPT_UNWIND_INFO (void)
+This hook defines the mechanism that will be used for exception handling
+by the target. If the target has ABI specified unwind tables, the hook
+should return @code{UI_TARGET}. If the target is to use the
+@code{setjmp}/@code{longjmp}-based exception handling scheme, the hook
+should return @code{UI_SJLJ}. If the target supports DWARF 2 frame unwind
+information, the hook should return @code{UI_DWARF2}.
-If @code{TARGET_UNWIND_INFO} is not defined, and this macro is defined to 1,
-the DWARF 2 unwinder will be the default exception handling mechanism;
-otherwise, the @code{setjmp}/@code{longjmp}-based scheme will be used by
-default.
-@end defmac
+A target may, if exceptions are disabled, choose to return @code{UI_NONE}.
+This may end up simplifying other parts of target-specific code. The
+default implementation of this hook never returns @code{UI_NONE}.
-@defmac TARGET_UNWIND_INFO
-Define this macro if your target has ABI specified unwind tables. Usually
-these will be output by @code{TARGET_ASM_UNWIND_EMIT}.
-@end defmac
+Note that the value returned by this hook should be constant. It should
+not depend on anything except command-line switches. In particular, the
+setting @code{UI_SJLJ} must be fixed at compiler start-up as C pre-processor
+macros and builtin functions related to exception handling are set up
+depending on this setting.
+
+The default implementation of the hook first honors the
+@option{--enable-sjlj-exceptions} configure option, then
+@code{DWARF2_UNWIND_INFO}, and finally defaults to @code{UI_SJLJ}.
+@end deftypefn
@deftypevr {Target Hook} bool TARGET_UNWIND_TABLES_DEFAULT
This variable should be set to @code{true} if the target ABI requires unwinding
@@ -9323,11 +9333,25 @@ as appropriate from @code{TARGET_ASM_FUNCTION_PROLOGUE} if you don't.
@defmac DWARF2_FRAME_INFO
Define this macro to a nonzero value if GCC should always output
-Dwarf 2 frame information. If @code{DWARF2_UNWIND_INFO}
-(@pxref{Exception Region Output} is nonzero, GCC will output this
-information not matter how you define @code{DWARF2_FRAME_INFO}.
+Dwarf 2 frame information. If @code{TARGET_EXCEPT_UNWIND_INFO}
+(@pxref{Exception Region Output}) returns @code{UI_DWARF2}, and
+exceptions are enabled, GCC will output this information not matter
+how you define @code{DWARF2_FRAME_INFO}.
@end defmac
+@deftypefn {Target Hook} {enum unwind_info_type} TARGET_DEBUG_UNWIND_INFO (void)
+This hook defines the mechanism that will be used for describing frame
+unwind information to the debugger. Normally the hook will return
+@code{UI_DWARF2} if DWARF 2 debug information is enabled, and
+return @code{UI_NONE} otherwise.
+
+A target may return @code{UI_DWARF2} even when DWARF 2 debug information
+is disabled in order to always output DWARF 2 frame information.
+
+A target may return @code{UI_TARGET} if it has ABI specified unwind tables.
+This will suppress generation of the normal debug frame unwind information.
+@end deftypefn
+
@defmac DWARF2_ASM_LINE_DEBUG_INFO
Define this macro to be a nonzero value if the assembler can generate Dwarf 2
line debug info sections. This will result in much more compact line number