Thumb backtrace breakage
Richard Earnshaw
rearnsha@gcc.gnu.org
Wed Apr 27 15:59:00 GMT 2005
On Wed, 2005-04-27 at 14:19, Nathan Sidwell wrote:
> Hi,
> A customer found a problem with -mthumb -mtpcs-frame -mtpcs-leaf-frame
> in that the register allocator would clobber 'fp'. The attached
> patch fixes this by making fp a fixed register when -mtpcs-frame or
> -mtpcs-leaf-frame is given. Note that TARGET_BACKTRACE cannot be used
> because (a) we'll want to always reserve fp if one of the options is given,
> but more importantly (b) leaf_function_p ICEs at the point in init_regs
> that the register sets are initialized.
>
> ok?
>
> nathan
This is OK, but you should be warned that I've very little sympathy in
general for people who want to do frame-pointer based back-tracing. The
above will only work in that it skips all Thumb frames entirely (except
perhaps in the leaf).
The *only* way to do reliable stack unwinding on a mixed arm/thumb
application is by using unwind tables.
R.
More information about the Gcc-patches
mailing list