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 19:17:26 -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 #12 from jakub at gcc dot gnu dot org 2009-10-09 19:17 -------
Ah, now I see it in the 4.4 version. Your backport is wrong then, you must not
return true from dwarf2out_do_cfi_asm when !eh_personality_libfunc, but
HAVE_GAS_CFI_SECTIONS_DIRECTIVE is 0 and not emitting normal unwind info.
Either you want:
int
dwarf2out_do_cfi_asm (void)
{
int enc;
#ifdef MIPS_DEBUGGING_INFO
return false;
#endif
if (!flag_dwarf2_cfi_asm || !dwarf2out_do_frame ())
return false;
if (saved_do_cfi_asm)
return true;
if (eh_personality_libfunc)
{
if (!HAVE_GAS_CFI_PERSONALITY_DIRECTIVE)
return false;
/* Make sure the personality encoding is one the assembler can support.
In particular, aligned addresses can't be handled. */
enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2,/*global=*/1);
if ((enc & 0x70) != 0 && (enc & 0x70) != DW_EH_PE_pcrel)
return false;
enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0,/*global=*/0);
if ((enc & 0x70) != 0 && (enc & 0x70) != DW_EH_PE_pcrel)
return false;
}
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
}
saved_do_cfi_asm = true;
return true;
}
or move the !HAVE_GAS_CFI_SECTIONS_DIRECTIVE tests in between if
(saved_do_cfi_asm) return true; and if (!eh_personality_libfunc) return true;.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40521