This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lto] Initialize dwarf2


I had missed initializing dwarf2 frame bits.  This showed up as a
multitude of failures in i686 g++ tests.

Tested on x86_64 and i686.


Diego.


	* lto-function-in.c (lto_init_eh): Call
	dwarf2out_frame_init, if needed.

Index: lto-function-in.c
===================================================================
--- lto-function-in.c	(revision 141723)
+++ lto-function-in.c	(working copy)
@@ -1782,6 +1782,14 @@ lto_init_eh (void)
   flag_exceptions = 1;
   init_eh ();
 
+  /* Initialize dwarf2 tables.  Since dwarf2out_do_frame() returns
+     true only when exceptions are enabled, this initialization is
+     never done during lang_dependent_init.  */
+#if defined DWARF2_DEBUGGING_INFO || defined DWARF2_UNWIND_INFO
+  if (dwarf2out_do_frame ())
+    dwarf2out_frame_init ();
+#endif
+
   /* FIXME lto.  Use g++'s personality for now, but this should be
      derived from either the input files or some global flag.  It's
      not clear yet what should happen when languages other than C or


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]