From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25559 invoked by alias); 22 Jun 2009 15:17:15 -0000 Received: (qmail 25520 invoked by uid 48); 22 Jun 2009 15:16:59 -0000 Date: Mon, 22 Jun 2009 15:17:00 -0000 Subject: [Bug debug/40521] New: [4.4/4.5 Regression] -g causes GCC to generate .eh_frame X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "drow at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg01604.txt.bz2 Put this in main.c and build it with a 4.4-branch compiler using recent binutils: int main () { return 0; } Versions: GNU assembler (GNU Binutils) 2.19.51.20090611 i686-pc-linux-gnu-gcc (GCC) 4.4.1 20090611 (prerelease) % i686-pc-linux-gnu-gcc -c main.c; objdump --wide -h main.o | grep ALLOC 0 .text 0000000a 00000000 00000000 00000034 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000000 00000000 00000000 00000040 2**2 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000000 00000000 00000000 00000040 2**2 ALLOC % i686-pc-linux-gnu-gcc -c -g main.c; objdump --wide -h main.o | grep ALLOC 0 .text 0000000a 00000000 00000000 00000034 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000000 00000000 00000000 00000040 2**2 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000000 00000000 00000000 00000040 2**2 ALLOC 12 .eh_frame 00000034 00000000 00000000 000001c0 2**2 CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA We're using GAS's .cfi_startproc et cetera directives to generate debug information. But they only generate .eh_frame, not .debug_frame. I also noticed this problem on an ARM EABI target. ARM EABI does not use .eh_frame, only .debug_frame and .ARM.exidx. The easiest fix is to disable use of the CFI directives when we are trying to generate .debug_frame. I believe GCC used to generate both .debug_frame and .eh_frame for the same function. If we want both to gain the advantages of using CFI directives (e.g. potentially accurate across inline asm), then we need to teach gas to emit .debug_frame/.eh_frame/both as requested. -- Summary: [4.4/4.5 Regression] -g causes GCC to generate .eh_frame Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: drow at gcc dot gnu dot org GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40521