This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/40521] [4.4/4.5 Regression] -g causes GCC to generate .eh_frame
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2009 18:54:46 -0000
- Subject: [Bug debug/40521] [4.4/4.5 Regression] -g causes GCC to generate .eh_frame
- References: <bug-40521-3264@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from jakub at gcc dot gnu dot org 2009-10-09 18:54 -------
Yes, it is a bug and I'll change it, but I wonder why it makes a difference
(unless you're using PCH). .cfi_sections is only emitted if:
if (dwarf2out_do_cfi_asm ())
{
#ifndef TARGET_UNWIND_INFO
if (USING_SJLJ_EXCEPTIONS || (!flag_unwind_tables && !flag_exceptions))
#endif
fprintf (asm_out_file, "\t.cfi_sections\t.debug_frame\n");
}
#endif
but if !HAVE_CFI_SECTIONS_DIRECTIVE, dwarf2out_do_cfi_asm () has:
if (!HAVE_GAS_CFI_SECTIONS_DIRECTIVE)
{
#ifdef TARGET_UNWIND_INFO
return false;
#else
if (USING_SJLJ_EXCEPTIONS || (!flag_unwind_tables && !flag_exceptions))
return false;
#endif
}
i.e. will return false under the exact same condition that dwarf2_init would
allow it. The only exception is when using PCH, you could create PCH with
saved_do_cfi_asm true and then load it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40521