------- Comment #5 from ubizjak at gmail dot com  2008-01-14 14:21 -------
I'm testing following patch:

Index: final.c
===================================================================
--- final.c     (revision 131520)
+++ final.c     (working copy)
@@ -1777,7 +1777,13 @@ final_scan_insn (rtx insn, FILE *file, i

        case NOTE_INSN_SWITCH_TEXT_SECTIONS:
          in_cold_section_p = !in_cold_section_p;
-         (*debug_hooks->switch_text_section) ();
+#ifdef DWARF2_UNWIND_INFO
+         if (dwarf2out_do_frame ())
+           dwarf2out_switch_text_section ();
+         else
+#endif
+           (*debug_hooks->switch_text_section) ();
+
          switch_to_section (current_function_section ());
          break;

Index: debug.h
===================================================================
--- debug.h     (revision 131520)
+++ debug.h     (working copy)
@@ -160,6 +160,7 @@ extern void dwarf2out_frame_finish (void
 /* Decide whether we want to emit frame unwind information for the current
    translation unit.  */
 extern int dwarf2out_do_frame (void);
+extern void dwarf2out_switch_text_section(void);

 extern void debug_flush_symbol_queue (void);
 extern void debug_queue_symbol (tree);
Index: dwarf2out.c
===================================================================
--- dwarf2out.c (revision 131520)
+++ dwarf2out.c (working copy)
@@ -3659,7 +3659,6 @@ static void dwarf2out_imported_module_or
 static void dwarf2out_abstract_function (tree);
 static void dwarf2out_var_location (rtx);
 static void dwarf2out_begin_function (tree);
-static void dwarf2out_switch_text_section (void);

 /* The debug hooks structure.  */

@@ -7094,7 +7093,7 @@ dwarf2out_note_section_used (void)
     cold_text_section_used = true;
 }

-static void
+void
 dwarf2out_switch_text_section (void)
 {
   dw_fde_ref fde;


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com
          Component|rtl-optimization            |debug


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34249

Reply via email to