This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: __builtin_return_address
- To: meissner at cygnus dot com
- Subject: Re: __builtin_return_address
- From: Eli Zaretskii <eliz at delorie dot com>
- Date: Thu, 2 Nov 2000 02:41:07 -0500 (EST)
- CC: zackw at stanford dot edu, spock at telerama dot com, gcc-bugs at gcc dot gnu dot org
- References: <20001101031821.21269.qmail@speedbuggy.telerama.com> <20001031194044.F8628@wolery.stanford.edu> <200011010850.DAA22655@indy.delorie.com> <20001101160344.10194@cse.cygnus.com>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> From: Michael Meissner <meissner@cygnus.com>
> Date: Wed, 1 Nov 2000 16:03:44 -0500
> >
> > Also, is the platform the OP was talking about (Red Hat GNU/Linux)
> > really one of those where __builtin_return_address doesn't work?
>
> Ummm, Red Hat GNU/Linux runs on 3 different target hardwares. For the x86,
> __builtin_return_address with a non-zero argument only has a chance of working
> if the caller was not called with -fomit-frame-pointer.
The original message indicates that it was an x86-based system:
Reading specs from
usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs/
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
It also indicates that -fomit-frame-pointer was not used:
On my machine, this program compiled with 'gcc
watchtest6.c -o watchtest6' when run returns:
400349cb
8048361