diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-28 20:44:58 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-28 20:44:58 +0000 |
commit | cc7d6aed6b7186313ada1a58107b9dbcaac2f435 (patch) | |
tree | abc0f2fe4784df2eb251f4c04a0493fec3eac91d /gcc/doc | |
parent | a336eb4b5042c9ebc2d044d29202649fd9fa2759 (diff) | |
download | gcc-cc7d6aed6b7186313ada1a58107b9dbcaac2f435.tar.gz |
Hookize TARGET_UNWIND_INFO et al.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164701 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/tm.texi | 60 | ||||
-rw-r--r-- | gcc/doc/tm.texi.in | 60 |
2 files changed, 84 insertions, 36 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 3737314d0c5..bbda85a43a7 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 diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index ea3087fb29c..7f0b460927b 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -8733,7 +8733,8 @@ The default is that no label is emitted. @hook TARGET_ASM_UNWIND_EMIT 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 @hook TARGET_ASM_UNWIND_EMIT_BEFORE_INSN @@ -8782,23 +8783,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. +@hook TARGET_EXCEPT_UNWIND_INFO +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 @hook TARGET_UNWIND_TABLES_DEFAULT This variable should be set to @code{true} if the target ABI requires unwinding @@ -9307,11 +9317,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 +@hook TARGET_DEBUG_UNWIND_INFO +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 |