public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/40521]  New: [4.4/4.5 Regression] -g causes GCC to generate .eh_frame
@ 2009-06-22 15:17 drow at gcc dot gnu dot org
  2009-06-22 15:20 ` [Bug debug/40521] " drow at gcc dot gnu dot org
                   ` (27 more replies)
  0 siblings, 28 replies; 30+ messages in thread
From: drow at gcc dot gnu dot org @ 2009-06-22 15:17 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 30+ messages in thread
[parent not found: <bug-40521-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-02-16 13:15 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 15:17 [Bug debug/40521] New: [4.4/4.5 Regression] -g causes GCC to generate .eh_frame drow at gcc dot gnu dot org
2009-06-22 15:20 ` [Bug debug/40521] " drow at gcc dot gnu dot org
2009-06-22 15:23 ` drow at gcc dot gnu dot org
2009-06-23  9:33 ` rguenth at gcc dot gnu dot org
2009-06-23 11:10 ` jakub at gcc dot gnu dot org
2009-06-23 12:24 ` drow at gcc dot gnu dot org
2009-07-22 10:33 ` jakub at gcc dot gnu dot org
2009-07-29 22:38 ` jsm28 at gcc dot gnu dot org
2009-10-01 15:45 ` jakub at gcc dot gnu dot org
2009-10-02 18:52 ` jakub at gcc dot gnu dot org
2009-10-08 15:18 ` doko at ubuntu dot com
2009-10-08 15:37 ` ramana at gcc dot gnu dot org
2009-10-09 18:28 ` mikpe at it dot uu dot se
2009-10-09 18:55 ` jakub at gcc dot gnu dot org
2009-10-09 19:07 ` jakub at gcc dot gnu dot org
2009-10-09 19:17 ` jakub at gcc dot gnu dot org
2009-10-09 19:51 ` mikpe at it dot uu dot se
2009-10-11 22:52 ` f dot frumento at ngi dot it
2009-10-12 11:36 ` sebastian dot huber at embedded-brains dot de
2009-10-12 12:34 ` mikpe at it dot uu dot se
2009-10-12 12:35 ` jakub at gcc dot gnu dot org
2009-10-13 12:53 ` mikpe at it dot uu dot se
2009-10-16 14:55 ` jakub at gcc dot gnu dot org
2009-10-16 17:35 ` ebotcazou at gcc dot gnu dot org
2009-10-17  7:28 ` jakub at gcc dot gnu dot org
2009-10-19 12:16 ` jakub at gcc dot gnu dot org
2009-10-19 12:21 ` jakub at gcc dot gnu dot org
2009-10-21 10:48 ` mikpe at it dot uu dot se
2010-03-31 15:50 ` tschwinge at gcc dot gnu dot org
     [not found] <bug-40521-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 13:15 ` jackie.rosen at hushmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).