This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Expansion of __builtin_frame_address
On Fri, 2006-06-02 at 16:28, Paul Brook wrote:
> I agree that in general you need ancillary information way to get a backtrace
> on Arm. However if you assume only Arm code code and -fno-omit-frame-pointer
> then you can walk the frames. Given this assumption I think it make sense to
> have _b_f_a(0) force the use of a frame pointer.
>
No, in the general case you can't. Because ARM and Thumb frames are
laid out differently. In ARM code the frame pointer is in r11 (when not
eliminated); in thumb code it is in r7 (because r11 can't be used in
memory insns).
R.