This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: Enable -fomit-frame-pointer on i386
- From: "david daney" <ddaney at avtrex dot com>
- To: "Jan Hubicka" <hubicka at ucw dot cz>,"Andrew Haley" <aph at redhat dot com>
- Cc: "Jan Hubicka" <jh at suse dot cz>,<gcc-patches at gcc dot gnu dot org>,<rth at redhat dot com>
- Date: Sun, 8 Feb 2004 11:27:03 -0800
- Subject: RE: Enable -fomit-frame-pointer on i386
>> 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/dwarf2-backtrace.cc ?
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().
David Daney