This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Enable -fomit-frame-pointer on i386

david daney writes:
 > >> Jan Hubicka writes:
 > >>  > Hi,
 > >>  > in the case we are taking seriuosly the switch to omitting
 > >>  > frame pointer this time, I think we shall do it earlier than
 > >>  > later.  This patch imitate what x86-64 does already so there
 > >>  > shall not be too many showstoppers.  I verified that with
 > >>  > current CVS gdb I can debug without problems.  (most of older
 > >>  > GDBs segfaults when seeing location lists)
 > >>  >
 > >>  > Bootstrapped/regtested i386, OK?
 > >>
 > >> Does this break backtrace() in glibc?
 > >
 > >Unforutnately yes, see my other mail.  I would suggest to simply copy
 > >around the x86-64 backtrace implementation, I have it on my machine for
 > >a while and it works.
 > >The dependence in between libjava and glibc would be very anoying
 > >tought.  Perhaps we can simply replace use of backtrace() in libjava by
 > >the Jakub's unwind based implementation to break the dependency on
 > >targets where unwind info shall be available (ia-64/x86-64/i386/s390 at
 > >least)
 > >I am just running the testsuite to see if and how many testsuite
 > >regressions it will bring.
 > Have you all looked at libjava/sysdep/ ?
 > It is a drop in replacement for glibc's backtrace() that I wrote
 > for the MIPS port.  Since it uses the unwinder to generate the call
 > trace, it works with -fomit-framepointer.
 > It should work on any system that uses the dwarf2 unwinder and
 > where glibc has weak linkage for its backtrace().

That's an alternative.  However, there is some risk here: I have seen
bugs in some combinations of libgcc and glibc where the dwarf2
unwinder does not terminate at the end of the stack, but segfaults
instead.  We run the risk of introducing new bugs, or rather revealing
old ones.  Just testing this on a Linux system with new versions of
glibc won't reveal them.  We'd need to test on many systems.

Also, the stack trace code is due for some major revision before
3.5. See

The patch that Bryce says he's working on is going to make big changes
in this area:

So, for the time being let's continue with the old unwinder code.
It's simple to force -fno-omit-frame-pointer for gcj on x86.  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]