This is the mail archive of the gcc-patches@gcc.gnu.org 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: [PATCH] Expansion of __builtin_frame_address


Mark Shinwell <shinwell@codesourcery.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  <shinwell@codesourcery.com>
> 
> 	* gcc/builtins.c (expand_builtin_return_addr): Only use
> 	frame_pointer_rtx when count == 0 and we are expanding
> 	__builtin_return_address.

Thanks, this is better, and this is OK if it passes bootstrap and
testsuite.

Ian


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