From a28008f5241abbf9a0a49b96de1a465015c97a41 Mon Sep 17 00:00:00 2001
From: pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 12 Aug 2004 13:45:44 +0000
Subject: [PATCH] 	* dwarf2out.h (dwarf2out_frame_finish): Conditionalize
 outputting eh 	frame info. 	* doc/tm.texi: Document interaction between
 TARGET_UNWIND_INFO and 	DWARF2_UNWIND_INFO.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85871 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog   |  7 +++++++
 gcc/doc/tm.texi | 11 ++++++-----
 gcc/dwarf2out.c |  3 +++
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8b19e9fd9055..2dfd3359022a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-08-12  Paul Brook  <paul@codesourcery.com>
+
+	* dwarf2out.h (dwarf2out_frame_finish): Conditionalize outputting eh
+	frame info.
+	* doc/tm.texi: Document interaction between TARGET_UNWIND_INFO and
+	DWARF2_UNWIND_INFO.
+
 2004-08-12  Ben Elliston  <bje@au.ibm.com>
 
 	PR target/16286
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 291073087939..26b491427851 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -7558,12 +7558,13 @@ Otherwise, if your target supports this information (if it defines
 or @samp{OBJECT_FORMAT_ELF}), GCC will provide a default definition of
 1.
 
-If this macro is defined to 1, the DWARF 2 unwinder will be the default
-exception handling mechanism; otherwise, @code{setjmp}/@code{longjmp} will be used by
-default.
+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.
 
-If this macro is defined to anything, the DWARF 2 unwinder will be used
-instead of inline unwinders and @code{__unwind_function} in the non-@code{setjmp} case.
+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, @code{setjmp}/@code{longjmp} will be used by default.
 @end defmac
 
 @defmac TARGET_UNWIND_INFO
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 242a653b278b..4d9a1b2b25e9 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -2458,8 +2458,11 @@ dwarf2out_frame_finish (void)
   if (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
     output_call_frame_info (0);
 
+#ifndef TARGET_UNWIND_INFO
+  /* Output another copy for the unwinder.  */
   if (! USING_SJLJ_EXCEPTIONS && (flag_unwind_tables || flag_exceptions))
     output_call_frame_info (1);
+#endif
 }
 #endif
 
-- 
GitLab