This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Expansion of __builtin_frame_address
Mark Shinwell <email@example.com> writes:
> This of course is still not entirely satisfactory from the point of
> view of __builtin_frame_address, since we can't just stroll up the
> frames on some targets. To try to tighten the behaviour here, it has
> been suggested that the target-specific macro CAN_DEBUG_WITHOUT_FP
> could be used. If this is defined, we might suspect that the stack
> doesn't have a regular layout, and therefore make __builtin_frame_address
> cause a static error for n > 0. This might be overkill, however, given
> how much of a can of worms this general area is.
I don't think a static error is appropriate, given the warnings in the
manual. And of course there is always the libunwind approach.
> 2006-06-07 Mark Shinwell <firstname.lastname@example.org>
> * gcc/builtins.c (expand_builtin_return_addr): Only use
> frame_pointer_rtx when count == 0 and we are expanding
Thanks, this is better, and this is OK if it passes bootstrap and